diff --git a/tests-system/rbt-endswith-semantics/foo.trlc b/tests-system/rbt-endswith-semantics/foo.trlc index 5013e98..7a96754 100644 --- a/tests-system/rbt-endswith-semantics/foo.trlc +++ b/tests-system/rbt-endswith-semantics/foo.trlc @@ -3,3 +3,7 @@ package Foo T Bar { b = "kitten" } + +T Baz { + b = "dog" +} diff --git a/tests-system/rbt-endswith-semantics/output b/tests-system/rbt-endswith-semantics/output index a36e3ba..955c7b2 100644 --- a/tests-system/rbt-endswith-semantics/output +++ b/tests-system/rbt-endswith-semantics/output @@ -1 +1,3 @@ -Processed 1 model and 1 requirement file and found no issues +b = "dog" + ^^^^^ rbt-endswith-semantics/foo.trlc:8: check warning: b should end with en +Processed 1 model and 1 requirement file and found 1 warning diff --git a/tests-system/rbt-endswith-semantics/output.brief b/tests-system/rbt-endswith-semantics/output.brief index e69de29..2dfdfc0 100644 --- a/tests-system/rbt-endswith-semantics/output.brief +++ b/tests-system/rbt-endswith-semantics/output.brief @@ -0,0 +1 @@ +rbt-endswith-semantics/foo.trlc:8:9: trlc check warning: b should end with en diff --git a/tests-system/rbt-endswith-semantics/output.json b/tests-system/rbt-endswith-semantics/output.json index 37f5ecf..25c1c2d 100644 --- a/tests-system/rbt-endswith-semantics/output.json +++ b/tests-system/rbt-endswith-semantics/output.json @@ -1,6 +1,11 @@ +b = "dog" + ^^^^^ rbt-endswith-semantics/foo.trlc:8: check warning: b should end with en { "Bar": { "b": "kitten" + }, + "Baz": { + "b": "dog" } } -Processed 1 model and 1 requirement file and found no issues +Processed 1 model and 1 requirement file and found 1 warning diff --git a/tests-system/rbt-endswith-semantics/output.smtlib b/tests-system/rbt-endswith-semantics/output.smtlib index a36e3ba..955c7b2 100644 --- a/tests-system/rbt-endswith-semantics/output.smtlib +++ b/tests-system/rbt-endswith-semantics/output.smtlib @@ -1 +1,3 @@ -Processed 1 model and 1 requirement file and found no issues +b = "dog" + ^^^^^ rbt-endswith-semantics/foo.trlc:8: check warning: b should end with en +Processed 1 model and 1 requirement file and found 1 warning diff --git a/tests-system/rbt-len-semantics/foo.rsl b/tests-system/rbt-len-semantics/foo.rsl index ea05208..01823f7 100644 --- a/tests-system/rbt-len-semantics/foo.rsl +++ b/tests-system/rbt-len-semantics/foo.rsl @@ -2,7 +2,6 @@ package Foo type T { a String - b Integer c Integer[1..*] } diff --git a/tests-system/rbt-len-semantics/foo.trlc b/tests-system/rbt-len-semantics/foo.trlc index f3bd6ce..354b368 100644 --- a/tests-system/rbt-len-semantics/foo.trlc +++ b/tests-system/rbt-len-semantics/foo.trlc @@ -2,6 +2,5 @@ package Foo T Bar { a = "potato" - b = 1 c = [2,1] } diff --git a/tests-system/rbt-len-semantics/output.json b/tests-system/rbt-len-semantics/output.json index fa39147..5426a89 100644 --- a/tests-system/rbt-len-semantics/output.json +++ b/tests-system/rbt-len-semantics/output.json @@ -1,7 +1,6 @@ { "Bar": { "a": "potato", - "b": 1, "c": [ 2, 1 diff --git a/tests-system/rbt-matches-semantics/foo.rsl b/tests-system/rbt-matches-semantics/foo.rsl index aac4b3b..61010e5 100644 --- a/tests-system/rbt-matches-semantics/foo.rsl +++ b/tests-system/rbt-matches-semantics/foo.rsl @@ -3,9 +3,13 @@ package Foo type T { a String b String - c Integer + c String + d String } checks T { - matches(a, "potato"), warning "a should match with potato", a + matches(a, "^[a-zA-Z0-9]{6,12}$"), warning "a should match with 6 to 12 letters or digits", a + matches(b, "\w+"), warning "b should match only letters, digits, or underscores.", b + matches(c, "potato"), warning "b should start with 'potato'.", c + matches(d, "^D.*"), warning "d should start with D", d } diff --git a/tests-system/rbt-matches-semantics/foo.trlc b/tests-system/rbt-matches-semantics/foo.trlc index 7170051..2963701 100644 --- a/tests-system/rbt-matches-semantics/foo.trlc +++ b/tests-system/rbt-matches-semantics/foo.trlc @@ -1,7 +1,15 @@ package Foo -T Bar { - a = "potato" - b = "kitten" - c = 1 +T No_Regex_Matches { + a = "123456789 abcdefghijklmn" + b = "??...kitten_...??" + c = "not potato" + d = "not Diego" +} + +T All_Regex_Matches { + a = "123abc" + b = "3_kitten_" + c = "potato and tomato sauce" + d = "Diego" } diff --git a/tests-system/rbt-matches-semantics/output b/tests-system/rbt-matches-semantics/output index a36e3ba..6eca8c3 100644 --- a/tests-system/rbt-matches-semantics/output +++ b/tests-system/rbt-matches-semantics/output @@ -1 +1,9 @@ -Processed 1 model and 1 requirement file and found no issues +a = "123456789 abcdefghijklmn" + ^^^^^^^^^^^^^^^^^^^^^^^^^^ rbt-matches-semantics/foo.trlc:4: check warning: a should match with 6 to 12 letters or digits +b = "??...kitten_...??" + ^^^^^^^^^^^^^^^^^^^ rbt-matches-semantics/foo.trlc:5: check warning: b should match only letters, digits, or underscores. +c = "not potato" + ^^^^^^^^^^^^ rbt-matches-semantics/foo.trlc:6: check warning: b should start with 'potato'. +d = "not Diego" + ^^^^^^^^^^^ rbt-matches-semantics/foo.trlc:7: check warning: d should start with D +Processed 1 model and 1 requirement file and found 4 warnings diff --git a/tests-system/rbt-matches-semantics/output.brief b/tests-system/rbt-matches-semantics/output.brief index e69de29..012393b 100644 --- a/tests-system/rbt-matches-semantics/output.brief +++ b/tests-system/rbt-matches-semantics/output.brief @@ -0,0 +1,4 @@ +rbt-matches-semantics/foo.trlc:4:9: trlc check warning: a should match with 6 to 12 letters or digits +rbt-matches-semantics/foo.trlc:5:9: trlc check warning: b should match only letters, digits, or underscores. +rbt-matches-semantics/foo.trlc:6:9: trlc check warning: b should start with 'potato'. +rbt-matches-semantics/foo.trlc:7:9: trlc check warning: d should start with D diff --git a/tests-system/rbt-matches-semantics/output.json b/tests-system/rbt-matches-semantics/output.json index 4d25cf1..9885b02 100644 --- a/tests-system/rbt-matches-semantics/output.json +++ b/tests-system/rbt-matches-semantics/output.json @@ -1,8 +1,23 @@ +a = "123456789 abcdefghijklmn" + ^^^^^^^^^^^^^^^^^^^^^^^^^^ rbt-matches-semantics/foo.trlc:4: check warning: a should match with 6 to 12 letters or digits +b = "??...kitten_...??" + ^^^^^^^^^^^^^^^^^^^ rbt-matches-semantics/foo.trlc:5: check warning: b should match only letters, digits, or underscores. +c = "not potato" + ^^^^^^^^^^^^ rbt-matches-semantics/foo.trlc:6: check warning: b should start with 'potato'. +d = "not Diego" + ^^^^^^^^^^^ rbt-matches-semantics/foo.trlc:7: check warning: d should start with D { - "Bar": { - "a": "potato", - "b": "kitten", - "c": 1 + "All_Regex_Matches": { + "a": "123abc", + "b": "3_kitten_", + "c": "potato and tomato sauce", + "d": "Diego" + }, + "No_Regex_Matches": { + "a": "123456789 abcdefghijklmn", + "b": "??...kitten_...??", + "c": "not potato", + "d": "not Diego" } } -Processed 1 model and 1 requirement file and found no issues +Processed 1 model and 1 requirement file and found 4 warnings diff --git a/tests-system/rbt-matches-semantics/output.smtlib b/tests-system/rbt-matches-semantics/output.smtlib index a36e3ba..6eca8c3 100644 --- a/tests-system/rbt-matches-semantics/output.smtlib +++ b/tests-system/rbt-matches-semantics/output.smtlib @@ -1 +1,9 @@ -Processed 1 model and 1 requirement file and found no issues +a = "123456789 abcdefghijklmn" + ^^^^^^^^^^^^^^^^^^^^^^^^^^ rbt-matches-semantics/foo.trlc:4: check warning: a should match with 6 to 12 letters or digits +b = "??...kitten_...??" + ^^^^^^^^^^^^^^^^^^^ rbt-matches-semantics/foo.trlc:5: check warning: b should match only letters, digits, or underscores. +c = "not potato" + ^^^^^^^^^^^^ rbt-matches-semantics/foo.trlc:6: check warning: b should start with 'potato'. +d = "not Diego" + ^^^^^^^^^^^ rbt-matches-semantics/foo.trlc:7: check warning: d should start with D +Processed 1 model and 1 requirement file and found 4 warnings diff --git a/tests-system/rbt-signature-len-1/foo.rsl b/tests-system/rbt-signature-len-1/foo.rsl index 353b0a6..42a2add 100644 --- a/tests-system/rbt-signature-len-1/foo.rsl +++ b/tests-system/rbt-signature-len-1/foo.rsl @@ -3,7 +3,6 @@ package Foo type T { a String b Integer - c Integer[1..*] } checks T { diff --git a/tests-system/rbt-signature-len-1/output b/tests-system/rbt-signature-len-1/output index c752dc9..90aad6f 100644 --- a/tests-system/rbt-signature-len-1/output +++ b/tests-system/rbt-signature-len-1/output @@ -1,3 +1,3 @@ len(b) > 7, "b must be longer than 7" - ^ rbt-signature-len-1/foo.rsl:11: error: expected expression of type Array_Type, got Builtin_Integer instead + ^ rbt-signature-len-1/foo.rsl:10: error: expected expression of type Array_Type, got Builtin_Integer instead Processed 1 model and 0 requirement files and found 1 error diff --git a/tests-system/rbt-signature-len-1/output.brief b/tests-system/rbt-signature-len-1/output.brief index ec52256..7648363 100644 --- a/tests-system/rbt-signature-len-1/output.brief +++ b/tests-system/rbt-signature-len-1/output.brief @@ -1 +1 @@ -rbt-signature-len-1/foo.rsl:11:9: trlc error: expected expression of type Array_Type, got Builtin_Integer instead +rbt-signature-len-1/foo.rsl:10:9: trlc error: expected expression of type Array_Type, got Builtin_Integer instead diff --git a/tests-system/rbt-signature-len-1/output.json b/tests-system/rbt-signature-len-1/output.json index c752dc9..90aad6f 100644 --- a/tests-system/rbt-signature-len-1/output.json +++ b/tests-system/rbt-signature-len-1/output.json @@ -1,3 +1,3 @@ len(b) > 7, "b must be longer than 7" - ^ rbt-signature-len-1/foo.rsl:11: error: expected expression of type Array_Type, got Builtin_Integer instead + ^ rbt-signature-len-1/foo.rsl:10: error: expected expression of type Array_Type, got Builtin_Integer instead Processed 1 model and 0 requirement files and found 1 error diff --git a/tests-system/rbt-signature-len-1/output.smtlib b/tests-system/rbt-signature-len-1/output.smtlib index c752dc9..90aad6f 100644 --- a/tests-system/rbt-signature-len-1/output.smtlib +++ b/tests-system/rbt-signature-len-1/output.smtlib @@ -1,3 +1,3 @@ len(b) > 7, "b must be longer than 7" - ^ rbt-signature-len-1/foo.rsl:11: error: expected expression of type Array_Type, got Builtin_Integer instead + ^ rbt-signature-len-1/foo.rsl:10: error: expected expression of type Array_Type, got Builtin_Integer instead Processed 1 model and 0 requirement files and found 1 error diff --git a/tests-system/rbt-signature-len-2/foo.rsl b/tests-system/rbt-signature-len-2/foo.rsl index af918e0..d247819 100644 --- a/tests-system/rbt-signature-len-2/foo.rsl +++ b/tests-system/rbt-signature-len-2/foo.rsl @@ -2,7 +2,6 @@ package Foo type T { a String - b Integer c Integer[1..*] } diff --git a/tests-system/rbt-signature-len-2/foo.trlc b/tests-system/rbt-signature-len-2/foo.trlc index f3bd6ce..354b368 100644 --- a/tests-system/rbt-signature-len-2/foo.trlc +++ b/tests-system/rbt-signature-len-2/foo.trlc @@ -2,6 +2,5 @@ package Foo T Bar { a = "potato" - b = 1 c = [2,1] } diff --git a/tests-system/rbt-signature-len-2/output b/tests-system/rbt-signature-len-2/output index 5a01f12..f21b60f 100644 --- a/tests-system/rbt-signature-len-2/output +++ b/tests-system/rbt-signature-len-2/output @@ -1,3 +1,3 @@ len(a, c) > 7, "a and c must be longer than 7" -^^^ rbt-signature-len-2/foo.rsl:12: error: function requires 1 parameters +^^^ rbt-signature-len-2/foo.rsl:11: error: function requires 1 parameters Processed 1 model and 1 requirement file and found 1 error diff --git a/tests-system/rbt-signature-len-2/output.brief b/tests-system/rbt-signature-len-2/output.brief index 58e08a1..3fb8f57 100644 --- a/tests-system/rbt-signature-len-2/output.brief +++ b/tests-system/rbt-signature-len-2/output.brief @@ -1 +1 @@ -rbt-signature-len-2/foo.rsl:12:5: trlc error: function requires 1 parameters +rbt-signature-len-2/foo.rsl:11:5: trlc error: function requires 1 parameters diff --git a/tests-system/rbt-signature-len-2/output.json b/tests-system/rbt-signature-len-2/output.json index 5a01f12..f21b60f 100644 --- a/tests-system/rbt-signature-len-2/output.json +++ b/tests-system/rbt-signature-len-2/output.json @@ -1,3 +1,3 @@ len(a, c) > 7, "a and c must be longer than 7" -^^^ rbt-signature-len-2/foo.rsl:12: error: function requires 1 parameters +^^^ rbt-signature-len-2/foo.rsl:11: error: function requires 1 parameters Processed 1 model and 1 requirement file and found 1 error diff --git a/tests-system/rbt-signature-len-2/output.smtlib b/tests-system/rbt-signature-len-2/output.smtlib index 5a01f12..f21b60f 100644 --- a/tests-system/rbt-signature-len-2/output.smtlib +++ b/tests-system/rbt-signature-len-2/output.smtlib @@ -1,3 +1,3 @@ len(a, c) > 7, "a and c must be longer than 7" -^^^ rbt-signature-len-2/foo.rsl:12: error: function requires 1 parameters +^^^ rbt-signature-len-2/foo.rsl:11: error: function requires 1 parameters Processed 1 model and 1 requirement file and found 1 error diff --git a/tests-system/rbt-signature-matches-1/foo.rsl b/tests-system/rbt-signature-matches-1/foo.rsl index abd2d62..fa46af4 100644 --- a/tests-system/rbt-signature-matches-1/foo.rsl +++ b/tests-system/rbt-signature-matches-1/foo.rsl @@ -1,8 +1,6 @@ package Foo type T { - a String - b String c Integer } diff --git a/tests-system/rbt-signature-matches-1/output b/tests-system/rbt-signature-matches-1/output index 399804d..35155c1 100644 --- a/tests-system/rbt-signature-matches-1/output +++ b/tests-system/rbt-signature-matches-1/output @@ -1,3 +1,3 @@ matches(c, "potato"), warning "a should match with potato", a - ^ rbt-signature-matches-1/foo.rsl:10: error: expected expression of type Builtin_String, got Builtin_Integer instead + ^ rbt-signature-matches-1/foo.rsl:8: error: expected expression of type Builtin_String, got Builtin_Integer instead Processed 1 model and 0 requirement files and found 1 error diff --git a/tests-system/rbt-signature-matches-1/output.brief b/tests-system/rbt-signature-matches-1/output.brief index 97880a4..576463a 100644 --- a/tests-system/rbt-signature-matches-1/output.brief +++ b/tests-system/rbt-signature-matches-1/output.brief @@ -1 +1 @@ -rbt-signature-matches-1/foo.rsl:10:13: trlc error: expected expression of type Builtin_String, got Builtin_Integer instead +rbt-signature-matches-1/foo.rsl:8:13: trlc error: expected expression of type Builtin_String, got Builtin_Integer instead diff --git a/tests-system/rbt-signature-matches-1/output.json b/tests-system/rbt-signature-matches-1/output.json index 399804d..35155c1 100644 --- a/tests-system/rbt-signature-matches-1/output.json +++ b/tests-system/rbt-signature-matches-1/output.json @@ -1,3 +1,3 @@ matches(c, "potato"), warning "a should match with potato", a - ^ rbt-signature-matches-1/foo.rsl:10: error: expected expression of type Builtin_String, got Builtin_Integer instead + ^ rbt-signature-matches-1/foo.rsl:8: error: expected expression of type Builtin_String, got Builtin_Integer instead Processed 1 model and 0 requirement files and found 1 error diff --git a/tests-system/rbt-signature-matches-1/output.smtlib b/tests-system/rbt-signature-matches-1/output.smtlib index 399804d..35155c1 100644 --- a/tests-system/rbt-signature-matches-1/output.smtlib +++ b/tests-system/rbt-signature-matches-1/output.smtlib @@ -1,3 +1,3 @@ matches(c, "potato"), warning "a should match with potato", a - ^ rbt-signature-matches-1/foo.rsl:10: error: expected expression of type Builtin_String, got Builtin_Integer instead + ^ rbt-signature-matches-1/foo.rsl:8: error: expected expression of type Builtin_String, got Builtin_Integer instead Processed 1 model and 0 requirement files and found 1 error diff --git a/tests-system/rbt-signature-matches-2/foo.rsl b/tests-system/rbt-signature-matches-2/foo.rsl index ed1a976..e97a8da 100644 --- a/tests-system/rbt-signature-matches-2/foo.rsl +++ b/tests-system/rbt-signature-matches-2/foo.rsl @@ -3,7 +3,6 @@ package Foo type T { a String b String - c Integer } checks T { diff --git a/tests-system/rbt-signature-matches-2/foo.trlc b/tests-system/rbt-signature-matches-2/foo.trlc index 7170051..c087758 100644 --- a/tests-system/rbt-signature-matches-2/foo.trlc +++ b/tests-system/rbt-signature-matches-2/foo.trlc @@ -3,5 +3,4 @@ package Foo T Bar { a = "potato" b = "kitten" - c = 1 } diff --git a/tests-system/rbt-signature-matches-2/output b/tests-system/rbt-signature-matches-2/output index a31ebfd..279c281 100644 --- a/tests-system/rbt-signature-matches-2/output +++ b/tests-system/rbt-signature-matches-2/output @@ -1,3 +1,3 @@ matches(a, b, "potato"), warning "a should match with potato", a -^^^^^^^ rbt-signature-matches-2/foo.rsl:10: error: function requires 2 parameters +^^^^^^^ rbt-signature-matches-2/foo.rsl:9: error: function requires 2 parameters Processed 1 model and 1 requirement file and found 1 error diff --git a/tests-system/rbt-signature-matches-2/output.brief b/tests-system/rbt-signature-matches-2/output.brief index 3d36448..fc81881 100644 --- a/tests-system/rbt-signature-matches-2/output.brief +++ b/tests-system/rbt-signature-matches-2/output.brief @@ -1 +1 @@ -rbt-signature-matches-2/foo.rsl:10:5: trlc error: function requires 2 parameters +rbt-signature-matches-2/foo.rsl:9:5: trlc error: function requires 2 parameters diff --git a/tests-system/rbt-signature-matches-2/output.json b/tests-system/rbt-signature-matches-2/output.json index a31ebfd..279c281 100644 --- a/tests-system/rbt-signature-matches-2/output.json +++ b/tests-system/rbt-signature-matches-2/output.json @@ -1,3 +1,3 @@ matches(a, b, "potato"), warning "a should match with potato", a -^^^^^^^ rbt-signature-matches-2/foo.rsl:10: error: function requires 2 parameters +^^^^^^^ rbt-signature-matches-2/foo.rsl:9: error: function requires 2 parameters Processed 1 model and 1 requirement file and found 1 error diff --git a/tests-system/rbt-signature-matches-2/output.smtlib b/tests-system/rbt-signature-matches-2/output.smtlib index a31ebfd..279c281 100644 --- a/tests-system/rbt-signature-matches-2/output.smtlib +++ b/tests-system/rbt-signature-matches-2/output.smtlib @@ -1,3 +1,3 @@ matches(a, b, "potato"), warning "a should match with potato", a -^^^^^^^ rbt-signature-matches-2/foo.rsl:10: error: function requires 2 parameters +^^^^^^^ rbt-signature-matches-2/foo.rsl:9: error: function requires 2 parameters Processed 1 model and 1 requirement file and found 1 error diff --git a/tests-system/rbt-signature-matches-3/foo.rsl b/tests-system/rbt-signature-matches-3/foo.rsl index e30fd89..923237a 100644 --- a/tests-system/rbt-signature-matches-3/foo.rsl +++ b/tests-system/rbt-signature-matches-3/foo.rsl @@ -7,5 +7,5 @@ type T { } checks T { - matches(a, "(abc(def)"), warning "a should match with potato", a + matches(a, "(abc(def)"), warning "a should match with the regex (abc(def))", a } diff --git a/tests-system/rbt-signature-matches-3/output b/tests-system/rbt-signature-matches-3/output index 16cec37..e542ac9 100644 --- a/tests-system/rbt-signature-matches-3/output +++ b/tests-system/rbt-signature-matches-3/output @@ -1,3 +1,3 @@ -matches(a, "(abc(def)"), warning "a should match with potato", a +matches(a, "(abc(def)"), warning "a should match with the regex (abc(def))", a ^^^^^^^^^^^ rbt-signature-matches-3/foo.rsl:10: error: missing ), unterminated subpattern at position 0 Processed 1 model and 1 requirement file and found 1 error diff --git a/tests-system/rbt-signature-matches-3/output.json b/tests-system/rbt-signature-matches-3/output.json index 16cec37..e542ac9 100644 --- a/tests-system/rbt-signature-matches-3/output.json +++ b/tests-system/rbt-signature-matches-3/output.json @@ -1,3 +1,3 @@ -matches(a, "(abc(def)"), warning "a should match with potato", a +matches(a, "(abc(def)"), warning "a should match with the regex (abc(def))", a ^^^^^^^^^^^ rbt-signature-matches-3/foo.rsl:10: error: missing ), unterminated subpattern at position 0 Processed 1 model and 1 requirement file and found 1 error diff --git a/tests-system/rbt-signature-matches-3/output.smtlib b/tests-system/rbt-signature-matches-3/output.smtlib index 16cec37..e542ac9 100644 --- a/tests-system/rbt-signature-matches-3/output.smtlib +++ b/tests-system/rbt-signature-matches-3/output.smtlib @@ -1,3 +1,3 @@ -matches(a, "(abc(def)"), warning "a should match with potato", a +matches(a, "(abc(def)"), warning "a should match with the regex (abc(def))", a ^^^^^^^^^^^ rbt-signature-matches-3/foo.rsl:10: error: missing ), unterminated subpattern at position 0 Processed 1 model and 1 requirement file and found 1 error diff --git a/tests-system/rbt-signature-string-end-functions-1/foo.rsl b/tests-system/rbt-signature-string-end-functions-1/foo.rsl index 48e2821..c20c6f2 100644 --- a/tests-system/rbt-signature-string-end-functions-1/foo.rsl +++ b/tests-system/rbt-signature-string-end-functions-1/foo.rsl @@ -2,13 +2,10 @@ package Foo type T { a String - b String c Integer } checks T { startswith(a, "po"), warning "a should start with po", a - startswith(b, "po"), warning "b should start with po", b - endswith(c, "en"), warning "a should end with en", c - endswith(b, "en"), warning "b should end with en", b + startswith(c, "po"), warning "b should start with po", b } diff --git a/tests-system/rbt-signature-string-end-functions-1/output b/tests-system/rbt-signature-string-end-functions-1/output index 3914fdb..b26ced9 100644 --- a/tests-system/rbt-signature-string-end-functions-1/output +++ b/tests-system/rbt-signature-string-end-functions-1/output @@ -1,3 +1,3 @@ -endswith(c, "en"), warning "a should end with en", c - ^ rbt-signature-string-end-functions-1/foo.rsl:12: error: expected expression of type Builtin_String, got Builtin_Integer instead +startswith(c, "po"), warning "b should start with po", b + ^ rbt-signature-string-end-functions-1/foo.rsl:10: error: expected expression of type Builtin_String, got Builtin_Integer instead Processed 1 model and 0 requirement files and found 1 error diff --git a/tests-system/rbt-signature-string-end-functions-1/output.brief b/tests-system/rbt-signature-string-end-functions-1/output.brief index b4c1b3b..d164f6d 100644 --- a/tests-system/rbt-signature-string-end-functions-1/output.brief +++ b/tests-system/rbt-signature-string-end-functions-1/output.brief @@ -1 +1 @@ -rbt-signature-string-end-functions-1/foo.rsl:12:14: trlc error: expected expression of type Builtin_String, got Builtin_Integer instead +rbt-signature-string-end-functions-1/foo.rsl:10:16: trlc error: expected expression of type Builtin_String, got Builtin_Integer instead diff --git a/tests-system/rbt-signature-string-end-functions-1/output.json b/tests-system/rbt-signature-string-end-functions-1/output.json index 3914fdb..b26ced9 100644 --- a/tests-system/rbt-signature-string-end-functions-1/output.json +++ b/tests-system/rbt-signature-string-end-functions-1/output.json @@ -1,3 +1,3 @@ -endswith(c, "en"), warning "a should end with en", c - ^ rbt-signature-string-end-functions-1/foo.rsl:12: error: expected expression of type Builtin_String, got Builtin_Integer instead +startswith(c, "po"), warning "b should start with po", b + ^ rbt-signature-string-end-functions-1/foo.rsl:10: error: expected expression of type Builtin_String, got Builtin_Integer instead Processed 1 model and 0 requirement files and found 1 error diff --git a/tests-system/rbt-signature-string-end-functions-1/output.smtlib b/tests-system/rbt-signature-string-end-functions-1/output.smtlib index 3914fdb..b26ced9 100644 --- a/tests-system/rbt-signature-string-end-functions-1/output.smtlib +++ b/tests-system/rbt-signature-string-end-functions-1/output.smtlib @@ -1,3 +1,3 @@ -endswith(c, "en"), warning "a should end with en", c - ^ rbt-signature-string-end-functions-1/foo.rsl:12: error: expected expression of type Builtin_String, got Builtin_Integer instead +startswith(c, "po"), warning "b should start with po", b + ^ rbt-signature-string-end-functions-1/foo.rsl:10: error: expected expression of type Builtin_String, got Builtin_Integer instead Processed 1 model and 0 requirement files and found 1 error diff --git a/tests-system/rbt-signature-string-end-functions-2/foo.rsl b/tests-system/rbt-signature-string-end-functions-2/foo.rsl index 19c6e27..083dc52 100644 --- a/tests-system/rbt-signature-string-end-functions-2/foo.rsl +++ b/tests-system/rbt-signature-string-end-functions-2/foo.rsl @@ -3,7 +3,6 @@ package Foo type T { a String b String - c Integer } checks T { diff --git a/tests-system/rbt-signature-string-end-functions-2/foo.trlc b/tests-system/rbt-signature-string-end-functions-2/foo.trlc index 7170051..c087758 100644 --- a/tests-system/rbt-signature-string-end-functions-2/foo.trlc +++ b/tests-system/rbt-signature-string-end-functions-2/foo.trlc @@ -3,5 +3,4 @@ package Foo T Bar { a = "potato" b = "kitten" - c = 1 } diff --git a/tests-system/rbt-signature-string-end-functions-2/output b/tests-system/rbt-signature-string-end-functions-2/output index 595f67d..d26dbcc 100644 --- a/tests-system/rbt-signature-string-end-functions-2/output +++ b/tests-system/rbt-signature-string-end-functions-2/output @@ -1,3 +1,3 @@ endswith(a, b, "en"), warning "b should end with en", b -^^^^^^^^ rbt-signature-string-end-functions-2/foo.rsl:13: error: function requires 2 parameters +^^^^^^^^ rbt-signature-string-end-functions-2/foo.rsl:12: error: function requires 2 parameters Processed 1 model and 1 requirement file and found 1 error diff --git a/tests-system/rbt-signature-string-end-functions-2/output.brief b/tests-system/rbt-signature-string-end-functions-2/output.brief index 57483f2..94df5f3 100644 --- a/tests-system/rbt-signature-string-end-functions-2/output.brief +++ b/tests-system/rbt-signature-string-end-functions-2/output.brief @@ -1 +1 @@ -rbt-signature-string-end-functions-2/foo.rsl:13:5: trlc error: function requires 2 parameters +rbt-signature-string-end-functions-2/foo.rsl:12:5: trlc error: function requires 2 parameters diff --git a/tests-system/rbt-signature-string-end-functions-2/output.json b/tests-system/rbt-signature-string-end-functions-2/output.json index 595f67d..d26dbcc 100644 --- a/tests-system/rbt-signature-string-end-functions-2/output.json +++ b/tests-system/rbt-signature-string-end-functions-2/output.json @@ -1,3 +1,3 @@ endswith(a, b, "en"), warning "b should end with en", b -^^^^^^^^ rbt-signature-string-end-functions-2/foo.rsl:13: error: function requires 2 parameters +^^^^^^^^ rbt-signature-string-end-functions-2/foo.rsl:12: error: function requires 2 parameters Processed 1 model and 1 requirement file and found 1 error diff --git a/tests-system/rbt-signature-string-end-functions-2/output.smtlib b/tests-system/rbt-signature-string-end-functions-2/output.smtlib index 595f67d..d26dbcc 100644 --- a/tests-system/rbt-signature-string-end-functions-2/output.smtlib +++ b/tests-system/rbt-signature-string-end-functions-2/output.smtlib @@ -1,3 +1,3 @@ endswith(a, b, "en"), warning "b should end with en", b -^^^^^^^^ rbt-signature-string-end-functions-2/foo.rsl:13: error: function requires 2 parameters +^^^^^^^^ rbt-signature-string-end-functions-2/foo.rsl:12: error: function requires 2 parameters Processed 1 model and 1 requirement file and found 1 error diff --git a/tests-system/rbt-signature-string-end-functions-3/foo.rsl b/tests-system/rbt-signature-string-end-functions-3/foo.rsl new file mode 100644 index 0000000..b716322 --- /dev/null +++ b/tests-system/rbt-signature-string-end-functions-3/foo.rsl @@ -0,0 +1,11 @@ +package Foo + +type T { + b String + c Integer +} + +checks T { + endswith(c, "en"), warning "a should end with en", c + endswith(b, "en"), warning "b should end with en", b +} diff --git a/tests-system/rbt-signature-string-end-functions-3/output b/tests-system/rbt-signature-string-end-functions-3/output new file mode 100644 index 0000000..7fc3046 --- /dev/null +++ b/tests-system/rbt-signature-string-end-functions-3/output @@ -0,0 +1,3 @@ +endswith(c, "en"), warning "a should end with en", c + ^ rbt-signature-string-end-functions-3/foo.rsl:9: error: expected expression of type Builtin_String, got Builtin_Integer instead +Processed 1 model and 0 requirement files and found 1 error diff --git a/tests-system/rbt-signature-string-end-functions-3/output.brief b/tests-system/rbt-signature-string-end-functions-3/output.brief new file mode 100644 index 0000000..2eb9abb --- /dev/null +++ b/tests-system/rbt-signature-string-end-functions-3/output.brief @@ -0,0 +1 @@ +rbt-signature-string-end-functions-3/foo.rsl:9:14: trlc error: expected expression of type Builtin_String, got Builtin_Integer instead diff --git a/tests-system/rbt-signature-string-end-functions-3/output.json b/tests-system/rbt-signature-string-end-functions-3/output.json new file mode 100644 index 0000000..7fc3046 --- /dev/null +++ b/tests-system/rbt-signature-string-end-functions-3/output.json @@ -0,0 +1,3 @@ +endswith(c, "en"), warning "a should end with en", c + ^ rbt-signature-string-end-functions-3/foo.rsl:9: error: expected expression of type Builtin_String, got Builtin_Integer instead +Processed 1 model and 0 requirement files and found 1 error diff --git a/tests-system/rbt-signature-string-end-functions-3/output.smtlib b/tests-system/rbt-signature-string-end-functions-3/output.smtlib new file mode 100644 index 0000000..7fc3046 --- /dev/null +++ b/tests-system/rbt-signature-string-end-functions-3/output.smtlib @@ -0,0 +1,3 @@ +endswith(c, "en"), warning "a should end with en", c + ^ rbt-signature-string-end-functions-3/foo.rsl:9: error: expected expression of type Builtin_String, got Builtin_Integer instead +Processed 1 model and 0 requirement files and found 1 error