-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8e3526d
commit 768f1f8
Showing
7 changed files
with
51 additions
and
17 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
1 change: 1 addition & 0 deletions
1
ScriptingEngineTester/src/main/resources/zencode-tests/alias/alias-1.zc
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
#output: Two is Foo | ||
#output: Two is int | ||
|
||
alias Foo as int; | ||
|
27 changes: 27 additions & 0 deletions
27
...tingEngineTester/src/main/resources/zencode-tests/expressions/addition-signed-unsigned.zc
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,27 @@ | ||
|
||
val byteValue = 1 as byte; | ||
val sbyteValue = 2 as sbyte; | ||
val shortValue = 3 as short; | ||
val ushortValue = 4 as ushort; | ||
val intValue = 5 as int; | ||
val uintValue = 6 as uint; | ||
val longValue = 7 as long; | ||
val ulongValue = 8 as ulong; | ||
val usizeValue = 9 as usize; | ||
|
||
println(typeof(byteValue + sbyteValue)); | ||
println(byteValue + sbyteValue); | ||
println(typeof(byteValue + shortValue)); | ||
println(byteValue + shortValue); | ||
println(typeof(sbyteValue + ushortValue)); | ||
println(byteValue + ushortValue); | ||
println(typeof(byteValue + intValue)); | ||
println(byteValue + intValue); | ||
println(typeof(sbyteValue + uintValue)); | ||
println(byteValue + uintValue); | ||
println(typeof(byteValue + longValue)); | ||
println(byteValue + longValue); | ||
println(typeof(sbyteValue + ulongValue)); | ||
println(byteValue + ulongValue); | ||
println(typeof(byteValue + usizeValue)); | ||
println(byteValue + usizeValue); |
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
5 changes: 1 addition & 4 deletions
5
ScriptingEngineTester/src/main/resources/zencode-tests/functions/shadowing.zc
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 |
---|---|---|
@@ -1,9 +1,6 @@ | ||
#output: Undetermined | ||
|
||
//Should this error? | ||
|
||
function println(a as string) { | ||
|
||
} | ||
|
||
println("Hello"); | ||
println("Hello"); |
3 changes: 3 additions & 0 deletions
3
ScriptingEngineTester/src/main/resources/zencode-tests/operators/complement.zc
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,3 @@ | ||
#output: 254 | ||
|
||
println(~(1 as byte)); |
8 changes: 8 additions & 0 deletions
8
ScriptingEngineTester/src/main/resources/zencode-tests/operators/not.zc
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,8 @@ | ||
#output: false | ||
#output: false | ||
#output: false | ||
|
||
val result = !true; | ||
println(result); | ||
println(!true); | ||
println((!true) as string); |