-
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
closes #172
- Loading branch information
Showing
4 changed files
with
59 additions
and
1 deletion.
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
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 |
---|---|---|
@@ -1,6 +1,22 @@ | ||
import "std"; | ||
|
||
test "Basic types" { | ||
str string = "hello world"; | ||
float floating = 3.14; | ||
int integer = 3; | ||
bool boolean = true; | ||
} | ||
|
||
test "Char literal" { | ||
int char = 'A'; | ||
|
||
assert(char == 65, message: "Could use char literal"); | ||
|
||
int quote = '\''; | ||
|
||
assert(quote == 39, message: "Could escape ' in char literal"); | ||
|
||
int slash = '\\'; | ||
|
||
assert(slash == 92, message: "Could escape \\ in char literal"); | ||
} |