Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
fbad4957
Commit
fbad4957
authored
Aug 08, 2012
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed argument ordering for CPPA_CHECK_EQUAL
parent
f9323fc0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
21 deletions
+28
-21
unit_testing/test__ripemd_160.cpp
unit_testing/test__ripemd_160.cpp
+28
-21
No files found.
unit_testing/test__ripemd_160.cpp
View file @
fbad4957
...
@@ -28,26 +28,33 @@ std::string str_hash(const std::string& what) {
...
@@ -28,26 +28,33 @@ std::string str_hash(const std::string& what) {
// http://homes.esat.kuleuven.be/~bosselae/ripemd160.html
// http://homes.esat.kuleuven.be/~bosselae/ripemd160.html
int
main
()
{
int
main
()
{
CPPA_TEST
(
test__ripemd_160
);
CPPA_TEST
(
test__ripemd_160
);
CPPA_CHECK_EQUAL
(
str_hash
(
""
),
"9c1185a5c5e9fc54612808977ee8f548b2258d31"
);
CPPA_CHECK_EQUAL
(
"9c1185a5c5e9fc54612808977ee8f548b2258d31"
,
CPPA_CHECK_EQUAL
(
str_hash
(
"a"
),
str_hash
(
""
));
"0bdc9d2d256b3ee9daae347be6f4dc835a467ffe"
);
CPPA_CHECK_EQUAL
(
str_hash
(
"abc"
),
CPPA_CHECK_EQUAL
(
"0bdc9d2d256b3ee9daae347be6f4dc835a467ffe"
,
"8eb208f7e05d987a9b044a8e98c6b087f15a0bfc"
);
str_hash
(
"a"
));
CPPA_CHECK_EQUAL
(
str_hash
(
"message digest"
),
"5d0689ef49d2fae572b881b123a85ffa21595f36"
);
CPPA_CHECK_EQUAL
(
"8eb208f7e05d987a9b044a8e98c6b087f15a0bfc"
,
CPPA_CHECK_EQUAL
(
str_hash
(
"abcdefghijklmnopqrstuvwxyz"
),
str_hash
(
"abc"
));
"f71c27109c692c1b56bbdceb5b9d2865b3708dbc"
);
CPPA_CHECK_EQUAL
(
str_hash
(
"abcdbcdecdefdefgefghfghighij"
CPPA_CHECK_EQUAL
(
"5d0689ef49d2fae572b881b123a85ffa21595f36"
,
"hijkijkljklmklmnlmnomnopnopq"
),
str_hash
(
"message digest"
));
"12a053384a9c0c88e405a06c27dcf49ada62eb2b"
);
CPPA_CHECK_EQUAL
(
str_hash
(
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
CPPA_CHECK_EQUAL
(
"f71c27109c692c1b56bbdceb5b9d2865b3708dbc"
,
"fghijklmnopqrstuvwxyz0123456789"
),
str_hash
(
"abcdefghijklmnopqrstuvwxyz"
));
"b0e20b6e3116640286ed3a87a5713079b21f5189"
);
CPPA_CHECK_EQUAL
(
str_hash
(
"1234567890123456789012345678901234567890"
CPPA_CHECK_EQUAL
(
"12a053384a9c0c88e405a06c27dcf49ada62eb2b"
,
"1234567890123456789012345678901234567890"
),
str_hash
(
"abcdbcdecdefdefgefghfghighij"
"9b752e45573d4b39f4dbd3323cab82bf63326bfb"
);
"hijkijkljklmklmnlmnomnopnopq"
));
//CPPA_CHECK_EQUAL(str_hash(std::string(1000000, 'a')),
// "52783243c1697bdbe16d37f97f68f08325dc1528");
CPPA_CHECK_EQUAL
(
"b0e20b6e3116640286ed3a87a5713079b21f5189"
,
str_hash
(
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
"fghijklmnopqrstuvwxyz0123456789"
));
CPPA_CHECK_EQUAL
(
"9b752e45573d4b39f4dbd3323cab82bf63326bfb"
,
str_hash
(
"1234567890123456789012345678901234567890"
"1234567890123456789012345678901234567890"
));
return
CPPA_TEST_RESULT
;
return
CPPA_TEST_RESULT
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment