mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 13:10:12 +03:00
test continue inside do-while (#16192)
This commit is contained in:
parent
a952831fdb
commit
e9cacc37b6
1 changed files with 14 additions and 0 deletions
|
@ -2478,6 +2478,19 @@ void test21835()
|
||||||
if (arr[0].r != 0.0) assert(0);
|
if (arr[0].r != 0.0) assert(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////
|
||||||
|
// https://github.com/dlang/dmd/pull/16187#issuecomment-1946534649
|
||||||
|
|
||||||
|
void testDoWhileContinue()
|
||||||
|
{
|
||||||
|
int i = 10;
|
||||||
|
do
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
while(--i > 0);
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
|
@ -2578,6 +2591,7 @@ int main()
|
||||||
test21256();
|
test21256();
|
||||||
test21816();
|
test21816();
|
||||||
test21835();
|
test21835();
|
||||||
|
testDoWhileContinue();
|
||||||
|
|
||||||
printf("Success\n");
|
printf("Success\n");
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue