diff options
author | Juan J. Martinez <jjm@usebox.net> | 2022-08-21 08:07:52 +0100 |
---|---|---|
committer | Juan J. Martinez <jjm@usebox.net> | 2022-08-21 08:07:52 +0100 |
commit | ccb2e6e02f39f6cf5f7beb4aa64bec948a8c7edf (patch) | |
tree | 0c5f4964972cdfb8d03f0d2e4100e04c9fc3e300 /test | |
parent | 0961ef6728abea4f3926fbf34539f4a98583d0c7 (diff) | |
download | micro-lang-hs-ccb2e6e02f39f6cf5f7beb4aa64bec948a8c7edf.tar.gz micro-lang-hs-ccb2e6e02f39f6cf5f7beb4aa64bec948a8c7edf.zip |
Qualified undefined variable error, added test
Diffstat (limited to 'test')
-rw-r--r-- | test/Language.hs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/test/Language.hs b/test/Language.hs index 7d814a7..e52bb3b 100644 --- a/test/Language.hs +++ b/test/Language.hs @@ -226,6 +226,14 @@ testCase17 = \def fn(a: u8): u8 { return a(); }\n" E.NonCallable +testCase18 = + TestLabel "undefined variable" $ + TestCase $ + expectError + "module main\n\ + \def fn(a: u8): u8 { return undef; }\n" + E.Undefined + language = [ testCase1, testCase2, @@ -243,5 +251,6 @@ language = testCase14, testCase15, testCase16, - testCase17 + testCase17, + testCase18 ] |