int __cdecl main(int argc, char *argv[]) { double val = 256.0; double neg = -256.0; if (PAL_Initialize(argc, argv) != 0) { return FAIL; } DoDoubleTest("foo %e", val, "foo 2.560000e+002", "foo 2.560000e+02"); DoDoubleTest("foo %le", val, "foo 2.560000e+002", "foo 2.560000e+02"); DoDoubleTest("foo %he", val, "foo 2.560000e+002", "foo 2.560000e+02"); DoDoubleTest("foo %Le", val, "foo 2.560000e+002", "foo 2.560000e+02"); DoDoubleTest("foo %I64e", val, "foo 2.560000e+002", "foo 2.560000e+02"); DoDoubleTest("foo %14e", val, "foo 2.560000e+002", "foo 2.560000e+02"); DoDoubleTest("foo %-14e", val, "foo 2.560000e+002 ", "foo 2.560000e+02 "); DoDoubleTest("foo %.1e", val, "foo 2.6e+002", "foo 2.6e+02"); DoDoubleTest("foo %.8e", val, "foo 2.56000000e+002", "foo 2.56000000e+02"); DoDoubleTest("foo %014e", val, "foo 02.560000e+002", "foo 002.560000e+02"); DoDoubleTest("foo %#e", val, "foo 2.560000e+002", "foo 2.560000e+02"); DoDoubleTest("foo %+e", val, "foo +2.560000e+002", "foo +2.560000e+02"); DoDoubleTest("foo % e", val, "foo 2.560000e+002", "foo 2.560000e+02"); DoDoubleTest("foo %+e", neg, "foo -2.560000e+002", "foo -2.560000e+02"); DoDoubleTest("foo % e", neg, "foo -2.560000e+002", "foo -2.560000e+02"); PAL_Terminate(); return PASS; }
int __cdecl main(int argc, char *argv[]) { double val = 256.0; double neg = -256.0; if (PAL_Initialize(argc, argv) != 0) { return(FAIL); } DoDoubleTest(convert("foo %E"), val, convert("foo 2.560000E+002"), convert("foo 2.560000E+02")); DoDoubleTest(convert("foo %lE"), val, convert("foo 2.560000E+002"), convert("foo 2.560000E+02")); DoDoubleTest(convert("foo %hE"), val, convert("foo 2.560000E+002"), convert("foo 2.560000E+02")); DoDoubleTest(convert("foo %LE"), val, convert("foo 2.560000E+002"), convert("foo 2.560000E+02")); DoDoubleTest(convert("foo %I64E"), val, convert("foo 2.560000E+002"), convert("foo 2.560000E+02")); DoDoubleTest(convert("foo %14E"), val, convert("foo 2.560000E+002"), convert("foo 2.560000E+02")); DoDoubleTest(convert("foo %-14E"), val, convert("foo 2.560000E+002 "), convert("foo 2.560000E+02 ")); DoDoubleTest(convert("foo %.1E"), val, convert("foo 2.6E+002"), convert("foo 2.6E+02")); DoDoubleTest(convert("foo %.8E"), val, convert("foo 2.56000000E+002"), convert("foo 2.56000000E+02")); DoDoubleTest(convert("foo %014E"), val, convert("foo 02.560000E+002"), convert("foo 002.560000E+02")); DoDoubleTest(convert("foo %#E"), val, convert("foo 2.560000E+002"), convert("foo 2.560000E+02")); DoDoubleTest(convert("foo %+E"), val, convert("foo +2.560000E+002"), convert("foo +2.560000E+02")); DoDoubleTest(convert("foo % E"), val, convert("foo 2.560000E+002"), convert("foo 2.560000E+02")); DoDoubleTest(convert("foo %+E"), neg, convert("foo -2.560000E+002"), convert("foo -2.560000E+02")); DoDoubleTest(convert("foo % E"), neg, convert("foo -2.560000E+002"), convert("foo -2.560000E+002")); PAL_Terminate(); return PASS; }
int __cdecl main(int argc, char *argv[]) { double val = 2560.001; double neg = -2560.001; if (PAL_Initialize(argc, argv) != 0) { return(FAIL); } DoDoubleTest(convert("foo %G"), val, convert("foo 2560"), convert("foo 2560")); DoDoubleTest(convert("foo %lG"), val, convert("foo 2560"), convert("foo 2560")); DoDoubleTest(convert("foo %hG"), val, convert("foo 2560"), convert("foo 2560")); DoDoubleTest(convert("foo %LG"), val, convert("foo 2560"), convert("foo 2560")); DoDoubleTest(convert("foo %I64G"), val, convert("foo 2560"), convert("foo 2560")); DoDoubleTest(convert("foo %5G"), val, convert("foo 2560"), convert("foo 2560")); DoDoubleTest(convert("foo %-5G"), val, convert("foo 2560 "), convert("foo 2560 ")); DoDoubleTest(convert("foo %.1G"), val, convert("foo 3E+003"), convert("foo 3E+03")); DoDoubleTest(convert("foo %.2G"), val, convert("foo 2.6E+003"), convert("foo 2.6E+03")); DoDoubleTest(convert("foo %.12G"), val, convert("foo 2560.001"), convert("foo 2560.001")); DoDoubleTest(convert("foo %06G"), val, convert("foo 002560"), convert("foo 002560")); DoDoubleTest(convert("foo %#G"), val, convert("foo 2560.00"), convert("foo 2560.00")); DoDoubleTest(convert("foo %+G"), val, convert("foo +2560"), convert("foo +2560")); DoDoubleTest(convert("foo % G"), val, convert("foo 2560"), convert("foo 2560")); DoDoubleTest(convert("foo %+G"), neg, convert("foo -2560"), convert("foo -2560")); DoDoubleTest(convert("foo % G"), neg, convert("foo -2560"), convert("foo -2560")); PAL_Terminate(); return PASS; }
int __cdecl main(int argc, char *argv[]) { double val = 2560.001; double neg = -2560.001; if (PAL_Initialize(argc, argv) != 0) { return FAIL; } DoDoubleTest(convert("foo %f"), val, convert("foo 2560.001000"), convert("foo 2560.001000")); DoDoubleTest(convert("foo %lf"), val, convert("foo 2560.001000"), convert("foo 2560.001000")); DoDoubleTest(convert("foo %hf"), val, convert("foo 2560.001000"), convert("foo 2560.001000")); DoDoubleTest(convert("foo %Lf"), val, convert("foo 2560.001000"), convert("foo 2560.001000")); DoDoubleTest(convert("foo %I64f"), val, convert("foo 2560.001000"), convert("foo 2560.001000")); DoDoubleTest(convert("foo %12f"), val, convert("foo 2560.001000"), convert("foo 2560.001000")); DoDoubleTest(convert("foo %-12f"), val, convert("foo 2560.001000 "), convert("foo 2560.001000 ")); DoDoubleTest(convert("foo %.1f"), val, convert("foo 2560.0"), convert("foo 2560.0")); DoDoubleTest(convert("foo %.8f"), val, convert("foo 2560.00100000"), convert("foo 2560.00100000")); DoDoubleTest(convert("foo %012f"), val, convert("foo 02560.001000"), convert("foo 02560.001000")); DoDoubleTest(convert("foo %#f"), val, convert("foo 2560.001000"), convert("foo 2560.001000")); DoDoubleTest(convert("foo %+f"), val, convert("foo +2560.001000"), convert("foo +2560.001000")); DoDoubleTest(convert("foo % f"), val, convert("foo 2560.001000"), convert("foo 2560.001000")); DoDoubleTest(convert("foo %+f"), neg, convert("foo -2560.001000"), convert("foo -2560.001000")); DoDoubleTest(convert("foo % f"), neg, convert("foo -2560.001000"), convert("foo -2560.001000")); PAL_Terminate(); return PASS; }
int __cdecl main(int argc, char *argv[]) { double val = 2560.001; double neg = -2560.001; if (PAL_Initialize(argc, argv) != 0) { return(FAIL); } DoDoubleTest("foo %g", val, "foo 2560", "foo 2560"); DoDoubleTest("foo %lg", val, "foo 2560", "foo 2560"); DoDoubleTest("foo %hg", val, "foo 2560", "foo 2560"); DoDoubleTest("foo %Lg", val, "foo 2560", "foo 2560"); DoDoubleTest("foo %I64g", val, "foo 2560", "foo 2560"); DoDoubleTest("foo %5g", val, "foo 2560", "foo 2560"); DoDoubleTest("foo %-5g", val, "foo 2560 ", "foo 2560 "); DoDoubleTest("foo %.1g", val, "foo 3e+003", "foo 3e+03"); DoDoubleTest("foo %.2g", val, "foo 2.6e+003", "foo 2.6e+03"); DoDoubleTest("foo %.12g", val, "foo 2560.001", "foo 2560.001"); DoDoubleTest("foo %06g", val, "foo 002560", "foo 002560"); DoDoubleTest("foo %#g", val, "foo 2560.00", "foo 2560.00"); DoDoubleTest("foo %+g", val, "foo +2560", "foo +2560"); DoDoubleTest("foo % g", val, "foo 2560", "foo 2560"); DoDoubleTest("foo %+g", neg, "foo -2560", "foo -2560"); DoDoubleTest("foo % g", neg, "foo -2560", "foo -2560"); PAL_Terminate(); return PASS; }