25 #ifndef AUNIT_ASSERTION_H 26 #define AUNIT_ASSERTION_H 31 class __FlashStringHelper;
63 bool assertionBool(
const char* file, uint16_t line,
bool arg,
66 bool assertion(
const char* file, uint16_t line,
bool lhs,
67 const char* opName,
bool (*op)(
bool lhs,
bool rhs),
70 bool assertion(
const char* file, uint16_t line,
char lhs,
71 const char* opName,
bool (*op)(
char lhs,
char rhs),
74 bool assertion(
const char* file, uint16_t line,
int lhs,
75 const char* opName,
bool (*op)(
int lhs,
int rhs),
78 bool assertion(
const char* file, uint16_t line,
unsigned int lhs,
79 const char* opName,
bool (*op)(
unsigned int lhs,
unsigned int rhs),
82 bool assertion(
const char* file, uint16_t line,
long lhs,
83 const char* opName,
bool (*op)(
long lhs,
long rhs),
86 bool assertion(
const char* file, uint16_t line,
unsigned long lhs,
87 const char* opName,
bool (*op)(
unsigned long lhs,
unsigned long rhs),
90 bool assertion(
const char* file, uint16_t line,
double lhs,
91 const char* opName,
bool (*op)(
double lhs,
double rhs),
94 bool assertion(
const char* file, uint16_t line,
const char* lhs,
95 const char* opName,
bool (*op)(
const char* lhs,
const char* rhs),
98 bool assertion(
const char* file, uint16_t line,
const char* lhs,
99 const char *opName,
bool (*op)(
const char* lhs,
const String& rhs),
102 bool assertion(
const char* file, uint16_t line,
const char* lhs,
104 bool (*op)(
const char* lhs,
const __FlashStringHelper* rhs),
105 const __FlashStringHelper* rhs);
107 bool assertion(
const char* file, uint16_t line,
const String& lhs,
108 const char *opName,
bool (*op)(
const String& lhs,
const char* rhs),
111 bool assertion(
const char* file, uint16_t line,
const String& lhs,
112 const char *opName,
bool (*op)(
const String& lhs,
const String& rhs),
115 bool assertion(
const char* file, uint16_t line,
const String& lhs,
117 bool (*op)(
const String& lhs,
const __FlashStringHelper* rhs),
118 const __FlashStringHelper* rhs);
120 bool assertion(
const char* file, uint16_t line,
121 const __FlashStringHelper* lhs,
const char *opName,
122 bool (*op)(
const __FlashStringHelper* lhs,
const char* rhs),
125 bool assertion(
const char* file, uint16_t line,
126 const __FlashStringHelper* lhs,
const char *opName,
127 bool (*op)(
const __FlashStringHelper* lhs,
const String& rhs),
130 bool assertion(
const char* file, uint16_t line,
131 const __FlashStringHelper* lhs,
const char *opName,
132 bool (*op)(
const __FlashStringHelper* lhs,
133 const __FlashStringHelper* rhs),
134 const __FlashStringHelper* rhs);
138 bool assertionBoolVerbose(
const char* file, uint16_t line,
bool arg,
139 internal::FlashStringType argString,
bool value);
141 bool assertionVerbose(
const char* file, uint16_t line,
bool lhs,
142 internal::FlashStringType lhsString,
const char* opName,
143 bool (*op)(
bool lhs,
bool rhs),
144 bool rhs, internal::FlashStringType rhsString);
146 bool assertionVerbose(
const char* file, uint16_t line,
char lhs,
147 internal::FlashStringType lhsString,
const char* opName,
148 bool (*op)(
char lhs,
char rhs),
149 char rhs, internal::FlashStringType rhsString);
151 bool assertionVerbose(
const char* file, uint16_t line,
int lhs,
152 internal::FlashStringType lhsString,
const char* opName,
153 bool (*op)(
int lhs,
int rhs),
154 int rhs, internal::FlashStringType rhsString);
156 bool assertionVerbose(
const char* file, uint16_t line,
unsigned int lhs,
157 internal::FlashStringType lhsString,
const char* opName,
158 bool (*op)(
unsigned int lhs,
unsigned int rhs),
159 unsigned int rhs, internal::FlashStringType rhsString);
161 bool assertionVerbose(
const char* file, uint16_t line,
long lhs,
162 internal::FlashStringType lhsString,
const char* opName,
163 bool (*op)(
long lhs,
long rhs),
164 long rhs, internal::FlashStringType rhsString);
166 bool assertionVerbose(
const char* file, uint16_t line,
unsigned long lhs,
167 internal::FlashStringType lhsString,
const char* opName,
168 bool (*op)(
unsigned long lhs,
unsigned long rhs),
169 unsigned long rhs, internal::FlashStringType rhsString);
171 bool assertionVerbose(
const char* file, uint16_t line,
double lhs,
172 internal::FlashStringType lhsString,
const char* opName,
173 bool (*op)(
double lhs,
double rhs),
174 double rhs, internal::FlashStringType rhsString);
176 bool assertionVerbose(
const char* file, uint16_t line,
const char* lhs,
177 internal::FlashStringType lhsString,
const char* opName,
178 bool (*op)(
const char* lhs,
const char* rhs),
179 const char* rhs, internal::FlashStringType rhsString);
181 bool assertionVerbose(
const char* file, uint16_t line,
const char* lhs,
182 internal::FlashStringType lhsString,
const char *opName,
183 bool (*op)(
const char* lhs,
const String& rhs),
184 const String& rhs, internal::FlashStringType rhsString);
186 bool assertionVerbose(
const char* file, uint16_t line,
const char* lhs,
187 internal::FlashStringType lhsString,
const char *opName,
188 bool (*op)(
const char* lhs,
const __FlashStringHelper* rhs),
189 const __FlashStringHelper* rhs, internal::FlashStringType rhsString);
191 bool assertionVerbose(
const char* file, uint16_t line,
const String& lhs,
192 internal::FlashStringType lhsString,
const char *opName,
193 bool (*op)(
const String& lhs,
const char* rhs),
194 const char* rhs, internal::FlashStringType rhsString);
196 bool assertionVerbose(
const char* file, uint16_t line,
const String& lhs,
197 internal::FlashStringType lhsString,
const char *opName,
198 bool (*op)(
const String& lhs,
const String& rhs),
199 const String& rhs, internal::FlashStringType rhsString);
201 bool assertionVerbose(
const char* file, uint16_t line,
const String& lhs,
202 internal::FlashStringType lhsString,
const char *opName,
203 bool (*op)(
const String& lhs,
const __FlashStringHelper* rhs),
204 const __FlashStringHelper* rhs, internal::FlashStringType rhsString);
206 bool assertionVerbose(
const char* file, uint16_t line,
207 const __FlashStringHelper* lhs, internal::FlashStringType lhsString,
209 bool (*op)(
const __FlashStringHelper* lhs,
const char* rhs),
210 const char* rhs, internal::FlashStringType rhsString);
212 bool assertionVerbose(
const char* file, uint16_t line,
213 const __FlashStringHelper* lhs, internal::FlashStringType lhsString,
215 bool (*op)(
const __FlashStringHelper* lhs,
const String& rhs),
216 const String& rhs, internal::FlashStringType rhsString);
218 bool assertionVerbose(
const char* file, uint16_t line,
219 const __FlashStringHelper* lhs, internal::FlashStringType lhsString,
221 bool (*op)(
const __FlashStringHelper* lhs,
222 const __FlashStringHelper* rhs),
223 const __FlashStringHelper* rhs, internal::FlashStringType rhsString);
Base class of all test cases.
bool isOutputEnabled(bool ok)
Returns true if an assertion message should be printed.
An Assertion class is a subclass of Test and provides various overloaded assertion() functions...
Flash strings (using F() macro) on the ESP8266 platform cannot be placed in an inline context...
Assertion()
Empty constructor.