diff options
| author | Edvard Thörnros <edvard.thornros@gmail.com> | 2021-02-15 22:36:32 +0100 |
|---|---|---|
| committer | Edvard Thörnros <edvard.thornros@gmail.com> | 2021-02-15 22:36:32 +0100 |
| commit | 42b6130e649b41671620134ed73fa2ae7b0990a1 (patch) | |
| tree | 9c4ba1b86ed3372f0c99ce0d4e225cca7bfc87c9 /src | |
| parent | 3c5a33f008b40e272d3a720aa81fb5a8568a4527 (diff) | |
| download | sylt-42b6130e649b41671620134ed73fa2ae7b0990a1.tar.gz | |
add more tests
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib.rs | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -833,6 +833,12 @@ mod tests { assert_errs!(run_string("a :: 2\nq :: fn { a = 2 }\n", true, Vec::new()), [ErrorKind::SyntaxError(_, _)]); } + #[test] + fn undefined_blob() { + assert_errs!(run_string("a :: B()\n", true, Vec::new()), [ErrorKind::SyntaxError(_, _)]); + } + + macro_rules! test_multiple { ($mod:ident, $( $fn:ident : $prog:literal ),+ $( , )? ) => { mod $mod { @@ -1183,6 +1189,7 @@ a := 0 a <=> -1 ", ); + test_multiple!( declaration_order, simple: " @@ -1193,5 +1200,15 @@ blob A { } ", + complex: " +a := A() +b := B() +c := C() +b2 := B() + +blob A { } +blob C { } +blob B { } +", ); } |
