test/chess_clock_test.cpp
TEST_F(ChessClockTester, Duration) {
    using namespace std::chrono_literals;
    cc.start();
    std::this_thread::sleep_for(2s);
    cc.stop();
    EXPECT_NEAR(cc.duration() * 1e-9, 2.0, ERROR);
}
/**
 * Tests that the duration() function returns the expected number of nanoseconds
 */
Tests that the duration() function returns the expected number of nanoseconds
Tests that the duration () function returns the expected number of nanoseconds
TEST_F(ChessClockTester, Duration) {
    using namespace std::chrono_literals;
    cc.start();
    std::this_thread::sleep_for(2s);
    cc.stop();
    EXPECT_NEAR(cc.duration() * 1e-9, 2.0, ERROR);
}
TEST_F ( ChessClockTester , Duration ) { using namespace std :: chrono_literals ; cc . start ( ) ; std :: this_thread :: sleep_for ( 2 s ) ; cc . stop ( ) ; EXPECT_NEAR ( cc . duration ( ) * 1e-9 , 2.0 , ERROR ) ; }
Tests that the duration() function returns the expected number of nanoseconds
Tests that the duration () function returns the expected number of nanoseconds