rt/vm8/src/test/java/org/apidesign/bck2brwsr/vm8/LambdasTest.java
branchjdk8
changeset 1680 3b553acbd931
parent 1672 1efb2645c7aa
child 1692 2f800fdc371e
     1.1 --- a/rt/vm8/src/test/java/org/apidesign/bck2brwsr/vm8/LambdasTest.java	Sun Aug 17 08:27:45 2014 +0200
     1.2 +++ b/rt/vm8/src/test/java/org/apidesign/bck2brwsr/vm8/LambdasTest.java	Sat Sep 13 14:37:49 2014 +0200
     1.3 @@ -17,36 +17,21 @@
     1.4   */
     1.5  package org.apidesign.bck2brwsr.vm8;
     1.6  
     1.7 -import org.testng.annotations.BeforeClass;
     1.8 -import org.testng.annotations.AfterClass;
     1.9 -import org.testng.annotations.Test;
    1.10 +import org.apidesign.bck2brwsr.vmtest.Compare;
    1.11 +import org.apidesign.bck2brwsr.vmtest.VMTest;
    1.12 +import org.testng.annotations.Factory;
    1.13  
    1.14  /**
    1.15   *
    1.16   * @author Jaroslav Tulach <jtulach@netbeans.org>
    1.17   */
    1.18  public class LambdasTest {
    1.19 -    private static TestVM code;
    1.20 -    
    1.21 -    @Test public void verifyJSTime() throws Exception {
    1.22 -        String exp = Lambdas.compound();
    1.23 -        
    1.24 -        Object js = code.execCode("Get js time", 
    1.25 -            Lambdas.class, "compound__Ljava_lang_String_2",
    1.26 -            exp
    1.27 -        );
    1.28 +    @Compare public String StringverifyJSTime() throws Exception {
    1.29 +        return Lambdas.compound();
    1.30      }
    1.31      
    1.32 -    
    1.33 -    @BeforeClass 
    1.34 -    public static void compileTheCode() throws Exception {
    1.35 -        code = TestVM.compileClass(
    1.36 -            "org/apidesign/bck2brwsr/vm8/Lambdas");
    1.37 +    @Factory public static Object[] create() {
    1.38 +        return VMTest.create(LambdasTest.class);
    1.39      }
    1.40 -    @AfterClass
    1.41 -    public static void releaseTheCode() {
    1.42 -        code = null;
    1.43 -    }
    1.44 -    
    1.45  }
    1.46