public void testEsc_FAILS() throws Exception { if (notYetImplemented()) return; // dquote-tab-dquote assertEquals("println \"\\\"\t\\\"\"", pretty("println \"\\\"\t\\\"\"")); }
public void testHexDigitInUnicodeEscape_FAILS() throws Exception { if (notYetImplemented()) return; assertEquals("def foo = '\\ubabe'", pretty("def foo = '\\ubabe'")); }
public void testLparen_FAILS() throws Exception { if (notYetImplemented()) return; assertEquals("for (i in (history.size() - 1)..0) {}", pretty("for (i in (history.size() - 1)..0) {}")); }
public void testVariableDef_FAILS() throws Exception { if (notYetImplemented()) return; assertEquals("boolean x, y, z = false", pretty("boolean x,y,z = false")); }
public void testRegexpLiteral_FAILS() throws Exception { if (notYetImplemented()) return; // not in java //todo: these fail because regexp_literals are converted into string_literals on the antlr AST assertEquals("def x = /./", pretty("def x = /./")); // not in java assertEquals("def z = /blah\\s/", pretty("def z = /blah\\s/")); // actually: def z = /blah\s/ // not in java }
public void testExpr_FAILS() throws Exception { if (notYetImplemented()) return; assertEquals("System.out.println(x)", pretty("System.out.println(x)")); assertEquals("return f", pretty("return f")); assertEquals("foo(bar);mooky(bar)", pretty("foo(bar);mooky(bar)")); }
public void testStringLiteral_FAILS() throws Exception { if (notYetImplemented()) return; assertEquals("\"mooky\"", pretty("\"mooky\"")); assertEquals("'mooky'", pretty("'mooky'")); assertEquals("def x = '''can go over newline'''", pretty("def x = '''can go over newline'''")); assertEquals("def x = \"\"\"can go over newline\"\"\"", pretty("def x = \"\"\"can go over newline\"\"\"")); //todo test newlines inside strings somehow... }