FastLED 3.9.15
Loading...
Searching...
No Matches

◆ binaryAssert()

template<typename L, typename R, typename Cmp>
bool fl::test::binaryAssert ( const L & lhs,
const R & rhs,
Cmp cmp,
const char * lhsExpr,
const char * op,
const char * rhsExpr,
const char * file,
int line )

Definition at line 357 of file fltest.h.

359 {
360 bool result = cmp(lhs, rhs);
361
363 ar.mLocation = SourceLocation(file, line);
364
365 fl::sstream exprSS;
366 exprSS << lhsExpr << " " << op << " " << rhsExpr;
367 ar.mExpression = exprSS.str();
368
369 if (!result) {
370 fl::sstream expandedSS;
371 expandedSS << lhs << " " << op << " " << rhs;
372 ar.mExpanded = expandedSS.str();
373 }
374
376 return result;
377}
string str() const FL_NOEXCEPT
Definition strstream.h:43
static TestContext & instance() FL_NOEXCEPT
void reportAssert(const AssertResult &result) FL_NOEXCEPT
expected< T, E > result
Alias for expected (Rust-style naming)
Definition result.h:31

References binaryAssert(), FL_NOEXCEPT, fl::test::TestContext::instance(), fl::test::AssertResult::mExpanded, fl::test::AssertResult::mExpression, fl::test::AssertResult::mLocation, and fl::sstream::str().

Referenced by binaryAssert().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: