jaroslav@296: /** jaroslav@296: * Back 2 Browser Bytecode Translator jaroslav@1787: * Copyright (C) 2012-2015 Jaroslav Tulach jaroslav@296: * jaroslav@296: * This program is free software: you can redistribute it and/or modify jaroslav@296: * it under the terms of the GNU General Public License as published by jaroslav@296: * the Free Software Foundation, version 2 of the License. jaroslav@296: * jaroslav@296: * This program is distributed in the hope that it will be useful, jaroslav@296: * but WITHOUT ANY WARRANTY; without even the implied warranty of jaroslav@296: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the jaroslav@296: * GNU General Public License for more details. jaroslav@296: * jaroslav@296: * You should have received a copy of the GNU General Public License jaroslav@296: * along with this program. Look for COPYING file in the top folder. jaroslav@296: * If not, see http://opensource.org/licenses/GPL-2.0. jaroslav@296: */ jaroslav@346: package org.apidesign.bck2brwsr.tck; jaroslav@296: jaroslav@1971: import net.java.html.js.JavaScriptBody; jaroslav@1971: import org.apidesign.bck2brwsr.vmtest.BrwsrTest; jaroslav@346: import org.apidesign.bck2brwsr.vmtest.VMTest; jaroslav@296: import org.testng.annotations.Factory; jaroslav@296: jaroslav@1971: public class BooleanTest { jaroslav@1971: @JavaScriptBody(args = { }, body = "return true;") jaroslav@1971: private static native Boolean getTrue(); jaroslav@1971: jaroslav@1971: @JavaScriptBody(args = { }, body = "return false;") jaroslav@1971: private static native Boolean getFalse(); jaroslav@1971: jaroslav@1971: @BrwsrTest public void primitiveTrue() { jaroslav@1971: boolean t = getTrue(); jaroslav@1971: assert t : "Yes, it is true"; jaroslav@1384: } jaroslav@1384: jaroslav@1971: @BrwsrTest public void primitiveFalse() { jaroslav@1971: boolean t = getFalse(); jaroslav@1971: assert !t : "Yes, it is false"; jaroslav@1384: } jaroslav@1384: jaroslav@296: @Factory jaroslav@296: public static Object[] create() { jaroslav@1971: return VMTest.create(BooleanTest.class); jaroslav@296: } jaroslav@328: jaroslav@296: }