diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-05-15 15:03:02 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-05-15 15:03:02 +0000 |
commit | 4f67befd4840e04488663f78f5daef4a28e3c1fe (patch) | |
tree | fd42053d6a1660e1de32d65a8dc03688d84f537d /testsuites/sptests/spprintk | |
parent | 2009-05-15 Joel Sherrill <joel.sherrill@OARcorp.com> (diff) | |
download | rtems-4f67befd4840e04488663f78f5daef4a28e3c1fe.tar.bz2 |
2009-05-15 Joel Sherrill <joel.sherrill@OARcorp.com>
* spprintk/init.c: printk() now 100% covered.
Diffstat (limited to 'testsuites/sptests/spprintk')
-rw-r--r-- | testsuites/sptests/spprintk/init.c | 14 |
1 files changed, 14 insertions, 0 deletions
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 ); |