Ejemplo n.º 1
0
int __cdecl main(int argc, char *argv[])
{
    WCHAR wc = (WCHAR) 'c';
    
    if (PAL_Initialize(argc, argv) != 0)
    {
        return FAIL;
    }


    DoCharTest(convert("foo %C"), 'b', convert("foo b"));
    DoWCharTest(convert("foo %hC"), wc, convert("foo c"));
    DoCharTest(convert("foo %lC"), 'b', convert("foo b"));
    DoCharTest(convert("foo %LC"), 'b', convert("foo b"));
    DoCharTest(convert("foo %I64C"), 'b', convert("foo b"));
    DoCharTest(convert("foo %5C"), 'b', convert("foo     b"));
    DoCharTest(convert("foo %.0C"), 'b', convert("foo b"));
    DoCharTest(convert("foo %-5C"), 'b', convert("foo b    "));
    DoCharTest(convert("foo %05C"), 'b', convert("foo 0000b"));
    DoCharTest(convert("foo % C"), 'b', convert("foo b"));
    DoCharTest(convert("foo %#C"), 'b', convert("foo b"));

    PAL_Terminate();
    return PASS;
}
Ejemplo n.º 2
0
int __cdecl main(int argc, char *argv[])
{
    WCHAR wc = (WCHAR) 'c';
    
    if (PAL_Initialize(argc, argv))
    {
        return FAIL;
    }


    DoCharTest("foo %c", 'b', "foo b");
    DoCharTest("foo %hc", 'b', "foo b");
    DoWCharTest("foo %lc", wc, "foo c");
    DoCharTest("foo %Lc", 'b', "foo b");
    DoCharTest("foo %I64c", 'b', "foo b");
    DoCharTest("foo %5c", 'b', "foo     b");
    DoCharTest("foo %.0c", 'b', "foo b");
    DoCharTest("foo %-5c", 'b', "foo b    ");
    DoCharTest("foo %05c", 'b', "foo 0000b");
    DoCharTest("foo % c", 'b', "foo b");
    DoCharTest("foo %#c", 'b', "foo b");
    
    PAL_Terminate();
    return PASS;
}
Ejemplo n.º 3
0
int __cdecl main(int argc, char *argv[])
{
    WCHAR wb = (WCHAR) 'b';
    
    if (PAL_Initialize(argc, argv))
    {
        return FAIL;
    }


    DoWCharTest("foo %C", wb, "foo b");
    DoWCharTest("foo %hC", wb, "foo b");
    DoCharTest("foo %lC", 'c', "foo c");
    DoWCharTest("foo %LC", wb, "foo b");
    DoWCharTest("foo %I64C", wb, "foo b");
    DoWCharTest("foo %5C", wb, "foo     b");
    DoWCharTest("foo %.0C", wb, "foo b");
    DoWCharTest("foo %-5C", wb, "foo b    ");
    DoWCharTest("foo %05C", wb, "foo 0000b");
    DoWCharTest("foo % C", wb, "foo b");
    DoWCharTest("foo %#C", wb, "foo b");

    PAL_Terminate();
    return PASS;
}
Ejemplo n.º 4
0
int __cdecl main(int argc, char *argv[])
{
    WCHAR wb = (WCHAR) 'b';
    
    if (PAL_Initialize(argc, argv) != 0)
    {
        return FAIL;
    }


    DoWCharTest(convert("foo %c"), wb, convert("foo b"));
    DoCharTest(convert("foo %hc"), 'c', convert("foo c"));
    DoWCharTest(convert("foo %lc"), wb, convert("foo b"));
    DoWCharTest(convert("foo %Lc"), wb, convert("foo b"));
    DoWCharTest(convert("foo %I64c"), wb, convert("foo b"));
    DoWCharTest(convert("foo %5c"), wb, convert("foo     b"));
    DoWCharTest(convert("foo %.0c"), wb, convert("foo b"));
    DoWCharTest(convert("foo %-5c"), wb, convert("foo b    "));
    DoWCharTest(convert("foo %05c"), wb, convert("foo 0000b"));
    DoWCharTest(convert("foo % c"), wb, convert("foo b"));
    DoWCharTest(convert("foo %#c"), wb, convert("foo b"));

    PAL_Terminate();
    return PASS;
}
Ejemplo n.º 5
0
int __cdecl main(int argc, char *argv[])
{
    if (PAL_Initialize(argc, argv))
    {
        return FAIL;
    }

    DoWCharTest(convert("1234"), convert("%c"), convert("1"), 1);
    DoWCharTest(convert("1234"), convert("%c"), convert("1"), 1);
    DoWCharTest(convert("abc"), convert("%2c"), convert("ab"), 2);
    DoWCharTest(convert(" ab"), convert("%c"), convert(" "), 1);
    DoCharTest(convert("ab"), convert("%hc"), "a", 1);
    DoWCharTest(convert("ab"), convert("%lc"), convert("a"), 1);
    DoWCharTest(convert("ab"), convert("%Lc"), convert("a"), 1);
    DoWCharTest(convert("ab"), convert("%I64c"), convert("a"), 1);

    PAL_Terminate();
    return PASS;
}