Created
March 14, 2012 22:40
-
-
Save lfryc/2040130 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| // JS interface | |
| var Graphene = function() { | |
| }; | |
| Graphene.prototype.callSomeThing = function() { | |
| return "0"; | |
| }; | |
| // Java interface | |
| @JavaScript("Graphene") | |
| @Dependency("src/main/javascript/graphene.js") | |
| public interface JavaScriptInterface { | |
| String callSomeThing(); | |
| } | |
| // QUnit test | |
| module("module name"); | |
| test("some test", function() { | |
| }); | |
| // @QUnit annotation definition | |
| @JavaScript(QUnitResolver.class) | |
| public @interface QUnit () {} | |
| // Java interface for test | |
| @QUnit | |
| @Dependency("src/test/qunit/test.js") | |
| public interface QUnitTest() { | |
| void someTest(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment