Commit 2f9a8c04 authored by stancakapost's avatar stancakapost
Browse files

using match instead of ==

parent a8acabf4
......@@ -14,7 +14,7 @@ module NegSem_050402_actual_parameters_106 {
}
function f_test (integer p_val1, charstring p_val2, integer p_val3) {
if (p_val1 == 1 and p_val2 == "test" and p_val3 == 3) { setverdict(pass); }
if (match(p_val1, 1) and match(p_val2, "test") and match(p_val3, 3)) { setverdict(pass); }
else { setverdict(fail); }
}
......
......@@ -33,7 +33,7 @@ module Sem_050402_actual_parameters_152 {
field2 := ?
};
f_test(v_rec.field2.subfield1); // tested parameter passing (using referencing rules specified at 15.6.2)
if (valueof(v_rec.field2.subfield1) == 10 and match(0, v_rec.field2.subfield2)) { setverdict(pass); }
if (match(valueof(v_rec.field2.subfield1), 10) and match(0, v_rec.field2.subfield2)) { setverdict(pass); }
else { setverdict(fail); }
}
......
......@@ -35,7 +35,7 @@ module Sem_050402_actual_parameters_154 {
field2 := ?
};
f_test(v_rec.field2.subfield1); // tested parameter passing (using referencing rules specified at 15.6.2)
if (valueof(v_rec.field2.subfield1) == 10 and match(0, v_rec.field2.subfield2)) { setverdict(pass); }
if (match(valueof(v_rec.field2.subfield1), 10) and match(0, v_rec.field2.subfield2)) { setverdict(pass); }
else { setverdict(fail); }
}
......
......@@ -15,7 +15,7 @@ module Sem_050402_actual_parameters_175 {
}
function f_test (integer p_val1 := 10, integer p_val2) {
if (p_val1 == 10 and p_val2 == 2) { setverdict(pass); }
if (match(p_val1, 10) and match(p_val2, 2)) { setverdict(pass); }
else { setverdict(fail); }
}
......
......@@ -15,7 +15,7 @@ module Sem_050402_actual_parameters_177 {
}
function f_test (integer p_val1, integer p_val2 := 20) {
if (p_val1 == 1 and p_val2 == 20) { setverdict(pass); }
if (match(p_val1, 1) and match(p_val2, 20)) { setverdict(pass); }
else { setverdict(fail); }
}
......
......@@ -16,7 +16,7 @@ module Sem_050402_actual_parameters_178 {
}
function f_test (integer p_val1, integer p_val2 := 20) {
if (p_val1 == 1 and p_val2 == 20) { setverdict(pass); }
if (match(p_val1, 1) and match(p_val2, 20)) { setverdict(pass); }
else { setverdict(fail); }
}
......
......@@ -21,7 +21,7 @@ module Sem_050402_actual_parameters_191 {
}
function f_test (R p_val) {
if (p_val.field1 == 1 and not isbound(p_val.field2)) { setverdict(pass); }
if (match(p_val.field1, 1) and not isbound(p_val.field2)) { setverdict(pass); }
else { setverdict(fail); }
}
......
......@@ -21,7 +21,7 @@ module Sem_050402_actual_parameters_192 {
}
function f_test (inout R p_val) {
if (p_val.field1 == 1 and not isbound(p_val.field2)) { setverdict(pass); }
if (match(p_val.field1, 1) and not isbound(p_val.field2)) { setverdict(pass); }
else { setverdict(fail); }
}
......
......@@ -42,7 +42,7 @@ module Sem_06020101_ReferencingRecordFields_012 {
var R v_rec;
v_rec.field1.option1[0].nested1 := 0;
if (isbound(v_rec) and isbound(v_rec.field1) and not isbound(v_rec.field2) and
v_rec.field1.option1[0].nested1 == 0 and not isbound(v_rec.field1.option1[0].nested2)) {
match(v_rec.field1.option1[0].nested1, 0) and not isbound(v_rec.field1.option1[0].nested2)) {
setverdict(pass);
} else {
setverdict(fail);
......
......@@ -46,7 +46,7 @@ module Sem_06020101_ReferencingRecordFields_016 {
v_rec.sub.field1.subfield1.nested1 := 0;
if (isbound(v_rec.sub) and isbound(v_rec.sub.field1) and not isbound(v_rec.sub.field2) and
isbound(v_rec.sub.field1.subfield1) and not isbound(v_rec.sub.field1.subfield2) and
v_rec.sub.field1.subfield1.nested1 == 0 and not isbound(v_rec.sub.field1.subfield1.nested2)) {
match(v_rec.sub.field1.subfield1.nested1, 0) and not isbound(v_rec.sub.field1.subfield1.nested2)) {
setverdict(pass);
} else {
setverdict(fail);
......
......@@ -45,7 +45,7 @@ module Sem_06020101_ReferencingRecordFields_017 {
v_rec.sub := omit;
v_rec.sub.field1.option1[0].nested1 := 0;
if (isbound(v_rec) and isbound(v_rec.sub.field1) and not isbound(v_rec.sub.field2) and
v_rec.sub.field1.option1[0].nested1 == 0 and not isbound(v_rec.sub.field1.option1[0].nested2)) {
match(v_rec.sub.field1.option1[0].nested1, 0) and not isbound(v_rec.sub.field1.option1[0].nested2)) {
setverdict(pass);
} else {
setverdict(fail);
......
......@@ -27,7 +27,7 @@ module Sem_060203_records_and_sets_of_single_types_002 {
[2] := -
};
if (v_rec[0] == 0 and v_rec[1] == 1 and not isbound(v_rec[2])
if (match(v_rec[0], 0) and match(v_rec[1], 1) and not isbound(v_rec[2])
and lengthof (v_rec & {2}) == 4) {
setverdict(pass);
}
......
......@@ -27,7 +27,7 @@ module Sem_060203_records_and_sets_of_single_types_003 {
[2] := -
};
if (v_set[0] == 0 and v_set[1] == 1 and not isbound(v_set[2])
if (match(v_set[0], 0) and match(v_set[1], 1) and not isbound(v_set[2])
and lengthof (v_set & {2}) == 4) {
setverdict(pass);
}
......
......@@ -23,7 +23,7 @@ module Sem_060203_records_and_sets_of_single_types_004 {
[1] := 1
};
if (not isbound(v_rec[0]) and v_rec[1] == 1) {
if (not isbound(v_rec[0]) and match(v_rec[1], 1)) {
setverdict(pass);
}
else {
......
......@@ -23,7 +23,7 @@ module Sem_060203_records_and_sets_of_single_types_005 {
[1] := 1
};
if (not isbound(v_set[0]) and v_set[1] == 1) {
if (not isbound(v_set[0]) and match(v_set[1], 1)) {
setverdict(pass);
}
else {
......
......@@ -20,7 +20,7 @@ module Sem_060203_records_and_sets_of_single_types_008 {
testcase TC_Sem_060203_records_and_sets_of_single_types_008() runs on GeneralComp {
var RoI v_rec := { 0, 1, - };
if (v_rec[0] == 0 and v_rec[1] == 1 and not isbound(v_rec[2])
if (match(v_rec[0], 0) and match(v_rec[1], 1) and not isbound(v_rec[2])
and lengthof (v_rec & {2}) == 4) {
setverdict(pass);
}
......
......@@ -20,7 +20,7 @@ module Sem_060203_records_and_sets_of_single_types_009 {
testcase TC_Sem_060203_records_and_sets_of_single_types_009() runs on GeneralComp {
var SoI v_set := { 0, 1, - };
if (v_set[0] == 0 and v_set[1] == 1 and not isbound(v_set[2])
if (match(v_set[0], 0) and match(v_set[1], 1) and not isbound(v_set[2])
and lengthof (v_set & {2}) == 4) {
setverdict(pass);
}
......
......@@ -21,10 +21,10 @@ module Sem_060203_records_and_sets_of_single_types_019 {
var RoI v_rec := { 0, 1 };
v_rec[3] := 3; // {0, 1, -, 3}
if (v_rec[0] == 0 and
v_rec[1] == 1 and
if (match(v_rec[0], 0) and
match(v_rec[1], 1) and
not isbound(v_rec[2]) and
v_rec[3] == 3) {
match(v_rec[3], 3)) {
setverdict(pass);
}
else {
......
......@@ -21,10 +21,10 @@ module Sem_060203_records_and_sets_of_single_types_020 {
var SoI v_set := { 0, 1 };
v_set[3] := 3; // {0, 1, -, 3}
if (v_set[0] == 0 and
v_set[1] == 1 and
if (match(v_set[0], 0) and
match(v_set[1], 1) and
not isbound(v_set[2]) and
v_set[3] == 3) {
match(v_set[3], 3)) {
setverdict(pass);
}
else {
......
......@@ -23,7 +23,7 @@ module Sem_060203_records_and_sets_of_single_types_021 {
v_rec[2] := 2; // {-, -, 2}
if (not isbound(v_rec[0]) and
not isbound(v_rec[1]) and
v_rec[2] == 2) {
match(v_rec[2], 2)) {
setverdict(pass);
}
else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment