add test for timedelta

This commit is contained in:
Thomas Fussell 2015-11-22 00:33:56 -05:00
parent 9c6b0d8d4e
commit d749c563e5

View File

@ -0,0 +1,17 @@
#pragma once
#include <cxxtest/TestSuite.h>
class test_timedelta : public CxxTest::TestSuite
{
public:
void test_from_number()
{
auto td = xlnt::timedelta::from_number(1.0);
TS_ASSERT(td.days == 1);
TS_ASSERT(td.hours == 0);
TS_ASSERT(td.minutes == 0);
TS_ASSERT(td.seconds == 0);
TS_ASSERT(td.microseconds == 0);
}
};