text
stringlengths 0
2.2M
|
---|
#define Q BSLIM_TESTUTIL_Q // Quote identifier literally.
|
#define P BSLIM_TESTUTIL_P // Print identifier and value.
|
#define P_ BSLIM_TESTUTIL_P_ // P(X) without '\n'.
|
#define T_ BSLIM_TESTUTIL_T_ // Print a tab (w/o newline).
|
#define L_ BSLIM_TESTUTIL_L_ // current Line number
|
// ============================================================================
|
// GLOBAL TYPEDEFS/CONSTANTS FOR TESTING
|
// ----------------------------------------------------------------------------
|
// ============================================================================
|
// MAIN PROGRAM
|
// ----------------------------------------------------------------------------
|
int main(int argc, char* argv[])
|
{
|
int test = argc > 1 ? atoi(argv[1]) : 0;
|
int verbose = argc > 2;
|
int veryVerbose = argc > 3;
|
int veryVeryVerbose = argc > 4;
|
(void) veryVerbose;
|
(void) veryVeryVerbose;
|
_IDEC_flags flags;
|
cout << "TEST " << __FILE__ << " CASE " << test << endl;;
|
switch (test) { case 0:
|
case 4: {
|
// --------------------------------------------------------------------
|
// MACRO CLEAN ENVIRONMENT
|
//
|
// Concerns:
|
//: 1 The various macros used in configuring, tuning, and compiling the
|
//: Intel DFP headers are disabled after inclusion.
|
//
|
// Plan:
|
//: 1 Follow a pattern of '#ifdef <MACRO>',
|
//: 'ASSERT(false && "<MACRO> still declared");', and '#endif' in
|
//: confirming that each macro is disabled. (C-1)
|
//
|
// Testing:
|
// Macro clean environment
|
// --------------------------------------------------------------------
|
if (verbose) cout << std::endl
|
<< "MACRO CLEAN ENVIRONMENT" << std::endl
|
<< "=======================" << std::endl;
|
#ifdef DECIMAL_CALL_BY_REFERENCE
|
ASSERT(false && "DECIMAL_CALL_BY_REFERENCE still declared");
|
#endif
|
#ifdef DECIMAL_GLOBAL_ROUNDING
|
ASSERT(false && "DECIMAL_GLOBAL_ROUNDING still declared");
|
#endif
|
#ifdef DECIMAL_GLOBAL_EXCEPTION_FLAGS
|
ASSERT(false && "DECIMAL_GLOBAL_EXCEPTION_FLAGS still declared");
|
#endif
|
#ifdef BDLDFP_INTELIMPWRAPPER_FAKE_DEFINE_LINUX
|
ASSERT(false &&
|
"BDLDFP_INTELIMPWRAPPER_FAKE_DEFINE_LINUX still declared");
|
#endif
|
// The Intel library was defining some constants that we do not want
|
// polluting our global namespace. We must test that those constants
|
// are no longer '#define'ed.
|
#ifdef P7
|
ASSERT(false && "P7 still declared");
|
#endif
|
#ifdef P16
|
ASSERT(false && "P16 still declared");
|
#endif
|
#ifdef P34
|
ASSERT(false && "P34 still declared");
|
#endif
|
#ifndef BID_BIG_ENDIAN
|
ASSERT(false && "BID_BIG_ENDIAN setting for Intel was not defined.");
|
#else
|
# ifdef BSLS_PLATFORM_IS_BIG_ENDIAN
|
const bool big_endian = true;
|
# elif defined(BSLS_PLATFORM_IS_LITTLE_ENDIAN)
|
const bool big_endian = false;
|
# else
|
ASSERT(false &&
|
"One of big or little endian should have been available"
|
" in bsls_platform");
|
const bool big_endian = false;
|
# endif
|
ASSERT(BID_BIG_ENDIAN == big_endian
|
&& "BID_BIG_ENDIAN was not set to the correct setting");
|
#endif
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.