File tree Expand file tree Collapse file tree 1 file changed +39
-17
lines changed
src/test/java/de/itemis/xtend/auto/gwt Expand file tree Collapse file tree 1 file changed +39
-17
lines changed Original file line number Diff line number Diff line change @@ -4,23 +4,45 @@ import org.eclipse.xtend.core.compiler.batch.XtendCompilerTester
4
4
import org.junit.Test
5
5
6
6
class JsNativeTest {
7
-
7
+
8
8
extension XtendCompilerTester compiler = XtendCompilerTester . newXtendCompilerTester(JsNativeTest )
9
-
9
+
10
10
@Test def void testSimple () {
11
- // '''
12
- // package foo
13
- //
14
- // import «JsNative.name»
15
- //
16
- // class MyJsNativeCode {
17
- // @JsNative def String doStuff(String param1) ''«»'
18
- // // some javascript code here
19
- // ''«»'
20
- // }
21
- //
22
- // '''.assertCompilesTo('''
23
- //
24
- // ''')
25
- }
11
+ ' ' '
12
+ import «JsNative.name»
13
+
14
+ class C /* extends JavaScriptObject */ {
15
+ protected new() {
16
+ }
17
+
18
+ @JsNative
19
+ def void a() ' «»' '
20
+ this . a();
21
+ ' «»' '
22
+
23
+ @JsNative
24
+ def void b() ' «»' '
25
+ this . b();
26
+ ' «»' '
27
+ }
28
+ ' ' ' . assertCompilesTo(' ' '
29
+ import de.itemis.xtend.auto.gwt.JsNative;
30
+
31
+ @SuppressWarnings("all")
32
+ public class C {
33
+ protected C() {
34
+ }
35
+
36
+ @JsNative
37
+ public final native void a() /*-{
38
+ this.a();
39
+ }-*/;
40
+
41
+ @JsNative
42
+ public final native void b() /*-{
43
+ this.b();
44
+ }-*/;
45
+ }
46
+ ' ' ' )
47
+ }
26
48
}
You can’t perform that action at this time.
0 commit comments