git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Usermode/libposix - Basic stat() emulation
[tpg/acess2.git]
/
Usermode
/
Libraries
/
libc.so_src
/
TEST_printf.c
diff --git
a/Usermode/Libraries/libc.so_src/TEST_printf.c
b/Usermode/Libraries/libc.so_src/TEST_printf.c
index
5db673a
..
4376694
100644
(file)
--- a/
Usermode/Libraries/libc.so_src/TEST_printf.c
+++ b/
Usermode/Libraries/libc.so_src/TEST_printf.c
@@
-8,14
+8,14
@@
#include <stdio.h>
#define TST(_name, fmt, val) \
#include <stdio.h>
#define TST(_name, fmt, val) \
- printf(_name" %"fmt"
"#val": "fmt"
\n", val)
+ printf(_name" %"fmt"
'"#val"': '"fmt"'
\n", val)
int main(int argc, char *argv[])
{
int main(int argc, char *argv[])
{
- printf("Hello World\n");
+ printf("Hello World
!
\n");
TST("String", "%s", "teststring");
TST("String", "%.5s", "teststring");
TST("String", "%s", "teststring");
TST("String", "%.5s", "teststring");
- TST("String", "%10.5s
-
", "teststring");
+ TST("String", "%10.5s", "teststring");
TST("String", "%-10.5s", "teststring");
TST("Integer", "%i", 1234);
TST("String", "%-10.5s", "teststring");
TST("Integer", "%i", 1234);
@@
-23,8
+23,15
@@
int main(int argc, char *argv[])
TST("Integer", "%u", 1234);
TST("Float", "%f", 3.1414926535);
TST("Integer", "%u", 1234);
TST("Float", "%f", 3.1414926535);
+ TST("Float", "%f", 10.0);
+ TST("Float", "%f", -0.0);
TST("Float", "%.10f", 3.1414926535);
TST("Float", "%.10f", 3.1414926535);
- TST("Float", "%e", 3.141
4
926535);
- TST("Float", "%g", 3.141
4
926535);
+ TST("Float", "%e", 3.141
5
926535);
+ TST("Float", "%g", 3.141
5
926535);
TST("Float", "%E", 1000000000.00);
TST("Float", "%E", 1000000000.00);
+ TST("Float", "%a", 16.0);
+ TST("Float", "%a", 1024.0);
+ TST("Float", "%a", 1023.0);
+ TST("Float", "%A", 1000000000.00);
+ return 0;
}
}
UCC
git Repository :: git.ucc.asn.au