<commit_before>//  IBM_PROLOG_BEGIN_TAG
//  This is an automatically generated prolog.
//
//  $Source: src/usr/diag/prdf/test/prdfTest.H $
//
//  IBM CONFIDENTIAL
//
//  COPYRIGHT International Business Machines Corp. 2012
//
//  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_PRDFTEST_H
#define __TEST_PRDFTEST_H

/**
 *  @file prdfTest.H
 *
 *  @brief prdf unit test
 */

#include <cxxtest/TestSuite.H>
#include <prdfTrace.H>
#include <prdf_proto.H>
#include <errl/errlentry.H>
#include <errl/errlmanager.H>


class prdfTest: public CxxTest::TestSuite
{
  public:

    void testTrace(void)
    {
        TS_TRACE(ENTER_MRK __FUNCTION__);

        PRDF_ENTER( "%s", __FUNCTION__  );

        const char * l_testStr = "running testTrace";
        uint64_t l_testHex = 0xDEADBEEF;
        uint64_t l_testDec = 99;
        PRDF_INF( "testTrace() %s - testHex=0x%08X, testDec=%d", l_testStr, l_testHex, l_testDec );

        uint64_t l_chip = 0xFFFFFFFF;
        uint64_t l_sig = 0x12345678;
        PRDF_SIG( "%08X %08X", l_chip, l_sig);

        PRDF_ERR( "testTrace() Please ignore this error trace 0x%08X", l_testHex );

        PRDF_EXIT( "%s", __FUNCTION__ );

        PRDF_DENTER( "testTrace()" );

        PRDF_DINF( "testTrace() running testTrace" );

        PRDF_DEXIT( "testTrace()" );

        TS_TRACE(EXIT_MRK __FUNCTION__);
    }

    void testPrdInitialize(void)
    {
        using namespace PRDF;
        TS_TRACE(ENTER_MRK __FUNCTION__);
        PRDF_ENTER( "testPrdInitialize()" );

        errlHndl_t l_pErr = NULL;
        l_pErr = PrdInitialize();

        if (l_pErr)
        {
            PRDF_ERR( "testPrdInitialize(): PrdInitialize returned error" );
            TS_FAIL("testPrdInitialize(): PrdInitialize returned error");
            errlCommit(l_pErr,PRDF_COMP_ID);
        }
        else
        {
            PRDF_INF( "testPrdInitialize(): PrdInitialize completed with no error" );
            TS_TRACE(INFO_MRK "testPrdInitialize(): PrdInitialize completed with no error");
        }

        PRDF_EXIT( "testPrdInitialize()" );
        TS_TRACE(EXIT_MRK __FUNCTION__);
    }

    void testPrdMain(void)
    {
        using namespace PRDF;
        TS_TRACE(ENTER_MRK __FUNCTION__);
        PRDF_ENTER( "testPrdMain()" );

        errlHndl_t l_pErr = NULL;
        //l_pErr = PrdMain();

        if (l_pErr)
        {
            PRDF_ERR( "testPrdMain(): PrdMain returned error" );
            TS_FAIL("testPrdMain(): PrdMain returned error");
            errlCommit(l_pErr,PRDF_COMP_ID);
        }
        else
        {
            PRDF_INF( "testPrdMain(): PrdMain completed with no error" );
            TS_TRACE(INFO_MRK "testPrdMain(): PrdMain completed with no error");
        }

        PRDF_EXIT( "testPrdMain()" );
        TS_TRACE(EXIT_MRK __FUNCTION__);
    }

    void testPrdIplCleanup(void)
    {
        using namespace PRDF;
        TS_TRACE(ENTER_MRK __FUNCTION__);
        PRDF_ENTER( "testPrdIplCleanup()" );

        PrdIplCleanup();

        PRDF_EXIT( "testPrdIplCleanup()" );
        TS_TRACE(EXIT_MRK __FUNCTION__);
    }

};

#endif
<commit_msg>Fix __FUNCTION__ error in TS_TRACE<commit_after>//  IBM_PROLOG_BEGIN_TAG
//  This is an automatically generated prolog.
//
//  $Source: src/usr/diag/prdf/test/prdfTest.H $
//
//  IBM CONFIDENTIAL
//
//  COPYRIGHT International Business Machines Corp. 2012
//
//  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_PRDFTEST_H
#define __TEST_PRDFTEST_H

/**
 *  @file prdfTest.H
 *
 *  @brief prdf unit test
 */

#include <cxxtest/TestSuite.H>
#include <prdfTrace.H>
#include <prdf_proto.H>
#include <errl/errlentry.H>
#include <errl/errlmanager.H>


class prdfTest: public CxxTest::TestSuite
{
  public:

    void testTrace(void)
    {
        TS_TRACE(ENTER_MRK "testTrace()");

        PRDF_ENTER( "testTrace()" );

        const char * l_testStr = "running testTrace";
        uint64_t l_testHex = 0xDEADBEEF;
        uint64_t l_testDec = 99;
        PRDF_INF( "testTrace() %s - testHex=0x%08X, testDec=%d", l_testStr, l_testHex, l_testDec );

        uint64_t l_chip = 0xFFFFFFFF;
        uint64_t l_sig = 0x12345678;
        PRDF_SIG( "%08X %08X", l_chip, l_sig);

        PRDF_ERR( "testTrace() Please ignore this error trace 0x%08X", l_testHex );

        PRDF_DENTER( "testTrace()" );

        PRDF_DINF( "testTrace() running testTrace" );

        PRDF_DEXIT( "testTrace()" );

        PRDF_EXIT( "testTrace()" );

        TS_TRACE(EXIT_MRK "testTrace()");
    }

    void testPrdInitialize(void)
    {
        using namespace PRDF;
        TS_TRACE(ENTER_MRK "testPrdInitialize()");
        PRDF_ENTER( "testPrdInitialize()" );

        errlHndl_t l_pErr = NULL;
        l_pErr = PrdInitialize();

        if (l_pErr)
        {
            PRDF_ERR( "testPrdInitialize(): PrdInitialize returned error" );
            TS_FAIL("testPrdInitialize(): PrdInitialize returned error");
            errlCommit(l_pErr,PRDF_COMP_ID);
        }
        else
        {
            PRDF_INF( "testPrdInitialize(): PrdInitialize completed with no error" );
            TS_TRACE(INFO_MRK "testPrdInitialize(): PrdInitialize completed with no error");
        }

        PRDF_EXIT( "testPrdInitialize()" );
        TS_TRACE(EXIT_MRK "testPrdInitialize()");
    }

    void testPrdMain(void)
    {
        using namespace PRDF;
        TS_TRACE(ENTER_MRK "testPrdMain()");
        PRDF_ENTER( "testPrdMain()" );

        errlHndl_t l_pErr = NULL;
        //l_pErr = PrdMain();

        if (l_pErr)
        {
            PRDF_ERR( "testPrdMain(): PrdMain returned error" );
            TS_FAIL("testPrdMain(): PrdMain returned error");
            errlCommit(l_pErr,PRDF_COMP_ID);
        }
        else
        {
            PRDF_INF( "testPrdMain(): PrdMain completed with no error" );
            TS_TRACE(INFO_MRK "testPrdMain(): PrdMain completed with no error");
        }

        PRDF_EXIT( "testPrdMain()" );
        TS_TRACE(EXIT_MRK "testPrdMain()");
    }

    void testPrdIplCleanup(void)
    {
        using namespace PRDF;
        TS_TRACE(ENTER_MRK "testPrdIplCleanup()");
        PRDF_ENTER( "testPrdIplCleanup()" );

        PrdIplCleanup();

        PRDF_EXIT( "testPrdIplCleanup()" );
        TS_TRACE(EXIT_MRK "testPrdIplCleanup()");
    }

};

#endif

{'fraction_non_alphanumeric': 0.11419485400404741, 'fraction_numerical': 0.010985834056085574, 'mean_word_length': 2.4803822937625752, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7537443', 'n_tokens_mistral': 2503, 'n_tokens_neox': 2399, 'n_words': 512}