ORCA-C/Tests/Conformance/C2.1.0.3.CC
2017-10-21 18:40:19 -05:00

50 lines
1.1 KiB
C++

/* Conformance Test 2.1.0.3: Verification of ANSI C trigraphs in */
/* character constants */
main ()
{
char a;
a = '??='; /* ??= is '#' */
if (a != '#')
goto Fail;
a = '??/??/'; /* ??/ is '\' */
if (a != 0x5C)
goto Fail;
a = '??''; /* ??' is '^' */
if (a != '^')
goto Fail;
a = '??!'; /* ??! is '|' */
if (a != '|')
goto Fail;
a = '??-'; /* ??- is '~' */
if (a != '~')
goto Fail;
a = '??('; /* ??( is '[' */
if (a != '[')
goto Fail;
a = '??<'; /* ??< is '{' */
if (a != '{')
goto Fail;
a = '??)'; /* ??) is ']' */
if (a != ']')
goto Fail;
a = '??>'; /* ??> is '}' */
if (a != '}')
goto Fail;
printf ("Passed Conformance Test 2.1.0.3\n");
return;
Fail:
printf ("Failed Conformance Test 2.1.0.3\n");
}