aboutsummaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2026-08-18 13:31:47 +0200
committerEugen Wissner <belka@caraus.de>2026-08-18 13:31:47 +0200
commit4f77ad5d019618893c59a0f8d5bfa6b98e50a3be (patch)
treed9e01460ecf94a491be476fbca76b6608276d967 /testsuite
parent4b7c87a9b53f5317e9f7982bd779d53a66960bdc (diff)
downloadelna-4f77ad5d019618893c59a0f8d5bfa6b98e50a3be.tar.gz
Make Int and Word aliases to fixed-size types
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/runnable/constant_string_initializer.elna2
-rw-r--r--testsuite/runnable/record_extension.elna2
-rw-r--r--testsuite/runnable/slice_cast.elna4
-rw-r--r--testsuite/runnable/unicode_escape_character.elna4
4 files changed, 8 insertions, 4 deletions
diff --git a/testsuite/runnable/constant_string_initializer.elna b/testsuite/runnable/constant_string_initializer.elna
index e2ffb25..52ca429 100644
--- a/testsuite/runnable/constant_string_initializer.elna
+++ b/testsuite/runnable/constant_string_initializer.elna
@@ -1,5 +1,5 @@
var
- s: []const Char := "String value"
+ s: []const Word8 := "String value"
begin
assert(s = "String value")
diff --git a/testsuite/runnable/record_extension.elna b/testsuite/runnable/record_extension.elna
index 47ac908..7d8dc61 100644
--- a/testsuite/runnable/record_extension.elna
+++ b/testsuite/runnable/record_extension.elna
@@ -3,7 +3,7 @@ type
kind: Word
end
ElnaLexerStringToken = record(ElnaLexerToken)
- value: []const Char
+ value: []const Word8
end
var
diff --git a/testsuite/runnable/slice_cast.elna b/testsuite/runnable/slice_cast.elna
index 5ab2c93..7c43959 100644
--- a/testsuite/runnable/slice_cast.elna
+++ b/testsuite/runnable/slice_cast.elna
@@ -1,6 +1,6 @@
var
- ints: [4]Int := [4]Int{ 1, 2, 3, 4 }
+ ints: [4]Int32 := [4]Int32{ 1i32, 2i32, 3i32, 4i32 }
begin
- assert(cast(ints[1u to 4u]: []Char).length = #size(Int) * ints.length)
+ assert(cast(ints[1u to 4u]: []Int8).length = #size(Int32) * ints.length)
end.
diff --git a/testsuite/runnable/unicode_escape_character.elna b/testsuite/runnable/unicode_escape_character.elna
new file mode 100644
index 0000000..d49910c
--- /dev/null
+++ b/testsuite/runnable/unicode_escape_character.elna
@@ -0,0 +1,4 @@
+begin
+ assert(`\{U+E9}` = `é`);
+ assert(`\{U+1F600}` = `😀`)
+end.