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

Function Y_UNIT_TEST

library/cpp/digest/md5/md5_ut.cpp:9–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7
8Y_UNIT_TEST_SUITE(TMD5Test) {
9 Y_UNIT_TEST(TestMD5) {
10 // echo -n 'qwertyuiopqwertyuiopasdfghjklasdfghjkl' | md5sum
11 constexpr const char* b = "qwertyuiopqwertyuiopasdfghjklasdfghjkl";
12
13 MD5 r;
14 r.Update((const unsigned char*)b, 15);
15 r.Update((const unsigned char*)b + 15, strlen(b) - 15);
16
17 char rs[33];
18 TString s(r.End(rs));
19 s.to_lower();
20
21 UNIT_ASSERT_NO_DIFF(s, TStringBuf("3ac00dd696b966fd74deee3c35a59d8f"));
22
23 TString result = r.Calc(TStringBuf(b));
24 result.to_lower();
25 UNIT_ASSERT_NO_DIFF(result, TStringBuf("3ac00dd696b966fd74deee3c35a59d8f"));
26 }
27
28 Y_UNIT_TEST(TestFile) {
29 TString s = NUnitTest::RandomString(1000000, 1);

Callers

nothing calls this directly

Calls 9

FileFunction · 0.50
DataClass · 0.50
UpdateMethod · 0.45
EndMethod · 0.45
to_lowerMethod · 0.45
CalcMethod · 0.45
WriteMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected