-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a quick unit test for the IOS tag
- Loading branch information
Showing
2 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package; | ||
|
||
import massive.munit.util.Timer; | ||
import massive.munit.Assert; | ||
import massive.munit.async.AsyncFactory; | ||
|
||
import haxe.rtti.Meta; | ||
|
||
class IosTest | ||
{ | ||
public function new() | ||
{ | ||
TestIos; | ||
} | ||
|
||
@Test public function testLibrary() | ||
{ | ||
Assert.areEqual(Meta.getStatics(TestIos).test1.cpp_library[0], "testextension"); | ||
Assert.areEqual(Meta.getStatics(TestIos).test2.cpp_library[0], "toto"); | ||
} | ||
|
||
@Test public function testPrimitive() | ||
{ | ||
Assert.areEqual(Meta.getStatics(TestIos).test1.cpp_primitive[0], "prefix_test1"); | ||
Assert.areEqual(Meta.getStatics(TestIos).test2.cpp_primitive[0], "prim"); | ||
} | ||
} | ||
|
||
@:build(ShortCuts.mirrors()) | ||
@CPP_DEFAULT_LIBRARY("testextension") | ||
@CPP_PRIMITIVE_PREFIX("prefix") | ||
class TestIos | ||
{ | ||
@IOS public static function test1(toto:String, value:Bool):Float{return 0.0;}; | ||
@IOS("toto", "prim") public static function test2(toto:String, | ||
value:Bool):Bool{return false;}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters