From d749c563e528f9d988417c4e2f992388af4fdf84 Mon Sep 17 00:00:00 2001 From: Thomas Fussell Date: Sun, 22 Nov 2015 00:33:56 -0500 Subject: [PATCH] add test for timedelta --- source/utils/tests/test_timedelta.hpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 source/utils/tests/test_timedelta.hpp diff --git a/source/utils/tests/test_timedelta.hpp b/source/utils/tests/test_timedelta.hpp new file mode 100644 index 00000000..88858c75 --- /dev/null +++ b/source/utils/tests/test_timedelta.hpp @@ -0,0 +1,17 @@ +#pragma once + +#include + +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); + } +};