]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Put expected first in n_bits_set_u8 unit tests
authorEsteban Manchado Velázquez <emanchado@demiurgo.org>
Sat, 11 Feb 2012 00:20:09 +0000 (01:20 +0100)
committerNick Mathewson <nickm@torproject.org>
Fri, 9 Mar 2012 01:49:25 +0000 (20:49 -0500)
src/test/test_util.c

index a7554a40dcbf5bfcc9c663903767bf8c26d6f5e7..809039bf32a5276128132c28647476f8ef8b157d 100644 (file)
@@ -2214,10 +2214,12 @@ static void
 test_util_n_bits_set(void *ptr)
 {
   (void)ptr;
-  test_eq(n_bits_set_u8(0), 0);
-  test_eq(n_bits_set_u8(1), 1);
-  test_eq(n_bits_set_u8(129), 2);
-  test_eq(n_bits_set_u8(255), 8);
+  test_eq(0, n_bits_set_u8(0));
+  test_eq(1, n_bits_set_u8(1));
+  test_eq(3, n_bits_set_u8(7));
+  test_eq(1, n_bits_set_u8(8));
+  test_eq(2, n_bits_set_u8(129));
+  test_eq(8, n_bits_set_u8(255));
  done:
   ;
 }