Skip to content

Commit

Permalink
naturally I forgot to update run.t
Browse files Browse the repository at this point in the history
  • Loading branch information
jalglave committed Jun 10, 2024
1 parent 662ffa5 commit ca20405
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 1 deletion.
17 changes: 17 additions & 0 deletions asllib/tests/language.t/Rcgwr-3.asl
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// RUN: interp %s | FileCheck %s
// RCGWR A tuple type must contain at least 2 elements.

// This is expected to be a valid ASL specification. All tuples have at least 2 elements.
// see Rcgwr-2.asl for a negative test with tuples with 0 and 1 elements.

type a_t of (integer, boolean);
type b_t of (integer, boolean, bits(32));


func main() => b_t
begin
var a : a_t = (42, TRUE);
var b : b_t = (0, FALSE, Zeros(32));

return b;
end
29 changes: 28 additions & 1 deletion asllib/tests/language.t/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,9 @@ Test Imqwb.asl:
Test Rcgwr.asl:
$ aslref Rcgwr.asl

Test Rcgwr-2.asl:
$ aslref Rcgwr-2.asl

Test Rjhkl.asl:
$ aslref Rjhkl.asl
File Rjhkl.asl, line 7, characters 4 to 5:
Expand Down Expand Up @@ -1037,6 +1040,12 @@ Test Rksqp_c.asl:
Test Rpnqj.asl:
$ aslref Rpnqj.asl

Test Rpnqj-2.asl:
$ aslref Rpnqj-2.asl
File Rpnqj-2.asl, line 10, characters 8 to 24:
ASL Error: Undefined identifier: 'println'
[1]

Test Rsblx.asl:
$ aslref Rsblx.asl

Expand Down Expand Up @@ -1315,7 +1324,7 @@ Test Iqslr.asl:

Test Ivgsp.asl:
$ aslref Ivgsp.asl
File Ivgsp.asl, line 6, character 0 to line 9, character 3:
File Ivgsp.asl, line 9, character 0 to line 12, character 3:
ASL Typing error: cannot declare already declared element "a".
[1]

Expand Down Expand Up @@ -1397,6 +1406,12 @@ For reference, the test writter intention was that this output matched:
// CHECK: Hello
// CHECK-NEXT: World

Test Rdgrv-2.asl:
$ aslref Rdgrv-2.asl
File Rdgrv-2.asl, line 47, characters 8 to 17:
ASL Error: Cannot parse.
[1]

Test Rgvcc.asl:
$ aslref Rgvcc.asl
Uncaught exception: a {}
Expand Down Expand Up @@ -2933,6 +2948,12 @@ Test Ivgsp-2.asl:
ASL Typing error: cannot declare already declared element "a".
[1]

Test Ivgsp-3.asl:
$ aslref Ivgsp-3.asl
File Ivgsp-3.asl, line 9, characters 3 to 23:
ASL Typing error: a subtype of string was expected, provided integer.
[1]

Test Rccvd-2.asl:
$ aslref Rccvd-2.asl

Expand Down Expand Up @@ -3021,6 +3042,12 @@ Test Rqdqd-2.asl:
ASL Error: Cannot parse.
[1]

Test Rqdqd-3.asl:
$ aslref Rqdqd-3.asl
File Rqdqd-3.asl, line 8, characters 13 to 14:
ASL Error: Cannot parse.
[1]

Test Rvgzf-2.asl:
$ aslref Rvgzf-2.asl

Expand Down

0 comments on commit ca20405

Please sign in to comment.