stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject svn commit: r345385 - /incubator/stdcxx/trunk/tests/self/0.printf.cpp
Date Fri, 18 Nov 2005 00:22:23 GMT
Author: sebor
Date: Thu Nov 17 16:22:19 2005
New Revision: 345385

URL: http://svn.apache.org/viewcvs?rev=345385&view=rev
Log:
2005-11-17  Martin Sebor  <sebor@roguewave.com>

	* 0.printf.cpp (test_signal): New function exercising
	the "%{K}" format specifier for the formatting of signal names.

Modified:
    incubator/stdcxx/trunk/tests/self/0.printf.cpp

Modified: incubator/stdcxx/trunk/tests/self/0.printf.cpp
URL: http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/tests/self/0.printf.cpp?rev=345385&r1=345384&r2=345385&view=diff
==============================================================================
--- incubator/stdcxx/trunk/tests/self/0.printf.cpp (original)
+++ incubator/stdcxx/trunk/tests/self/0.printf.cpp Thu Nov 17 16:22:19 2005
@@ -25,6 +25,7 @@
 #include <float.h>
 #include <limits.h>
 #include <locale.h>
+#include <signal.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -1246,6 +1247,22 @@
 
 /***********************************************************************/
 
+void test_signal ()
+{
+    //////////////////////////////////////////////////////////////////
+    printf ("%s\n", "extension: \"%K\": signal name");
+
+    TEST ("%{K}", SIGABRT, 0, 0, "SIGABRT");
+    TEST ("%{K}", SIGFPE,  0, 0, "SIGFPE");
+    TEST ("%{K}", SIGILL,  0, 0, "SIGILL");
+    TEST ("%{K}", SIGINT,  0, 0, "SIGINT");
+    TEST ("%{K}", SIGSEGV, 0, 0, "SIGSEGV");
+    TEST ("%{K}", SIGTERM, 0, 0, "SIGTERM");
+    TEST ("%{K}", 12345,   0, 0, "SIG#12345");
+}
+
+/***********************************************************************/
+
 void test_tm ()
 {
     //////////////////////////////////////////////////////////////////
@@ -1412,6 +1429,8 @@
     test_funptr ();
     test_memptr ();
     test_errno ();
+    test_signal ();
+
     test_basic_string ();
 
     test_tm ();



Mime
View raw message