[or-cvs] r9681: add another u64-related unit test. (in tor/trunk: . src/or)

nickm at seul.org nickm at seul.org
Wed Feb 28 17:34:09 UTC 2007


Author: nickm
Date: 2007-02-28 12:34:07 -0500 (Wed, 28 Feb 2007)
New Revision: 9681

Modified:
   tor/trunk/
   tor/trunk/src/or/test.c
Log:
 r11987 at catbus:  nickm | 2007-02-28 12:34:04 -0500
 add another u64-related unit test.



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r11987] on 8246c3cf-6607-4228-993b-4d95d33730f1

Modified: tor/trunk/src/or/test.c
===================================================================
--- tor/trunk/src/or/test.c	2007-02-28 17:27:36 UTC (rev 9680)
+++ tor/trunk/src/or/test.c	2007-02-28 17:34:07 UTC (rev 9681)
@@ -707,6 +707,11 @@
               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"



More information about the tor-commits mailing list