//---------------------------------------------------------------------------// // Test the error code check. TEUCHOS_UNIT_TEST( DataTransferKitException, errorcode_test_2 ) { int value = 0; try { DTK_CHECK_ERROR_CODE( error_code_function(value) ); TEST_EQUALITY( value, 1 ); } catch( ... ) { TEST_ASSERT( 0 ); } }
//---------------------------------------------------------------------------// // Test the error code check. TEUCHOS_UNIT_TEST( Assertion, errorcode_test_2 ) { int value = 0; try { MCLS_CHECK_ERROR_CODE( error_code_function(value) ); TEST_EQUALITY( value, 1 ); } catch( ... ) { TEST_ASSERT( 0 ); } }
//---------------------------------------------------------------------------// // Test the error code check. TEUCHOS_UNIT_TEST( DataTransferKitException, errorcode_test_1 ) { int value = 1; try { DTK_CHECK_ERROR_CODE( error_code_function(value) ); TEST_EQUALITY( value, 2 ); } catch( const DataTransferKit::DataTransferKitException& assertion ) { #if HAVE_DTK_DBC TEST_EQUALITY( value, 2 ); #else TEST_ASSERT( 0 ); #endif } catch( ... ) { TEST_ASSERT( 0 ); } }
//---------------------------------------------------------------------------// // Test the error code check. TEUCHOS_UNIT_TEST( Assertion, errorcode_test_1 ) { int value = 1; try { MCLS_CHECK_ERROR_CODE( error_code_function(value) ); TEST_EQUALITY( value, 2 ); } catch( const MCLS::Assertion& assertion ) { #if HAVE_MCLS_DBC TEST_EQUALITY( value, 2 ); #else TEST_ASSERT( 0 ); #endif } catch( ... ) { TEST_ASSERT( 0 ); } }