]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
r11987@catbus: nickm | 2007-02-28 12:34:04 -0500
authorNick Mathewson <nickm@torproject.org>
Wed, 28 Feb 2007 17:34:07 +0000 (17:34 +0000)
committerNick Mathewson <nickm@torproject.org>
Wed, 28 Feb 2007 17:34:07 +0000 (17:34 +0000)
 add another u64-related unit test.

svn:r9681

src/or/test.c

index b9afb99783d945a8a89298b0c225de008c603409..194d5064339a3a47e9ee520651344d6ea6bfc906 100644 (file)
@@ -707,6 +707,11 @@ test_util(void)
               tor_parse_uint64("12345678901",10,500,INT32_MAX, &i, &cp));
   test_assert(i == 0);
 
+  /* Test printf with uint64 */
+  tor_snprintf(buf, sizeof(buf), "x!"U64_FORMAT"!x",
+               U64_PRINTF_ARG(U64_LITERAL(12345678901)));
+  test_streq(buf, "x!12345678901!x");
+
   /* Test parse_line_from_str */
   strlcpy(buf, "k v\n" " key    value with spaces   \n" "keykey val\n"
           "k2\n"