// IBM_PROLOG_BEGIN_TAG // This is an automatically generated prolog. // // $Source: src/usr/errl/test/errluserdetailtest.H $ // // IBM CONFIDENTIAL // // COPYRIGHT International Business Machines Corp. 2011 // // p1 // // Object Code Only (OCO) source materials // Licensed Internal Code Source Materials // IBM HostBoot Licensed Internal Code // // The source code for this program is not published or other- // wise divested of its trade secrets, irrespective of what has // been deposited with the U.S. Copyright Office. // // Origin: 30 // // IBM_PROLOG_END #ifndef __TEST_ERRLUSERDETAILSTEST_H #define __TEST_USERUSERDETAILSTEST_H /** * @file errluserdetailstest.H * * @brief Test user data plugins for errorlog. * */ #include #include #include #include #include using namespace ERRORLOG; class UtilErrlUsrDataTest: public CxxTest::TestSuite { public: // Note that errlUserDetailsTarget is tested in the targeting unit test /** * @test testString - Capture a String in an error log */ void testString(void) { errlHndl_t l_errl = NULL; TS_TRACE( "testString errorlog user detail data"); /*@ * @errortype * @severity ERRORLOG_SEV_INFORMATIONAL * @moduleid HBERRL_USERDATA_TEST_MOD_ID * @reasoncode HBERRL_TEST_STRING_UD * @userdata1 Test data 1 * @userdata2 Test data 2 * @devdesc User Details unit test - create string user detail data */ l_errl = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_INFORMATIONAL, HBERRL_USERDATA_TEST_MOD_ID, HBERRL_TEST_STRING_UD, 0x1234567890, // user1 0x9876543210 ); // user2 // Create a test string and add it to the error log as user detail data const char * l_pString = "This is a test string"; ErrlUserDetailsString(l_pString).addToLog(l_errl); // commit the errorlog errlCommit(l_errl, CXXTEST_COMP_ID); } }; #endif