apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject svn commit: r775683 - /apr/apr/trunk/test/testfmt.c
Date Sun, 17 May 2009 15:57:58 GMT
Author: trawick
Date: Sun May 17 15:57:58 2009
New Revision: 775683

URL: http://svn.apache.org/viewvc?rev=775683&view=rev
Log:
test APR_TIME_T_FMT along with the other format strings

Modified:
    apr/apr/trunk/test/testfmt.c

Modified: apr/apr/trunk/test/testfmt.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/test/testfmt.c?rev=775683&r1=775682&r2=775683&view=diff
==============================================================================
--- apr/apr/trunk/test/testfmt.c (original)
+++ apr/apr/trunk/test/testfmt.c Sun May 17 15:57:58 2009
@@ -41,6 +41,17 @@
     ABTS_STR_EQUAL(tc, "0", buf);
 }
 
+static void time_t_fmt(abts_case *tc, void *data)
+{
+    char buf[100];
+    apr_time_t var = 1;
+
+    sprintf(buf, "%" APR_TIME_T_FMT, var);
+    ABTS_STR_EQUAL(tc, "1", buf);
+    apr_snprintf(buf, sizeof(buf), "%" APR_TIME_T_FMT, var);
+    ABTS_STR_EQUAL(tc, "1", buf);
+}
+
 static void off_t_fmt(abts_case *tc, void *data)
 {
     char buf[100];
@@ -141,6 +152,7 @@
 
     abts_run_test(suite, ssize_t_fmt, NULL);
     abts_run_test(suite, size_t_fmt, NULL);
+    abts_run_test(suite, time_t_fmt, NULL);
     abts_run_test(suite, off_t_fmt, NULL);
     abts_run_test(suite, pid_t_fmt, NULL);
     abts_run_test(suite, int64_t_fmt, NULL);



Mime
View raw message