MCPcopy Create free account
hub / github.com/catboost/catboost / Y_UNIT_TEST

Function Y_UNIT_TEST

util/datetime/base_ut.cpp:51–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49
50Y_UNIT_TEST_SUITE(TestSprintDate) {
51 Y_UNIT_TEST(Year9999) {
52 struct tm t;
53 t.tm_year = 9999 - 1900;
54 t.tm_mday = 1;
55 t.tm_mon = 10;
56
57 char buf[DATE_BUF_LEN];
58 DateToString(buf, t);
59
60 TString expectedDate = "99991101";
61
62 UNIT_ASSERT_VALUES_EQUAL(expectedDate, ToString(buf));
63 }
64 Y_UNIT_TEST(YearAfter9999) {
65 struct tm t;
66 t.tm_year = 123456 - 1900;

Callers

nothing calls this directly

Calls 15

DateToStringFunction · 0.85
YearToStringFunction · 0.85
OldDate8601Function · 0.85
sprint_date8601Function · 0.85
millisecFunction · 0.85
MicroSecondsFunction · 0.85
gettimeofdayFunction · 0.85
usleepFunction · 0.85
gmtime_rFunction · 0.85
CompareTMFunction · 0.85
ZeroFunction · 0.85
StrFunction · 0.85

Tested by

no test coverage detected