From 053dddf191ee7f9e9b057bec2aed6c09a66c6195 Mon Sep 17 00:00:00 2001 From: Marko Kreen Date: Sun, 27 Feb 2011 01:55:45 +0200 Subject: [PATCH] lookup3: tests for big-endian --- test/test_hashing.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/test/test_hashing.c b/test/test_hashing.c index 09bdaa9..f4ef012 100644 --- a/test/test_hashing.c +++ b/test/test_hashing.c @@ -30,14 +30,13 @@ end:; static void test_lookup3(void *p) { #ifdef WORDS_BIGENDIAN - #warning n/a int_check(xlookup3(""), 3735928559); - int_check(xlookup3("a"), 1490454280); - int_check(xlookup3("abc"), 238646833); - int_check(xlookup3("message digest"), 2512672053); - int_check(xlookup3("abcdefghijklmnopqrstuvwxyz"), 1966650813); - int_check(xlookup3("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"), 3992286962); - int_check(xlookup3("12345678901234567890123456789012345678901234567890123456789012345678901234567890"), 2776963519); + int_check(xlookup3("a"), -454251968); + int_check(xlookup3("abc"), -1186250080); + int_check(xlookup3("message digest"), 670730672); + int_check(xlookup3("abcdefghijklmnopqrstuvwxyz"), 251682059); + int_check(xlookup3("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"), 567386262); + int_check(xlookup3("12345678901234567890123456789012345678901234567890123456789012345678901234567890"), 312582506); #else int_check(xlookup3(""), 3735928559); int_check(xlookup3("a"), 1490454280); -- 2.39.5