-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds a couple more unit tests for MS build
- Loading branch information
Showing
3 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/foo(x) | ||
{ | ||
return x .. " and omega"; | ||
} | ||
|
||
/main() | ||
{ | ||
Number TEST_NUMBER = 5; | ||
|
||
##Concatenation | ||
String cool = "cool"; | ||
if(cool .. " and good" != "cool and good") | ||
{ | ||
throw /error/New(TEST_NUMBER,"Concatenation failed!"); | ||
} | ||
|
||
##Comparison | ||
if("A" > "B") | ||
{ | ||
throw /error/New(TEST_NUMBER,"String comparison failed!"); | ||
} | ||
|
||
##Logic | ||
if(!"apple") | ||
{ | ||
throw /error/New(TEST_NUMBER,"String logic failed!"); | ||
} | ||
|
||
##Cloning | ||
String cooler = cool; | ||
if(cooler != "cool") | ||
{ | ||
throw /error/New(TEST_NUMBER,"String cloning failed!"); | ||
} | ||
|
||
##Passing strings | ||
String alpha = "alpha"; | ||
if(foo(alpha) != "alpha and omega") | ||
{ | ||
throw /error/New(TEST_NUMBER,"Passing strings as parameters failed!"); | ||
} | ||
|
||
print("Test #" .. TEST_NUMBER .. " passed"); | ||
} |
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,13 @@ | ||
##Goal here is to throw off the parser | ||
/main() | ||
{ | ||
Number TEST_NUMBER = 6; | ||
Number paren = ((((((((((((((7)))))))))))))); | ||
|
||
for(Value x=0;x<10;x+=(1)){break 1;} | ||
|
||
### | ||
Long comment! | ||
### ##Line comment! | ||
print("Test #" .. TEST_NUMBER .. " passed"); | ||
} |