Quick Links: |
Provide test utilities for bsl
that do not use <iostream>.
More...
Go to the source code of this file.
Classes | |
struct | bsls::BslTestUtil |
Namespaces | |
namespace | bsls |
Defines | |
#define | BSLS_BSLTESTUTIL_ASSERT(X) do { aSsErT(!(X), #X, __LINE__); } while (false) |
#define | BSLS_BSLTESTUTIL_LOOP0_ASSERT BSLS_BSLTESTUTIL_ASSERT |
#define | BSLS_BSLTESTUTIL_LOOP_ASSERT(I, X) |
#define | BSLS_BSLTESTUTIL_LOOP1_ASSERT BSLS_BSLTESTUTIL_LOOP_ASSERT |
#define | BSLS_BSLTESTUTIL_LOOP2_ASSERT(I, J, X) |
#define | BSLS_BSLTESTUTIL_LOOP3_ASSERT(I, J, K, X) |
#define | BSLS_BSLTESTUTIL_LOOP4_ASSERT(I, J, K, L, X) |
#define | BSLS_BSLTESTUTIL_LOOP5_ASSERT(I, J, K, L, M, X) |
#define | BSLS_BSLTESTUTIL_LOOP6_ASSERT(I, J, K, L, M, N, X) |
#define | BSLS_BSLTESTUTIL_LOOP7_ASSERT(I, J, K, L, M, N, O, X) |
#define | BSLS_BSLTESTUTIL_LOOP8_ASSERT(I, J, K, L, M, N, O, V, X) |
#define | BSLS_BSLTESTUTIL_EXPAND(X) X |
#define | BSLS_BSLTESTUTIL_NUM_ARGS_IMPL(X8, X7, X6, X5, X4, X3, X2, X1, X0,N,...) N |
#define | BSLS_BSLTESTUTIL_NUM_ARGS(...) |
#define | BSLS_BSLTESTUTIL_LOOPN_ASSERT_IMPL(N,...) BSLS_BSLTESTUTIL_EXPAND(BSLS_BSLTESTUTIL_LOOP ## N ## _ASSERT(__VA_ARGS__)) |
#define | BSLS_BSLTESTUTIL_LOOPN_ASSERT(N,...) BSLS_BSLTESTUTIL_LOOPN_ASSERT_IMPL(N, __VA_ARGS__) |
#define | BSLS_BSLTESTUTIL_ASSERTV(...) |
#define | BSLS_BSLTESTUTIL_Q(X) |
#define | BSLS_BSLTESTUTIL_P(X) |
#define | BSLS_BSLTESTUTIL_P_(X) |
#define | BSLS_BSLTESTUTIL_L_ __LINE__ |
#define | BSLS_BSLTESTUTIL_T_ BloombergLP::bsls::BslTestUtil::printTab(); |
#define | BSLS_BSLTESTUTIL_FORMAT_ZU "%zu" |
#define | BSLS_BSLTESTUTIL_FORMAT_TD "%td" |
#define | BSLS_BSLTESTUTIL_FORMAT_I64 "%lld" |
#define | BSLS_BSLTESTUTIL_FORMAT_U64 "%llu" |
#define | BSLS_BSLTESTUTIL_FORMAT_PTR "%X" |
Functions | |
void | bsls::debugprint (bool v) |
void | bsls::debugprint (char v) |
void | bsls::debugprint (signed char v) |
void | bsls::debugprint (unsigned char v) |
void | bsls::debugprint (short v) |
void | bsls::debugprint (unsigned short v) |
void | bsls::debugprint (int v) |
void | bsls::debugprint (unsigned int v) |
void | bsls::debugprint (long v) |
void | bsls::debugprint (unsigned long v) |
void | bsls::debugprint (long long v) |
void | bsls::debugprint (unsigned long long v) |
void | bsls::debugprint (float v) |
void | bsls::debugprint (double v) |
void | bsls::debugprint (long double v) |
void | bsls::debugprint (const char *v) |
void | bsls::debugprint (char *v) |
void | bsls::debugprint (const volatile char *v) |
void | bsls::debugprint (volatile char *v) |
void | bsls::debugprint (void *v) |
void | bsls::debugprint (volatile void *v) |
void | bsls::debugprint (const void *v) |
void | bsls::debugprint (const volatile void *v) |
template<class RESULT > | |
void | bsls::debugprint (RESULT(*v)()) |
#define BSLS_BSLTESTUTIL_ASSERT | ( | X | ) | do { aSsErT(!(X), #X, __LINE__); } while (false) |
#define BSLS_BSLTESTUTIL_LOOP0_ASSERT BSLS_BSLTESTUTIL_ASSERT |
#define BSLS_BSLTESTUTIL_LOOP_ASSERT | ( | I, | ||
X | ||||
) |
do { \ if (!(X)) { BloombergLP::bsls:: \ BslTestUtil::callDebugprint(I, #I ": ", "\n"); \ aSsErT(true, #X, __LINE__); } } while (false)
#define BSLS_BSLTESTUTIL_LOOP1_ASSERT BSLS_BSLTESTUTIL_LOOP_ASSERT |
#define BSLS_BSLTESTUTIL_LOOP2_ASSERT | ( | I, | ||
J, | ||||
X | ||||
) |
do { \ if (!(X)) { BloombergLP::bsls:: \ BslTestUtil::callDebugprint(I, #I ": ", "\t"); \ BloombergLP::bsls:: \ BslTestUtil::callDebugprint(J, #J ": ", "\n"); \ aSsErT(true, #X, __LINE__); } } while (false)
#define BSLS_BSLTESTUTIL_LOOP3_ASSERT | ( | I, | ||
J, | ||||
K, | ||||
X | ||||
) |
do { \ if (!(X)) { BloombergLP::bsls:: \ BslTestUtil::callDebugprint(I, #I ": ", "\t"); \ BloombergLP::bsls:: \ BslTestUtil::callDebugprint(J, #J ": ", "\t"); \ BloombergLP::bsls:: \ BslTestUtil::callDebugprint(K, #K ": ", "\n"); \ aSsErT(true, #X, __LINE__); } } while (false)
#define BSLS_BSLTESTUTIL_LOOP4_ASSERT | ( | I, | ||
J, | ||||
K, | ||||
L, | ||||
X | ||||
) |
do { \ if (!(X)) { BloombergLP::bsls:: \ BslTestUtil::callDebugprint(I, #I ": ", "\t"); \ BloombergLP::bsls:: \ BslTestUtil::callDebugprint(J, #J ": ", "\t"); \ BloombergLP::bsls:: \ BslTestUtil::callDebugprint(K, #K ": ", "\t"); \ BloombergLP::bsls:: \ BslTestUtil::callDebugprint(L, #L ": ", "\n"); \ aSsErT(true, #X, __LINE__); } } while (false)
#define BSLS_BSLTESTUTIL_LOOP5_ASSERT | ( | I, | ||
J, | ||||
K, | ||||
L, | ||||
M, | ||||
X | ||||
) |
do { \ if (!(X)) { BloombergLP::bsls:: \ BslTestUtil::callDebugprint(I, #I ": ", "\t"); \ BloombergLP::bsls:: \ BslTestUtil::callDebugprint(J, #J ": ", "\t"); \ BloombergLP::bsls:: \ BslTestUtil::callDebugprint(K, #K ": ", "\t"); \ BloombergLP::bsls:: \ BslTestUtil::callDebugprint(L, #L ": ", "\t"); \ BloombergLP::bsls:: \ BslTestUtil::callDebugprint(M, #M ": ", "\n"); \ aSsErT(true, #X, __LINE__); } } while (false)
#define BSLS_BSLTESTUTIL_LOOP6_ASSERT | ( | I, | ||
J, | ||||
K, | ||||
L, | ||||
M, | ||||
N, | ||||
X | ||||
) |
do { \ if (!(X)) { BloombergLP::bsls:: \ BslTestUtil::callDebugprint(I, #I ": ", "\t"); \ BloombergLP::bsls:: \ BslTestUtil::callDebugprint(J, #J ": ", "\t"); \ BloombergLP::bsls:: \ BslTestUtil::callDebugprint(K, #K ": ", "\t"); \ BloombergLP::bsls:: \ BslTestUtil::callDebugprint(L, #L ": ", "\t"); \ BloombergLP::bsls:: \ BslTestUtil::callDebugprint(M, #M ": ", "\t"); \ BloombergLP::bsls:: \ BslTestUtil::callDebugprint(N, #N ": ", "\n"); \ aSsErT(true, #X, __LINE__); } } while (false)
#define BSLS_BSLTESTUTIL_LOOP7_ASSERT | ( | I, | ||
J, | ||||
K, | ||||
L, | ||||
M, | ||||
N, | ||||
O, | ||||
X | ||||
) |
do { \ if (!(X)) { BloombergLP::bsls:: \ BslTestUtil::callDebugprint(I, #I ": ", "\t"); \ BloombergLP::bsls:: \ BslTestUtil::callDebugprint(J, #J ": ", "\t"); \ BloombergLP::bsls:: \ BslTestUtil::callDebugprint(K, #K ": ", "\t"); \ BloombergLP::bsls:: \ BslTestUtil::callDebugprint(L, #L ": ", "\t"); \ BloombergLP::bsls:: \ BslTestUtil::callDebugprint(M, #M ": ", "\t"); \ BloombergLP::bsls:: \ BslTestUtil::callDebugprint(N, #N ": ", "\t"); \ BloombergLP::bsls:: \ BslTestUtil::callDebugprint(O, #O ": ", "\n"); \ aSsErT(true, #X, __LINE__); } } while (false)
#define BSLS_BSLTESTUTIL_LOOP8_ASSERT | ( | I, | ||
J, | ||||
K, | ||||
L, | ||||
M, | ||||
N, | ||||
O, | ||||
V, | ||||
X | ||||
) |
do { \ if (!(X)) { BloombergLP::bsls:: \ BslTestUtil::callDebugprint(I, #I ": ", "\t"); \ BloombergLP::bsls:: \ BslTestUtil::callDebugprint(J, #J ": ", "\t"); \ BloombergLP::bsls:: \ BslTestUtil::callDebugprint(K, #K ": ", "\t"); \ BloombergLP::bsls:: \ BslTestUtil::callDebugprint(L, #L ": ", "\t"); \ BloombergLP::bsls:: \ BslTestUtil::callDebugprint(M, #M ": ", "\t"); \ BloombergLP::bsls:: \ BslTestUtil::callDebugprint(N, #N ": ", "\t"); \ BloombergLP::bsls:: \ BslTestUtil::callDebugprint(O, #O ": ", "\t"); \ BloombergLP::bsls:: \ BslTestUtil::callDebugprint(V, #V ": ", "\n"); \ aSsErT(true, #X, __LINE__); } } while (false)
#define BSLS_BSLTESTUTIL_EXPAND | ( | X | ) | X |
#define BSLS_BSLTESTUTIL_NUM_ARGS_IMPL | ( | X8, | ||
X7, | ||||
X6, | ||||
X5, | ||||
X4, | ||||
X3, | ||||
X2, | ||||
X1, | ||||
X0, | ||||
N, | ||||
... | ||||
) | N |
#define BSLS_BSLTESTUTIL_NUM_ARGS | ( | ... | ) |
BSLS_BSLTESTUTIL_EXPAND(BSLS_BSLTESTUTIL_NUM_ARGS_IMPL( \ __VA_ARGS__, 8, 7, 6, 5, 4, 3, 2, 1, 0, ""))
#define BSLS_BSLTESTUTIL_LOOPN_ASSERT_IMPL | ( | N, | ||
... | ||||
) | BSLS_BSLTESTUTIL_EXPAND(BSLS_BSLTESTUTIL_LOOP ## N ## _ASSERT(__VA_ARGS__)) |
#define BSLS_BSLTESTUTIL_LOOPN_ASSERT | ( | N, | ||
... | ||||
) | BSLS_BSLTESTUTIL_LOOPN_ASSERT_IMPL(N, __VA_ARGS__) |
#define BSLS_BSLTESTUTIL_ASSERTV | ( | ... | ) |
BSLS_BSLTESTUTIL_LOOPN_ASSERT( \ BSLS_BSLTESTUTIL_NUM_ARGS(__VA_ARGS__), __VA_ARGS__)
#define BSLS_BSLTESTUTIL_Q | ( | X | ) |
BloombergLP::bsls:: \ BslTestUtil::printStringNoFlush("<| " #X " |>\n");
#define BSLS_BSLTESTUTIL_P | ( | X | ) |
BloombergLP::bsls:: \ BslTestUtil::callDebugprint(X, #X " = ", "\n");
#define BSLS_BSLTESTUTIL_P_ | ( | X | ) |
BloombergLP::bsls:: \ BslTestUtil::callDebugprint(X, #X " = ", ", ");
#define BSLS_BSLTESTUTIL_L_ __LINE__ |
#define BSLS_BSLTESTUTIL_T_ BloombergLP::bsls::BslTestUtil::printTab(); |
#define BSLS_BSLTESTUTIL_FORMAT_ZU "%zu" |
Provide a platform-independent way to specify a size_t
format for printf
.
#define BSLS_BSLTESTUTIL_FORMAT_TD "%td" |
Provide a platform-independent way to specify a ptrdiff_t
format for printf
.
#define BSLS_BSLTESTUTIL_FORMAT_I64 "%lld" |
Provide a platform-independent way to specify a signed 64-bit integer format for printf
.
#define BSLS_BSLTESTUTIL_FORMAT_U64 "%llu" |
Provide a platform-independent way to specify an unsigned 64-bit integer format for printf
.
#define BSLS_BSLTESTUTIL_FORMAT_PTR "%X" |
Provide a platform-independent way to specify a uintptr_t
integer format for printf
.