diff options
Diffstat (limited to 'tests/features/test_drop.zc')
| -rw-r--r-- | tests/features/test_drop.zc | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/tests/features/test_drop.zc b/tests/features/test_drop.zc deleted file mode 100644 index 8b34efe..0000000 --- a/tests/features/test_drop.zc +++ /dev/null @@ -1,26 +0,0 @@ -import "../../std/mem.zc" - -var DROP_CALLED = 0; - -struct MyResource { - id: int; -} - -impl Drop for MyResource { - fn drop(self) { - println "Dropping MyResource {self.id}"; - DROP_CALLED = 1; - } -} - -test "drop_trait" { - { - var res = MyResource { id: 1 }; - // Scope ends here, drop should be called - } - - if (DROP_CALLED != 1) { - println "Error: Drop was not called!"; - exit(1); - } -} |
