mirror of
https://gitee.com/zlgopen/awtk.git
synced 2024-11-30 19:18:53 +08:00
17 lines
357 B
C++
17 lines
357 B
C++
#include "gtest/gtest.h"
|
|
#include "base/date_time_format.h"
|
|
|
|
TEST(DateTimeFormat, basic) {
|
|
str_t s;
|
|
wstr_t str;
|
|
str_init(&s, 0);
|
|
wstr_init(&str, 0);
|
|
wstr_format_time(&str, "YY-MM-DD", 0);
|
|
|
|
str_from_wstr(&s, str.str);
|
|
ASSERT_EQ(strcmp(s.str, "70-01-01") == 0 || strcmp(s.str, "69-12-31") == 0, true);
|
|
|
|
str_reset(&s);
|
|
wstr_reset(&str);
|
|
}
|