mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 21:21:48 +03:00

Use supplemental line to show location of variable. Break out skip tests from switches.d test to new file. Make switches.d test use only one TEST_OUTPUT block for AUTO_UPDATE compat.
29 lines
419 B
D
29 lines
419 B
D
/*
|
|
TEST_OUTPUT:
|
|
---
|
|
fail_compilation/switches.d(14): Error: `case 2` not found
|
|
fail_compilation/switches.d(25): Error: no `case` statement following `goto case;`
|
|
---
|
|
*/
|
|
|
|
void test1(int i)
|
|
{
|
|
switch (i)
|
|
{
|
|
case 1:
|
|
goto case 2;
|
|
defaut:
|
|
break;
|
|
}
|
|
}
|
|
|
|
void test2(int i)
|
|
{
|
|
switch (i)
|
|
{
|
|
case 1:
|
|
goto case;
|
|
defaut:
|
|
break;
|
|
}
|
|
}
|