From 4f67befd4840e04488663f78f5daef4a28e3c1fe Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 15 May 2009 15:03:02 +0000 Subject: [PATCH] 2009-05-15 Joel Sherrill * spprintk/init.c: printk() now 100% covered. --- testsuites/sptests/ChangeLog | 4 ++++ testsuites/sptests/spprintk/init.c | 14 ++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/testsuites/sptests/ChangeLog b/testsuites/sptests/ChangeLog index 6e9c32dede..b41920353b 100644 --- a/testsuites/sptests/ChangeLog +++ b/testsuites/sptests/ChangeLog @@ -1,3 +1,7 @@ +2009-05-15 Joel Sherrill + + * spprintk/init.c: printk() now 100% covered. + 2009-05-14 Joel Sherrill * spprintk/init.c: More test cases. diff --git a/testsuites/sptests/spprintk/init.c b/testsuites/sptests/spprintk/init.c index cd835e12ec..4acf3e104c 100644 --- a/testsuites/sptests/spprintk/init.c +++ b/testsuites/sptests/spprintk/init.c @@ -33,14 +33,28 @@ rtems_task Init( printk( "%%i of 16 -- %i\n", 16 ); printk( "%%D of 16 -- %D\n", 16 ); printk( "%%d of 16 -- %d\n", 16 ); + printk( "%%-3d of 16 -- %-3d\n", 16 ); printk( "%%U of 16 -- %U\n", 16 ); printk( "%%u of 16 -- %u\n", 16 ); printk( "%%X of 16 -- %X\n", 16 ); printk( "%%x of 16 -- %x\n", 16 ); printk( "%%p of 0x1234 -- %p\n", (void *)0x1234 ); + + /* negative numbers */ + printk( "%%d of -16 -- %d\n", -16 ); + printk( "%%d of -16 -- %-3d\n", -16 ); + printk( "%%u of -16 -- %u\n", -16 ); + + /* string formats */ printk( "%%s of Mary Had a Little Lamb -- (%s)\n", "Mary Had a Little Lamb" ); printk( "%%s of NULL -- (%s)\n", NULL ); + printk( "%%12s of joel -- (%20s)\n", "joel" ); + printk( "%%4s of joel -- (%4s)\n", "joel" ); + printk( "%%-12s of joel -- (%-20s)\n", "joel" ); + printk( "%%-4s of joel -- (%-4s)\n", "joel" ); + printk( "%%c of X -- (%c)\n", 'X' ); + printk( "*** END OF TEST PRINTK ***" ); rtems_test_exit( 0 );