lookup3: tests for big-endian
authorMarko Kreen <markokr@gmail.com>
Sat, 26 Feb 2011 23:55:45 +0000 (01:55 +0200)
committerMarko Kreen <markokr@gmail.com>
Sat, 26 Feb 2011 23:55:45 +0000 (01:55 +0200)
test/test_hashing.c

index 09bdaa9c8174087772f0917c7906b172c9a39525..f4ef012c7c017c725692390c40d592515cc281a2 100644 (file)
@@ -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);