Skip to content

Commit b5fec20

Browse files
committed
Added missing tests for coverage
1 parent 4570766 commit b5fec20

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

tests/data/errors.txt

+14
Original file line numberDiff line numberDiff line change
@@ -7676,6 +7676,20 @@ error: unknown unary operator '>'
76767676
obj[#]
76777677
^
76787678
error: unexpected character
7679+
(1+'').a
7680+
^~~~~~
7681+
error: no overload of '+' accepts the provided types (int,string)
7682+
note: available overloads:
7683+
+(string,string)
7684+
+(float,float)
7685+
+(float,int)
7686+
+(int,float)
7687+
+(int,int)
7688+
+(float)
7689+
+(int)
7690+
''.a
7691+
^~
7692+
error: expected object, got string
76797693
'"
76807694
^~
76817695
error: unterminated string

tests/src/object.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ TEST_CASE("object access", "[object]") {
6464
CHECK_ERROR("obj[(]", vars);
6565
CHECK_ERROR("obj[>]", vars);
6666
CHECK_ERROR("obj[#]", vars);
67+
CHECK_ERROR("(1+'').a", vars);
68+
CHECK_ERROR("''.a", vars);
6769
}
6870

6971
SECTION("good") {

0 commit comments

Comments
 (0)