text
stringlengths 0
2.2M
|
---|
// ============================================================================
|
// STANDARD BSL ASSERT TEST FUNCTION
|
// ----------------------------------------------------------------------------
|
namespace {
|
int testStatus = 0;
|
void aSsErT(bool condition, const char *message, int line)
|
{
|
if (condition) {
|
printf("Error " __FILE__ "(%d): %s (failed)\n", line, message);
|
if (0 <= testStatus && testStatus <= 100) {
|
++testStatus;
|
}
|
}
|
}
|
} // close unnamed namespace
|
// ============================================================================
|
// STANDARD BSL TEST DRIVER MACRO ABBREVIATIONS
|
// ----------------------------------------------------------------------------
|
#define ASSERT BSLS_BSLTESTUTIL_ASSERT
|
#define ASSERTV BSLS_BSLTESTUTIL_ASSERTV
|
#define LOOP_ASSERT BSLS_BSLTESTUTIL_LOOP_ASSERT
|
#define LOOP0_ASSERT BSLS_BSLTESTUTIL_LOOP0_ASSERT
|
#define LOOP1_ASSERT BSLS_BSLTESTUTIL_LOOP1_ASSERT
|
#define LOOP2_ASSERT BSLS_BSLTESTUTIL_LOOP2_ASSERT
|
#define LOOP3_ASSERT BSLS_BSLTESTUTIL_LOOP3_ASSERT
|
#define LOOP4_ASSERT BSLS_BSLTESTUTIL_LOOP4_ASSERT
|
#define LOOP5_ASSERT BSLS_BSLTESTUTIL_LOOP5_ASSERT
|
#define LOOP6_ASSERT BSLS_BSLTESTUTIL_LOOP6_ASSERT
|
#define Q BSLS_BSLTESTUTIL_Q // Quote identifier literally.
|
#define P BSLS_BSLTESTUTIL_P // Print identifier and value.
|
#define P_ BSLS_BSLTESTUTIL_P_ // P(X) without '\n'.
|
#define T_ BSLS_BSLTESTUTIL_T_ // Print a tab (w/o newline).
|
#define L_ BSLS_BSLTESTUTIL_L_ // current Line number
|
#define STRINGIFY2(...) "" #__VA_ARGS__
|
#define STRINGIFY(a) STRINGIFY2(a)
|
// ============================================================================
|
// GLOBAL TYPEDEFS/CONSTANTS FOR TESTING
|
// ----------------------------------------------------------------------------
|
// Global constants for testing invariants
|
static const bool u_BSLS_COMPILERFEATURES_SUPPORT_VARIADIC_TEMPLATES_defined =
|
#if defined(BSLS_COMPILERFEATURES_SUPPORT_VARIADIC_TEMPLATES)
|
true;
|
#else
|
false;
|
#endif
|
static const bool u_BSLS_COMPILERFEATURES_SUPPORT_ALIAS_TEMPLATES_defined =
|
#if defined(BSLS_COMPILERFEATURES_SUPPORT_ALIAS_TEMPLATES)
|
true;
|
#else
|
false;
|
#endif
|
static const bool u_BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES_defined =
|
#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES)
|
true;
|
#else
|
false;
|
#endif
|
static const bool u_BSLS_LIBRARYFEATURES_HAS_CPP17_BOOL_CONSTANT_defined =
|
#if defined(BSLS_LIBRARYFEATURES_HAS_CPP17_BOOL_CONSTANT)
|
true;
|
#else
|
false;
|
#endif
|
static const bool u_BSLS_LIBRARYFEATURES_HAS_CPP11_RANGE_FUNCTIONS =
|
#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_RANGE_FUNCTIONS)
|
true;
|
#else
|
false;
|
#endif
|
static const bool u_BSLS_LIBRARYFEATURES_HAS_CPP14_INTEGER_SEQUENCE_defined =
|
#if defined(BSLS_LIBRARYFEATURES_HAS_CPP14_INTEGER_SEQUENCE)
|
true;
|
#else
|
false;
|
#endif
|
static const bool u_BSLS_LIBRARYFEATURES_HAS_CPP17_BASELINE_LIBRARY_defined =
|
#if defined(BSLS_LIBRARYFEATURES_HAS_CPP17_BASELINE_LIBRARY)
|
true;
|
#else
|
false;
|
#endif
|
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.