Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions tests/syntax/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,28 @@ def test_ego_nonobject():
compileScenic("ego = dict()")


def test_ego_subclass_point():
with pytest.raises(TypeError):
compileScenic(
"""
class Foo(Point):
pass
ego = new Foo
"""
)


def test_ego_subclass_orientedpoint():
with pytest.raises(TypeError):
compileScenic(
"""
class Bar(OrientedPoint):
pass
ego = new Bar
"""
)


def test_ego_undefined():
with pytest.raises(InvalidScenarioError):
compileScenic("x = ego\n" "ego = new Object")
Expand Down
Loading