rt/vmtest/src/main/java/org/apidesign/bck2brwsr/vmtest/Compare.java
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Tue, 26 Feb 2013 16:54:16 +0100
changeset 772 d382dacfd73f
parent 537 vmtest/src/main/java/org/apidesign/bck2brwsr/vmtest/Compare.java@7dbd0a097e44
child 1787 ea12a3bb4b33
permissions -rw-r--r--
Moving modules around so the runtime is under one master pom and can be built without building other modules that are in the repository
jaroslav@273
     1
/**
jaroslav@273
     2
 * Back 2 Browser Bytecode Translator
jaroslav@273
     3
 * Copyright (C) 2012 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
jaroslav@273
     4
 *
jaroslav@273
     5
 * This program is free software: you can redistribute it and/or modify
jaroslav@273
     6
 * it under the terms of the GNU General Public License as published by
jaroslav@273
     7
 * the Free Software Foundation, version 2 of the License.
jaroslav@273
     8
 *
jaroslav@273
     9
 * This program is distributed in the hope that it will be useful,
jaroslav@273
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
jaroslav@273
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
jaroslav@273
    12
 * GNU General Public License for more details.
jaroslav@273
    13
 *
jaroslav@273
    14
 * You should have received a copy of the GNU General Public License
jaroslav@273
    15
 * along with this program. Look for COPYING file in the top folder.
jaroslav@273
    16
 * If not, see http://opensource.org/licenses/GPL-2.0.
jaroslav@273
    17
 */
jaroslav@346
    18
package org.apidesign.bck2brwsr.vmtest;
jaroslav@273
    19
jaroslav@273
    20
import java.lang.annotation.ElementType;
jaroslav@273
    21
import java.lang.annotation.Retention;
jaroslav@273
    22
import java.lang.annotation.RetentionPolicy;
jaroslav@273
    23
import java.lang.annotation.Target;
jaroslav@273
    24
jaroslav@273
    25
/** Can be applied on a method that yields a return value. 
jaroslav@346
    26
 * Together with {@link VMTest#create} it can be used to write
jaroslav@537
    27
 * methods which are executed in real VM as well as JavaScript VMs and
jaroslav@273
    28
 * their results are compared.
jaroslav@273
    29
 *
jaroslav@273
    30
 * @author Jaroslav Tulach <jtulach@netbeans.org>
jaroslav@273
    31
 */
jaroslav@273
    32
@Retention(RetentionPolicy.RUNTIME)
jaroslav@273
    33
@Target(ElementType.METHOD)
jaroslav@273
    34
public @interface Compare {
jaroslav@537
    35
    /** Specifies whether the system should internal JavaScript interpreter
jaroslav@537
    36
     * as available via {@link javax.script.ScriptEngine}. Defaults to true,
jaroslav@537
    37
     * but in some situations (benchmarking comes to my mind), one may set this
jaroslav@537
    38
     * to <code>false</code>. In such case only browsers provided via
jaroslav@537
    39
     * <code>vmtest.brwsrs</code> property are used. For example
jaroslav@537
    40
     * <code>"vmtest.brwsrs=firefox,google-chrome"</code> would run the test
jaroslav@537
    41
     * in HotSpot VM, firefox and chrome and would compare the results.
jaroslav@537
    42
     * @return 
jaroslav@537
    43
     */
jaroslav@537
    44
    boolean scripting() default true;
jaroslav@273
    45
}