-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into opcodes-unique
- Loading branch information
Showing
11 changed files
with
87 additions
and
41 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
Content.Tests/DMProject/Tests/Statements/Switch/weird_when_clause.dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
|
||
//Issue OD#996, kinda: https://github.com/OpenDreamProject/OpenDream/issues/996 | ||
|
||
/proc/RunTest() | ||
var/x = 5 | ||
switch(x) | ||
if(1) | ||
CRASH("Strange branch chosen in switch statement") | ||
if(4) | ||
CRASH("Strange branch chosen in switch statement") | ||
else if(x == 3) | ||
CRASH("Parser failed to understand 'else if' in switch block") | ||
else | ||
return | ||
CRASH("Parser failed to understand 'else if' in switch block") |
16 changes: 16 additions & 0 deletions
16
Content.Tests/DMProject/Tests/Statements/Switch/weird_when_clause_pragma.dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
//COMPILE ERROR | ||
//test to make sure SuspiciousSwitchCase is working | ||
|
||
#pragma SuspiciousSwitchCase error | ||
|
||
/proc/RunTest() | ||
var/x = 5 | ||
switch(x) | ||
if(1) | ||
return | ||
if(4) | ||
return | ||
else if(x == 3) | ||
return | ||
else | ||
return |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters