jaroslav@1882
|
1 |
/**
|
jaroslav@1882
|
2 |
* Back 2 Browser Bytecode Translator
|
jaroslav@1882
|
3 |
* Copyright (C) 2012-2015 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
|
jaroslav@1882
|
4 |
*
|
jaroslav@1882
|
5 |
* This program is free software: you can redistribute it and/or modify
|
jaroslav@1882
|
6 |
* it under the terms of the GNU General Public License as published by
|
jaroslav@1882
|
7 |
* the Free Software Foundation, version 2 of the License.
|
jaroslav@1882
|
8 |
*
|
jaroslav@1882
|
9 |
* This program is distributed in the hope that it will be useful,
|
jaroslav@1882
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
jaroslav@1882
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
jaroslav@1882
|
12 |
* GNU General Public License for more details.
|
jaroslav@1882
|
13 |
*
|
jaroslav@1882
|
14 |
* You should have received a copy of the GNU General Public License
|
jaroslav@1882
|
15 |
* along with this program. Look for COPYING file in the top folder.
|
jaroslav@1882
|
16 |
* If not, see http://opensource.org/licenses/GPL-2.0.
|
jaroslav@1882
|
17 |
*/
|
jaroslav@1882
|
18 |
package org.apidesign.bck2brwsr.vm8;
|
jaroslav@1882
|
19 |
|
jaroslav@1882
|
20 |
import org.apidesign.bck2brwsr.vmtest.Compare;
|
jaroslav@1882
|
21 |
import org.apidesign.bck2brwsr.vmtest.VMTest;
|
jaroslav@1882
|
22 |
import org.testng.annotations.Factory;
|
jaroslav@1882
|
23 |
|
jaroslav@1882
|
24 |
public class FunctionsTest {
|
jaroslav@1882
|
25 |
@Compare
|
jaroslav@1882
|
26 |
public int inner5() throws Exception {
|
jaroslav@1882
|
27 |
return Functions.inner5().invoke(null, null, null, null, null);
|
jaroslav@1882
|
28 |
}
|
jaroslav@1882
|
29 |
@Compare
|
jaroslav@1882
|
30 |
public int function5() throws Exception {
|
jaroslav@1882
|
31 |
return Functions.function5().invoke(null, null, null, null, null);
|
jaroslav@1882
|
32 |
}
|
jaroslav@1882
|
33 |
@Compare
|
jaroslav@1882
|
34 |
public int inner4() throws Exception {
|
jaroslav@1882
|
35 |
return Functions.inner4().invoke(null, null, null, null, null);
|
jaroslav@1882
|
36 |
}
|
jaroslav@1882
|
37 |
@Compare
|
jaroslav@1882
|
38 |
public int function4() throws Exception {
|
jaroslav@1882
|
39 |
final Functions.BaseOne<Void, Void, Void, Void, Object, Integer> fn = Functions.function4();
|
jaroslav@1882
|
40 |
if (fn == null) {
|
jaroslav@1882
|
41 |
return -1;
|
jaroslav@1882
|
42 |
}
|
jaroslav@1882
|
43 |
return fn.invoke(null, null, null, null, null);
|
jaroslav@1882
|
44 |
}
|
jaroslav@1882
|
45 |
|
jaroslav@1882
|
46 |
@Factory public static Object[] create() {
|
jaroslav@1882
|
47 |
return VMTest.create(FunctionsTest.class);
|
jaroslav@1882
|
48 |
}
|
jaroslav@1882
|
49 |
}
|