summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/const-array-complex.mnml2
-rw-r--r--test/const-array.mnml4
-rw-r--r--test/const-function-if.mnml6
-rw-r--r--test/const-function.mnml2
-rw-r--r--test/if.mnml2
-rw-r--r--test/parentheses.mnml7
-rw-r--r--test/test.mnml4
7 files changed, 15 insertions, 12 deletions
diff --git a/test/const-array-complex.mnml b/test/const-array-complex.mnml
index 07e2286..00edaac 100644
--- a/test/const-array-complex.mnml
+++ b/test/const-array-complex.mnml
@@ -1 +1 @@
-const array: [[integer]] = [[1, 2], [3, 4], [5, 6, 7]]
+const array: [[integer]] = [[1, 2], [3, 4], [5, 6, 7_000_000]]
diff --git a/test/const-array.mnml b/test/const-array.mnml
index e5f30b8..f79adbf 100644
--- a/test/const-array.mnml
+++ b/test/const-array.mnml
@@ -1,8 +1,8 @@
const array: [integer] = [1, 2, 3]
-const array2: [integer] = [3, 4, 5]
+const array2: [integer] = [3, [4, 8], 5]
const main: function = (array3: [integer], array4: [integer]): integer {
- return array4[1]
+ return array4[1][1]
}
main(array3 = array, array4 = array2)
diff --git a/test/const-function-if.mnml b/test/const-function-if.mnml
index 2b62f8e..7b71b8c 100644
--- a/test/const-function-if.mnml
+++ b/test/const-function-if.mnml
@@ -1,7 +1,7 @@
const main: function = (input: string): string {
if (input == "hello") {
const bye: string = "bye"
- return input + bye
+ return input + " " + bye
}
return input
@@ -10,7 +10,7 @@ const main: function = (input: string): string {
const main2: function = (input: string): string {
const bye: string = main(input = "bye")
- return main(input = "hello")
+ return input + main(input = "hello")
}
-main(input = "hello")
+main(input = "hello") => main2(input = $ + " ")
diff --git a/test/const-function.mnml b/test/const-function.mnml
index 9630dd8..5a82b68 100644
--- a/test/const-function.mnml
+++ b/test/const-function.mnml
@@ -5,4 +5,4 @@ const main: function = (input: string or integer, default: integer = 1): void {
return hello + " " + bye
}
-main(input = "hey", 2)
+main(input = "hey", default = 2)
diff --git a/test/if.mnml b/test/if.mnml
index 1d273b3..8227ad5 100644
--- a/test/if.mnml
+++ b/test/if.mnml
@@ -1,4 +1,4 @@
-if (1 == 2) {
+if ((1 == 2) or (2 == 3)) {
main1()
}
diff --git a/test/parentheses.mnml b/test/parentheses.mnml
index d18aee2..f321700 100644
--- a/test/parentheses.mnml
+++ b/test/parentheses.mnml
@@ -1,6 +1,7 @@
const main: function = (input: string): string {
if ((input == "hello") or input == "bye") {
- const bye: string = "bye"
+ const bye: string = "bye"
+ return bye
}
return input
@@ -13,5 +14,7 @@ const main2: function = (input: string): string {
const test2: string = ((main(input = "test") => main(input = $)) + "test2")
- return main(input = "hello") + bye
+ return input + main(input = "hello") + bye + " " + test2
}
+
+main(input = "test") => main2(input = $)
diff --git a/test/test.mnml b/test/test.mnml
index a14bdec..6ecb7d9 100644
--- a/test/test.mnml
+++ b/test/test.mnml
@@ -12,11 +12,11 @@ const main: function = (input: string or integer): void {
return hello + " " + bye
}
-main()/*
+main(input = "mlc")/*
* mlc
*/
-main("pipe1!") => print($)
+main(input = "pipe1!") => print($)
/*var mls: string = "alphabet
ende