|
8 | 8 |
|
9 | 9 | BOOST_AUTO_TEST_CASE(Fixed_Cases) |
10 | 10 | { |
11 | | - BOOST_TEST_REQUIRE(s25util::md5("").toString() == "d41d8cd98f00b204e9800998ecf8427e"); |
12 | | - BOOST_TEST_REQUIRE(s25util::md5("Test").toString() == "0cbc6611f5540bd0809a388dc95a615b"); |
13 | | - BOOST_TEST_REQUIRE(s25util::md5("SomeVeryLongInputSomeVeryLongInputSomeVeryLongInputSomeVeryLongInputSomeVeryLongIn" |
14 | | - "putSomeVeryLongInputSomeVeryLongInput") |
15 | | - .toString() |
16 | | - == "4f5586fbeb407ffd0d5e23762167ac67"); |
17 | | - BOOST_TEST_REQUIRE(s25util::md5("64CharsOfInput56789012345678901234567890123456789012345678901234").toString() |
18 | | - == "c123841d524187153dd686e0f87bde7d"); |
19 | | - BOOST_TEST_REQUIRE(s25util::md5("64CharsOfInput5678901234567890123456789012345678901234567890123464CharsOfInput5678" |
20 | | - "9012345678901234567890123456789012345678901234") |
21 | | - .toString() |
22 | | - == "65a5f6c7d0925bcaad324108046a5644"); |
| 11 | + BOOST_TEST(s25util::md5("").toString() == "d41d8cd98f00b204e9800998ecf8427e"); |
| 12 | + BOOST_TEST(s25util::md5("Test").toString() == "0cbc6611f5540bd0809a388dc95a615b"); |
| 13 | + BOOST_TEST(s25util::md5("SomeVeryLongInputSomeVeryLongInputSomeVeryLongInputSomeVeryLongInputSomeVeryLongIn" |
| 14 | + "putSomeVeryLongInputSomeVeryLongInput") |
| 15 | + .toString() |
| 16 | + == "4f5586fbeb407ffd0d5e23762167ac67"); |
| 17 | + BOOST_TEST(s25util::md5("64CharsOfInput56789012345678901234567890123456789012345678901234").toString() |
| 18 | + == "c123841d524187153dd686e0f87bde7d"); |
| 19 | + BOOST_TEST(s25util::md5("64CharsOfInput5678901234567890123456789012345678901234567890123464CharsOfInput5678" |
| 20 | + "9012345678901234567890123456789012345678901234") |
| 21 | + .toString() |
| 22 | + == "65a5f6c7d0925bcaad324108046a5644"); |
23 | 23 | } |
24 | 24 |
|
25 | 25 | BOOST_AUTO_TEST_CASE(StreamOp) |
26 | 26 | { |
27 | 27 | std::stringstream ss; |
28 | 28 | ss << s25util::md5("Test"); |
29 | | - BOOST_TEST_REQUIRE(ss.str() == "0cbc6611f5540bd0809a388dc95a615b"); |
| 29 | + BOOST_TEST(ss.str() == "0cbc6611f5540bd0809a388dc95a615b"); |
30 | 30 | } |
31 | 31 |
|
32 | 32 | BOOST_AUTO_TEST_CASE(ProcessAdd) |
33 | 33 | { |
34 | 34 | s25util::md5 inst1(""); |
35 | 35 | inst1.process("Test", true); |
36 | | - BOOST_TEST_REQUIRE(inst1.toString() == s25util::md5("Test").toString()); |
| 36 | + BOOST_TEST(inst1.toString() == s25util::md5("Test").toString()); |
37 | 37 |
|
38 | 38 | inst1 = s25util::md5("Str1"); |
39 | 39 | s25util::md5 inst2 = inst1; |
40 | 40 | inst1.process("Str2", true); |
41 | 41 | inst2.process("Str2", false); |
42 | | - BOOST_TEST_REQUIRE(inst1.toString() == s25util::md5("Str1Str2").toString()); |
43 | | - BOOST_TEST_REQUIRE(inst2.toString() == s25util::md5("Str2").toString()); |
| 42 | + BOOST_TEST(inst1.toString() == s25util::md5("Str1Str2").toString()); |
| 43 | + BOOST_TEST(inst2.toString() == s25util::md5("Str2").toString()); |
44 | 44 | } |
0 commit comments