mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 11:38:21 +02:00
New test
This commit is contained in:
parent
601b08fb2d
commit
b900ec1a4a
2 changed files with 54 additions and 0 deletions
|
@ -11,4 +11,9 @@ AssertFileErrors()
|
|||
ShowFile("src/LocalVars.bf")
|
||||
WaitForResolve()
|
||||
SleepTicks(20)
|
||||
AssertFileErrors()
|
||||
|
||||
ShowFile("src/Defer.bf")
|
||||
WaitForResolve()
|
||||
SleepTicks(20)
|
||||
AssertFileErrors()
|
49
IDE/Tests/CompileFail001/src/Defer.bf
Normal file
49
IDE/Tests/CompileFail001/src/Defer.bf
Normal file
|
@ -0,0 +1,49 @@
|
|||
#pragma warning disable 168
|
||||
|
||||
using System;
|
||||
|
||||
namespace IDETest
|
||||
{
|
||||
class Defer
|
||||
{
|
||||
public int ReturnFromDefer()
|
||||
{
|
||||
defer
|
||||
{
|
||||
return 123; //FAIL
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public int BreakFromDefer()
|
||||
{
|
||||
for (int i < 10)
|
||||
{
|
||||
defer
|
||||
{
|
||||
break; //FAIL
|
||||
}
|
||||
|
||||
defer
|
||||
{
|
||||
continue; //FAIL
|
||||
}
|
||||
}
|
||||
|
||||
Block:
|
||||
for (int j < 20)
|
||||
{
|
||||
for (int i < 10)
|
||||
{
|
||||
defer
|
||||
{
|
||||
//break Block;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue