Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

TestCaseNullProfile_1.cpp

00001 // 00002 // Copyright 2004 P&P Software GmbH - All Rights Reserved 00003 // 00004 // TestCaseNullProfile_1.cpp 00005 // 00006 // Version 1.0 00007 // Date 01.10.03 00008 // Author R. Totaro 00009 00010 #include "../GeneralInclude/CompilerSwitches.h" 00011 #include "../GeneralInclude/ClassId.h" 00012 #include "../FDIR/DC_NullProfile.h" 00013 #include "TestCaseNullProfile_1.h" 00014 00015 TestCaseNullProfile_1::TestCaseNullProfile_1(void) : 00016 TestCaseGenericSetUp(ID_NULLPROFILE*10+1,"TestCaseNullProfile_1") { 00017 return; 00018 } 00019 00020 void TestCaseNullProfile_1::runTestCase(void) { 00021 DC_NullProfile *pNP =new DC_NullProfile; 00022 const unsigned int iterations=100; 00023 00024 // Check the value of the class identifier 00025 if (pNP->getClassId()!=ID_NULLPROFILE ) { 00026 setTestResult(TEST_FAILURE,"Wrong class identifier"); 00027 return; 00028 } 00029 00030 for (TD_Integer i=0;i<iterations;i++) { 00031 TD_Float fVal=(TD_Float)0.1*i; 00032 TD_Integer iVal=(TD_Integer)12*i; 00033 00034 if (pNP->deviatesFromProfile(fVal)) { 00035 setTestResult(TEST_FAILURE,"deviatesFromProfile(TD_Float) failed"); 00036 return; 00037 } 00038 00039 if (pNP->deviatesFromProfile(iVal)) { 00040 setTestResult(TEST_FAILURE,"deviatesFromProfile(TD_Integer) failed"); 00041 return; 00042 } 00043 } 00044 00045 // Do dummy call to reset 00046 pNP->reset(); 00047 00048 setTestResult(TEST_SUCCESS,"Test Successful"); 00049 return; 00050 }
Copyright 2003 P&P Software GmbH - All Rights Reserved