Skip to content

Commit

Permalink
Added missing tests for coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
cschreib committed Sep 4, 2024
1 parent 4570766 commit b5fec20
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/data/errors.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7676,6 +7676,20 @@ error: unknown unary operator '>'
obj[#]
^
error: unexpected character
(1+'').a
^~~~~~
error: no overload of '+' accepts the provided types (int,string)
note: available overloads:
+(string,string)
+(float,float)
+(float,int)
+(int,float)
+(int,int)
+(float)
+(int)
''.a
^~
error: expected object, got string
'"
^~
error: unterminated string
Expand Down
2 changes: 2 additions & 0 deletions tests/src/object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ TEST_CASE("object access", "[object]") {
CHECK_ERROR("obj[(]", vars);
CHECK_ERROR("obj[>]", vars);
CHECK_ERROR("obj[#]", vars);
CHECK_ERROR("(1+'').a", vars);
CHECK_ERROR("''.a", vars);
}

SECTION("good") {
Expand Down

0 comments on commit b5fec20

Please sign in to comment.