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

Function Y_UNIT_TEST

library/cpp/digest/md5/md5_medium_ut.cpp:6–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4
5Y_UNIT_TEST_SUITE(TMD5MediumTest) {
6 Y_UNIT_TEST(TestOverflow) {
7 if (sizeof(size_t) > sizeof(unsigned int)) {
8 const size_t maxUi32 = (size_t)Max<unsigned int>();
9 TArrayHolder<char> buf(new char[maxUi32]);
10
11 memset(buf.Get(), 0, maxUi32);
12
13 MD5 r;
14 for (int i = 0; i < 5; ++i) {
15 r.Update(buf.Get(), maxUi32);
16 }
17
18 char rs[33];
19 TString s(r.End(rs));
20 s.to_lower();
21
22 UNIT_ASSERT_VALUES_EQUAL(s, "34a5a7ed4f0221310084e21a1e599659");
23 }
24 }
25}

Callers

nothing calls this directly

Calls 4

GetMethod · 0.45
UpdateMethod · 0.45
EndMethod · 0.45
to_lowerMethod · 0.45

Tested by

no test coverage detected