Files
textmate/Frameworks/plist/tests/t_date.cc
Allan Odgaard 9894969e67 Initial commit
2012-08-09 16:25:56 +02:00

23 lines
509 B
C++

#include <plist/date.h>
class DateTests : public CxxTest::TestSuite
{
public:
void test_date_value ()
{
oak::date_t now = oak::date_t::now();
oak::date_t stillNow(now.time_value());
TS_ASSERT_DELTA(now.value(), stillNow.value(), 0.5);
}
void test_date_time_value ()
{
oak::date_t now = oak::date_t(time(NULL));
oak::date_t stillNow(now.value());
TS_ASSERT_EQUALS(now.value(), stillNow.value());
stillNow = oak::date_t(to_s(now));
TS_ASSERT_EQUALS(now.value(), stillNow.value());
}
};