awtk/tests/date_time_format_test.cc

11 lines
284 B
C++
Raw Normal View History

2020-01-12 10:24:50 +08:00
#include "gtest/gtest.h"
#include "base/date_time_format.h"
TEST(DateTimeFormat, basic) {
wstr_t str;
wstr_init(&str, 0);
wstr_format_time(&str, "YY-MM-DD", 0);
2020-01-14 16:35:19 +08:00
ASSERT_EQ(wcscmp(str.str, L"70-01-01") == 0 || wcscmp(str.str, L"69-12-31") == 0, true);
2020-01-12 10:24:50 +08:00
wstr_reset(&str);
}