In non-browser environment we need to define the console object for the test to succeed
1.1 --- a/rt/emul/compact/src/test/java/org/apidesign/bck2brwsr/tck/SystemTest.java Tue Dec 10 17:14:15 2013 +0100
1.2 +++ b/rt/emul/compact/src/test/java/org/apidesign/bck2brwsr/tck/SystemTest.java Wed Dec 11 08:22:17 2013 +0100
1.3 @@ -19,6 +19,7 @@
1.4
1.5 import java.io.ByteArrayOutputStream;
1.6 import java.io.PrintStream;
1.7 +import org.apidesign.bck2brwsr.core.ExtraJavaScript;
1.8 import org.apidesign.bck2brwsr.core.JavaScriptBody;
1.9 import org.apidesign.bck2brwsr.vmtest.Compare;
1.10 import org.apidesign.bck2brwsr.vmtest.VMTest;
1.11 @@ -28,6 +29,7 @@
1.12 *
1.13 * @author Jaroslav Tulach <jtulach@netbeans.org>
1.14 */
1.15 +@ExtraJavaScript(resource = "/org/apidesign/bck2brwsr/tck/console.js")
1.16 public class SystemTest {
1.17 @Compare public boolean nonNullOSName() {
1.18 return System.getProperty("os.name") != null;
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/rt/emul/compact/src/test/resources/org/apidesign/bck2brwsr/tck/console.js Wed Dec 11 08:22:17 2013 +0100
2.3 @@ -0,0 +1,22 @@
2.4 +/**
2.5 + * Back 2 Browser Bytecode Translator
2.6 + * Copyright (C) 2012 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
2.7 + *
2.8 + * This program is free software: you can redistribute it and/or modify
2.9 + * it under the terms of the GNU General Public License as published by
2.10 + * the Free Software Foundation, version 2 of the License.
2.11 + *
2.12 + * This program is distributed in the hope that it will be useful,
2.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
2.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2.15 + * GNU General Public License for more details.
2.16 + *
2.17 + * You should have received a copy of the GNU General Public License
2.18 + * along with this program. Look for COPYING file in the top folder.
2.19 + * If not, see http://opensource.org/licenses/GPL-2.0.
2.20 + */
2.21 +
2.22 +if (typeof console === 'undefined') {
2.23 + console = {};
2.24 +}
2.25 +