Skip to content

Commit

Permalink
tests: add regression tests for #288
Browse files Browse the repository at this point in the history
  • Loading branch information
hellerve committed Sep 18, 2018
1 parent bcaf8a6 commit 3080671
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/fixture_foo.h
@@ -0,0 +1,3 @@
int fooInit() {
return 1;
}
20 changes: 20 additions & 0 deletions test/regression.carp
@@ -0,0 +1,20 @@
(local-include "../test/fixture_foo.h")
(load "Test.carp")
(load "Vector.carp")

; this is a test-only module to test module resolution (see #288)
(defmodule Foo
(register init (Fn [] Int) "fooInit")
)

(use-all Test Vector2 Foo)

(defn main []
(with-test test
(assert-equal test
1
(init)
"test that the right module gets resolved"
)
)
)

0 comments on commit 3080671

Please sign in to comment.