jaroslav@273: /** jaroslav@273: * Back 2 Browser Bytecode Translator jaroslav@273: * Copyright (C) 2012 Jaroslav Tulach jaroslav@273: * jaroslav@273: * This program is free software: you can redistribute it and/or modify jaroslav@273: * it under the terms of the GNU General Public License as published by jaroslav@273: * the Free Software Foundation, version 2 of the License. jaroslav@273: * jaroslav@273: * This program is distributed in the hope that it will be useful, jaroslav@273: * but WITHOUT ANY WARRANTY; without even the implied warranty of jaroslav@273: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the jaroslav@273: * GNU General Public License for more details. jaroslav@273: * jaroslav@273: * You should have received a copy of the GNU General Public License jaroslav@273: * along with this program. Look for COPYING file in the top folder. jaroslav@273: * If not, see http://opensource.org/licenses/GPL-2.0. jaroslav@273: */ jaroslav@346: package org.apidesign.bck2brwsr.vmtest; jaroslav@273: jaroslav@273: import java.lang.annotation.ElementType; jaroslav@273: import java.lang.annotation.Retention; jaroslav@273: import java.lang.annotation.RetentionPolicy; jaroslav@273: import java.lang.annotation.Target; jaroslav@273: jaroslav@273: /** Can be applied on a method that yields a return value. jaroslav@346: * Together with {@link VMTest#create} it can be used to write jaroslav@537: * methods which are executed in real VM as well as JavaScript VMs and jaroslav@273: * their results are compared. jaroslav@273: * jaroslav@273: * @author Jaroslav Tulach jaroslav@273: */ jaroslav@273: @Retention(RetentionPolicy.RUNTIME) jaroslav@273: @Target(ElementType.METHOD) jaroslav@273: public @interface Compare { jaroslav@537: /** Specifies whether the system should internal JavaScript interpreter jaroslav@537: * as available via {@link javax.script.ScriptEngine}. Defaults to true, jaroslav@537: * but in some situations (benchmarking comes to my mind), one may set this jaroslav@537: * to false. In such case only browsers provided via jaroslav@537: * vmtest.brwsrs property are used. For example jaroslav@537: * "vmtest.brwsrs=firefox,google-chrome" would run the test jaroslav@537: * in HotSpot VM, firefox and chrome and would compare the results. jaroslav@537: * @return jaroslav@537: */ jaroslav@537: boolean scripting() default true; jaroslav@273: }