AUnit  1.7.1
Unit testing framework for Arduino platforms inspired by ArduinoUnit and Google Test.
All Classes Files Functions Variables Typedefs Macros Pages
Verbosity.h
1 /*
2 MIT License
3 
4 Copyright (c) 2018 Brian T. Park
5 
6 Permission is hereby granted, free of charge, to any person obtaining a copy
7 of this software and associated documentation files (the "Software"), to deal
8 in the Software without restriction, including without limitation the rights
9 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 copies of the Software, and to permit persons to whom the Software is
11 furnished to do so, subject to the following conditions:
12 
13 The above copyright notice and this permission notice shall be included in all
14 copies or substantial portions of the Software.
15 
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 SOFTWARE.
23 */
24 
25 #ifndef AUNIT_VERBOSITY_H
26 #define AUNIT_VERBOSITY_H
27 
28 #include <stdint.h>
29 
30 namespace aunit {
31 
37 class Verbosity {
38  public:
40  static const uint8_t kAssertionPassed = 0x01;
41 
43  static const uint8_t kAssertionFailed = 0x02;
44 
46  static const uint8_t kTestPassed = 0x04;
47 
49  static const uint8_t kTestFailed = 0x08;
50 
52  static const uint8_t kTestSkipped = 0x10;
53 
55  static const uint8_t kTestExpired = 0x20;
56 
58  static const uint8_t kTestRunSummary = 0x40;
59 
60  // compound flags
62  static const uint8_t kAssertionAll = (kAssertionPassed | kAssertionFailed);
63 
65  static const uint8_t kTestAll =
67 
69  static const uint8_t kDefault =
71 
73  static const uint8_t kAll = 0xFF;
74 
76  static const uint8_t kNone = 0x00;
77 
78  private:
79  // Disable constructor, copy-constructor and assignment operator
80  Verbosity() = delete;
81  Verbosity(const Verbosity&) = delete;
82  Verbosity& operator=(const Verbosity&) = delete;
83 };
84 
85 }
86 
87 #endif
Utility class to hold the Verbosity constants.
Definition: Verbosity.h:37
static const uint8_t kTestFailed
Print test failed message.
Definition: Verbosity.h:49
static const uint8_t kAssertionAll
Print all assertXxx() messages.
Definition: Verbosity.h:62
static const uint8_t kDefault
The default verbosity.
Definition: Verbosity.h:69
static const uint8_t kNone
Print no messages.
Definition: Verbosity.h:76
static const uint8_t kTestRunSummary
Print TestRunner summary message.
Definition: Verbosity.h:58
static const uint8_t kTestPassed
Print test passed message.
Definition: Verbosity.h:46
static const uint8_t kAssertionFailed
Print assertXxx() failed message.
Definition: Verbosity.h:43
static const uint8_t kTestSkipped
Print test skipped message.
Definition: Verbosity.h:52
static const uint8_t kAll
Print all messages.
Definition: Verbosity.h:73
static const uint8_t kTestExpired
Print test timed out message.
Definition: Verbosity.h:55
static const uint8_t kTestAll
Print all test status messages.
Definition: Verbosity.h:65
static const uint8_t kAssertionPassed
Print assertXxx() passed message.
Definition: Verbosity.h:40