mirror of
https://github.com/tfussell/xlnt.git
synced 2024-03-22 13:11:17 +08:00
add test for timedelta
This commit is contained in:
parent
9c6b0d8d4e
commit
d749c563e5
17
source/utils/tests/test_timedelta.hpp
Normal file
17
source/utils/tests/test_timedelta.hpp
Normal 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);
|
||||
}
|
||||
};
|
Loading…
Reference in New Issue
Block a user