tests update
This commit is contained in:
@ -57,26 +57,26 @@
|
||||
LINE (28:2) ** TYPE ERROR: Undefined variable b
|
||||
029: b := 1 | b;
|
||||
LINE (29:12) ** TYPE ERROR: Invalid type passed to assignable.
|
||||
LINE (29:12) ** TYPE ERROR: Object $t9 of type integer and Object undefined of type undefined must both be Boolean
|
||||
LINE (29:12) ** TYPE ERROR: Object $t11 of type integer and Object undefined of type undefined must both be Boolean
|
||||
LINE (29:11) ** TYPE ERROR: Undefined variable b
|
||||
LINE (29:2) ** TYPE ERROR: Undefined variable b
|
||||
030: b := b | 1;
|
||||
LINE (30:12) ** TYPE ERROR: Invalid type passed to assignable.
|
||||
LINE (30:12) ** TYPE ERROR: Object undefined of type undefined and Object $t10 of type integer must both be Boolean
|
||||
LINE (30:12) ** TYPE ERROR: Object undefined of type undefined and Object $t13 of type integer must both be Boolean
|
||||
LINE (30:7) ** TYPE ERROR: Undefined variable b
|
||||
LINE (30:2) ** TYPE ERROR: Undefined variable b
|
||||
031: b := b & 1;
|
||||
LINE (31:12) ** TYPE ERROR: Invalid type passed to assignable.
|
||||
LINE (31:12) ** TYPE ERROR: Object undefined of type undefined and Object $t11 of type integer must both be Boolean
|
||||
LINE (31:12) ** TYPE ERROR: Object undefined of type undefined and Object $t15 of type integer must both be Boolean
|
||||
LINE (31:7) ** TYPE ERROR: Undefined variable b
|
||||
LINE (31:2) ** TYPE ERROR: Undefined variable b
|
||||
032: b := 1 & b;
|
||||
LINE (32:12) ** TYPE ERROR: Invalid type passed to assignable.
|
||||
LINE (32:12) ** TYPE ERROR: Object $t12 of type integer and Object undefined of type undefined must both be Boolean
|
||||
LINE (32:12) ** TYPE ERROR: Object $t17 of type integer and Object undefined of type undefined must both be Boolean
|
||||
LINE (32:11) ** TYPE ERROR: Undefined variable b
|
||||
LINE (32:2) ** TYPE ERROR: Undefined variable b
|
||||
033: b := 1 = 1;
|
||||
LINE (33:12) ** TYPE ERROR: Assignable Assign Expression - Object undefined of type undefined != Object $t15 of type Boolean
|
||||
LINE (33:12) ** TYPE ERROR: Assignable Assign Expression - Object undefined of type undefined != Object $t21 of type Boolean
|
||||
LINE (33:12) ** TYPE ERROR: Invalid type passed to assignable.
|
||||
LINE (33:2) ** TYPE ERROR: Undefined variable b
|
||||
034:
|
||||
@ -84,7 +84,7 @@
|
||||
036:
|
||||
037: b := 1 = b;
|
||||
LINE (37:12) ** TYPE ERROR: Invalid type passed to assignable.
|
||||
LINE (37:12) ** TYPE ERROR: Object $t16 of type integer and Object undefined of type undefined must both be the same type
|
||||
LINE (37:12) ** TYPE ERROR: Object $t22 of type integer and Object undefined of type undefined must both be the same type
|
||||
LINE (37:11) ** TYPE ERROR: Undefined variable b
|
||||
LINE (37:2) ** TYPE ERROR: Undefined variable b
|
||||
038:
|
||||
|
10
tests/sprint3/expected/sp3_arr_reserve.asc.exp
Normal file
10
tests/sprint3/expected/sp3_arr_reserve.asc.exp
Normal file
@ -0,0 +1,10 @@
|
||||
001: type main: string -> integer
|
||||
002: function entry: main
|
||||
003: type t: 3 -> integer
|
||||
004:
|
||||
005:
|
||||
006: entry (arg) := {
|
||||
007: [ t:a]
|
||||
008: a := reserve a(1, 3, 4);
|
||||
009: return 0;
|
||||
010: }
|
@ -10,8 +10,8 @@
|
||||
LINE (8:18) ** TYPE ERROR: Object arr of type address and Object $t2 of type integer must both be the same type
|
||||
009: b1 := 6<7 & arr2=7;
|
||||
LINE (9:23) ** TYPE ERROR: Assignable Assign Expression - Object b1 of type Boolean != Object undefined of type undefined
|
||||
LINE (9:23) ** TYPE ERROR: Object $t5 of type Boolean and Object undefined of type undefined must both be Boolean
|
||||
LINE (9:23) ** TYPE ERROR: Object arr2 of type address and Object $t6 of type integer must both be the same type
|
||||
LINE (9:23) ** TYPE ERROR: Object $t6 of type Boolean and Object undefined of type undefined must both be Boolean
|
||||
LINE (9:23) ** TYPE ERROR: Object arr2 of type address and Object $t7 of type integer must both be the same type
|
||||
010:
|
||||
011: return 0;
|
||||
012: }
|
||||
|
@ -11,20 +11,17 @@
|
||||
011:
|
||||
012: one_name := "a string literal";
|
||||
013: another_name := reserve another_name(4); (* reserve space for an an array of character, with 4 members *)
|
||||
LINE (13:44) ** TYPE ERROR: Assignable Assign Expression - Object another_name of type string != Object undefined of type undefined
|
||||
014: another_name(0) := 'C';
|
||||
015: another_name(1) := 'a';
|
||||
016: another_name(2) := 'r';
|
||||
017: another_name(3) := 'l';
|
||||
018: many_names := reserve many_names(3);
|
||||
LINE (18:40) ** TYPE ERROR: Assignable Assign Expression - Object many_names of type a_of_s != Object undefined of type undefined
|
||||
019: many_names(0) := one_name;
|
||||
020: many_names(1) := another_name;
|
||||
021: many_names(2) := reserve many_names(2)(6); (* reserve space for an item of the same type as a_of_s(2), an array of character, with 6 members *)
|
||||
LINE (21:45) ** SYNTAX ERROR: Incorrect syntax at token ')'
|
||||
LINE (21:44) ** SYNTAX ERROR: Incorrect syntax at token '6'
|
||||
LINE (21:43) ** SYNTAX ERROR: Incorrect syntax at token '('
|
||||
LINE (21:43) ** TYPE ERROR: Assignable Assign Expression - Object $t20 of type string != Object undefined of type undefined
|
||||
022: many_names(2)(0) := 'P';
|
||||
023: many_names(2)(1) := 'a';
|
||||
024: many_names(2)(2) := 'r';
|
||||
|
@ -11,15 +11,12 @@
|
||||
011: }
|
||||
012:
|
||||
013: entry (arg) := {
|
||||
014: [ integer: result ; rec: w]
|
||||
015: if ( result = result ) then {
|
||||
016: if ( result < w.y ) then {
|
||||
017: result := 8;
|
||||
018: } else {
|
||||
019: result := 9;
|
||||
020: }(* *)
|
||||
021: } else {
|
||||
022: result := bar('c', 7);
|
||||
023: }
|
||||
024: return 0;
|
||||
025: }
|
||||
014: [ integer: r ; integer: s; Boolean: x]
|
||||
015: (* x := (r < s) & x; *)
|
||||
016: if ( ( r < s ) & (s = r) ) then {
|
||||
017: r := 5;
|
||||
018: } else {
|
||||
019: r := 7;
|
||||
020: }
|
||||
021: return 0;
|
||||
022: }
|
||||
|
25
tests/sprint3/expected/sp3_if_else_nested_exp.asc.exp
Normal file
25
tests/sprint3/expected/sp3_if_else_nested_exp.asc.exp
Normal file
@ -0,0 +1,25 @@
|
||||
001: type rec: [character: x; integer: y]
|
||||
002:
|
||||
003: type T2: rec -> integer
|
||||
004:
|
||||
005: type main: string -> integer
|
||||
006: function entry: main
|
||||
007: function bar: T2
|
||||
008:
|
||||
009: bar (r,s) := {
|
||||
010: return 0;
|
||||
011: }
|
||||
012:
|
||||
013: entry (arg) := {
|
||||
014: [ integer: x ; integer: y; integer: z;integer: t]
|
||||
015:
|
||||
016: if ( (x = y) < ( z = t ) ) then {
|
||||
017: if ( (x < y) = ( z < t ) ) then {
|
||||
018: x := x;
|
||||
019: } else {
|
||||
020: x := 1; (* bar('c', 7); *)
|
||||
021: }
|
||||
022: } else {
|
||||
023: return 0;
|
||||
024: }
|
||||
025: }
|
31
tests/sprint3/expected/sp3_if_else_sse.asc.exp
Normal file
31
tests/sprint3/expected/sp3_if_else_sse.asc.exp
Normal file
@ -0,0 +1,31 @@
|
||||
001: type rec: [character: x; integer: y]
|
||||
002:
|
||||
003: type T2: rec -> integer
|
||||
004:
|
||||
005: type main: string -> integer
|
||||
006: function entry: main
|
||||
007: function bar: T2
|
||||
008:
|
||||
009: (*
|
||||
010: bar (r,s) := {
|
||||
011: return 0;
|
||||
012: }
|
||||
013:
|
||||
014: *)
|
||||
015: entry (arg) := {
|
||||
016: [ Boolean:x ; Boolean:y ; Boolean:z ; Boolean:t]
|
||||
017: if ( ( x & y ) ) then {
|
||||
018:
|
||||
019: (*
|
||||
020: if ( x<y & !(x=y) ) then {
|
||||
021: t := 8;
|
||||
022: } else {
|
||||
023: }
|
||||
024: *)
|
||||
025:
|
||||
026: z := x < y;
|
||||
027: } else {
|
||||
028: y := true; (* bar('c', 7); *)
|
||||
029: }
|
||||
030: return 0;
|
||||
031: }
|
34
tests/sprint3/expected/sp3_if_else_sse2.asc.exp
Normal file
34
tests/sprint3/expected/sp3_if_else_sse2.asc.exp
Normal file
@ -0,0 +1,34 @@
|
||||
001: type rec: [character: x; integer: y]
|
||||
002:
|
||||
003: type T2: rec -> integer
|
||||
004:
|
||||
005: type main: string -> integer
|
||||
006: function entry: main
|
||||
007: function bar: T2
|
||||
008:
|
||||
009: bar (r,s) := {
|
||||
010: return 0;
|
||||
011: }
|
||||
012:
|
||||
013: entry (arg) := {
|
||||
014: [ Boolean:x ; Boolean:y ; Boolean:z ; Boolean:t]
|
||||
015: (* if ( y & (z | t) ) then { *)
|
||||
016: if ( ( x = y ) & ( z < t ) ) then {
|
||||
017: (* y := z < t; *)
|
||||
018: t:= 0;
|
||||
019: } else {
|
||||
020: (* t := z = t; *)
|
||||
021: z := 1;
|
||||
022: }
|
||||
023: (*
|
||||
024: if ( x & y ) then {
|
||||
025: t := true;
|
||||
026: } else {
|
||||
027: y := true;
|
||||
028: }
|
||||
029: *)
|
||||
030: (* } else { *)
|
||||
031: (* } *)
|
||||
032: (* x := x & y; *)
|
||||
033: return 0;
|
||||
034: }
|
29
tests/sprint3/expected/sp3_while_nested_bools.asc.exp
Normal file
29
tests/sprint3/expected/sp3_while_nested_bools.asc.exp
Normal file
@ -0,0 +1,29 @@
|
||||
001: type rec: [character: x; integer: y]
|
||||
002:
|
||||
003: type T2: rec -> integer
|
||||
004:
|
||||
005: type main: string -> integer
|
||||
006: function entry: main
|
||||
007: function bar: T2
|
||||
008:
|
||||
009: bar (r,s) := {
|
||||
010: return 0;
|
||||
011: }
|
||||
012:
|
||||
013: entry (arg) := {
|
||||
014: [ Boolean: x ; Boolean: y; Boolean: z;Boolean: t]
|
||||
015: while ( ((x = y)) < ( z | t ) ) {
|
||||
016: while ( (x & y) = ( z < t ) ) {
|
||||
017: y := y;
|
||||
018: }
|
||||
019: (*
|
||||
020: x := x;
|
||||
021: *)
|
||||
022: if ( (x = y) = ( z < t ) ) then {
|
||||
023: x := 1;
|
||||
024: } else {
|
||||
025: x := 1;
|
||||
026: }
|
||||
027: }
|
||||
028: return 0;
|
||||
029: }
|
27
tests/sprint3/expected/sp3_while_sse.asc.exp
Normal file
27
tests/sprint3/expected/sp3_while_sse.asc.exp
Normal file
@ -0,0 +1,27 @@
|
||||
001: type rec: [character: x; integer: y]
|
||||
002:
|
||||
003: type T2: rec -> integer
|
||||
004:
|
||||
005: type main: string -> integer
|
||||
006: function entry: main
|
||||
007: function bar: T2
|
||||
008:
|
||||
009: bar (r,s) := {
|
||||
010: return 0;
|
||||
011: }
|
||||
012:
|
||||
013: entry (arg) := {
|
||||
014: [ Boolean:x ; Boolean:y ; Boolean:z ; Boolean:t]
|
||||
015: while ( ( x | y ) (* | ( z | t ) *) ) {
|
||||
016: (*
|
||||
017: if ( ( x < y ) & ( z = t ) ) then {
|
||||
018: y := z < t;
|
||||
019: } else {
|
||||
020: t := z = t;
|
||||
021: }
|
||||
022: *)
|
||||
023: y := t < z; (* bar('c', 7); *)
|
||||
024: }
|
||||
025: (* x := x & y; *)
|
||||
026: return 0;
|
||||
027: }
|
@ -1,4 +1,4 @@
|
||||
|
||||
(* TEST: [-asc -tc] *)
|
||||
type main: string -> integer
|
||||
function entry: main
|
||||
type t: 3 -> integer
|
||||
|
@ -1,3 +1,4 @@
|
||||
(* TEST: [-asc -tc] *)
|
||||
type rec: [character: x; integer: y]
|
||||
|
||||
type T2: rec -> integer
|
||||
|
@ -1,3 +1,4 @@
|
||||
(* TEST: [-asc -tc] *)
|
||||
type rec: [character: x; integer: y]
|
||||
|
||||
type T2: rec -> integer
|
||||
|
@ -1,3 +1,4 @@
|
||||
(* TEST: [-asc -tc] *)
|
||||
type rec: [character: x; integer: y]
|
||||
|
||||
type T2: rec -> integer
|
||||
|
@ -1,3 +1,4 @@
|
||||
(* TEST: [-asc -tc] *)
|
||||
type rec: [character: x; integer: y]
|
||||
|
||||
type T2: rec -> integer
|
||||
|
@ -1,3 +1,4 @@
|
||||
(* TEST: [-asc -tc] *)
|
||||
type rec: [character: x; integer: y]
|
||||
|
||||
type T2: rec -> integer
|
||||
|
Reference in New Issue
Block a user