Пример #1
0
        //============================================================
        // Test Suite: resetTest()
        //============================================================
        //
        // Test will check the reset method.
        //
        //============================================================
        int resetTest( void )
        {
            TestUtil testFramework( "CommonTime", "reset" , __FILE__, __LINE__ );

            CommonTime Compare; Compare.set(1000,200,0.2); // Initialize with value
            long day, sod;
            double fsod;
            Compare.reset(); // Reset it
            Compare.get(day,sod,fsod);

            testFramework.assert( TimeSystem(0) == Compare.getTimeSystem(), "Was the time system reset to expectation?", __LINE__  );
            testFramework.assert( 0 == day,  "Was the day value reset to expectation?",  __LINE__ );
            testFramework.assert( 0 == sod,  "Was the sod value reset to expectation?",  __LINE__ );
            testFramework.assert( 0 == fsod, "Was the fsod value reset to expectation?", __LINE__ );

            return testFramework.countFails();
        }