Skip to content

Commit

Permalink
Test: Add tests for invalid cown usage
Browse files Browse the repository at this point in the history
  • Loading branch information
xFrednet committed Oct 19, 2024
1 parent e7b2d80 commit e9a0a8b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ clangformat_targets()


message(STATUS "Adding tests")
FILE(GLOB ALL_FILES
FILE(GLOB_RECURSE ALL_FILES
CONFIGURE_DEPENDS
tests/*
)
Expand All @@ -62,3 +62,5 @@ endforeach()

set_property(TEST three_regions.vpy PROPERTY WILL_FAIL true)
set_property(TEST leak_with_global.vpy PROPERTY WILL_FAIL true)
set_property(TEST modify_cown.vpy PROPERTY WILL_FAIL true)
set_property(TEST read_region.vpy PROPERTY WILL_FAIL true)
7 changes: 7 additions & 0 deletions tests/invalid_cowns/modify_cown.vpy
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

# A simple cown
a = {}
region a
co = cown a

co.other = {}
7 changes: 7 additions & 0 deletions tests/invalid_cowns/read_region.vpy
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

# A simple cown
a = {}
region a
co = cown a

dummy = co.region

0 comments on commit e9a0a8b

Please sign in to comment.