Examples of toSource()


Examples of org.destecs.tools.jprotocolgenerator.ast.ITypeNode.toSource()

              + "();");
        } else
        {

          sb.append("\n\n\t\t@SuppressWarnings(\"rawtypes\")");
          sb.append("\n\n\t\t" + t.toSource() + " pTmp" + pCount
              + " = new "
              + t.toSource().replace("List", "Vector") + "();");
        }

        sb.append("\n\t\tfor( IStruct a: " + key + ")");
View Full Code Here

Examples of org.destecs.tools.jprotocolgenerator.ast.ITypeNode.toSource()

        {

          sb.append("\n\n\t\t@SuppressWarnings(\"rawtypes\")");
          sb.append("\n\n\t\t" + t.toSource() + " pTmp" + pCount
              + " = new "
              + t.toSource().replace("List", "Vector") + "();");
        }

        sb.append("\n\t\tfor( IStruct a: " + key + ")");
        sb.append("\n\t\t{");
View Full Code Here

Examples of org.destecs.tools.jprotocolgenerator.ast.Method.toSource()

    }

    sb.append(";");
    newM.body = sb.toString();

    return newM.toSource();
  }
}
View Full Code Here

Examples of org.mozilla.javascript.ast.AstRoot.toSource()

        astRoot.visitAll(branchInstrumentor);
        branchInstrumentor.postProcess();

        context = Context.enter();
        scope = context.initStandardObjects();
        String source = branchObjectHeader + header + branchInstrumentor.getJsLineInitialization() + astRoot.toSource();
        //System.out.println("--------------------------------------");
        //System.out.println("source = " + source);

        return context.evaluateString(scope, source, "test.js", 1, null);
    }
View Full Code Here

Examples of org.mozilla.javascript.ast.ExpressionStatement.toSource()

    private BranchStatementBuilder builder = new BranchStatementBuilder();

    @Test
    public void shouldBuildLineAndConditionInitialisation() {
        ExpressionStatement statement = builder.buildLineAndConditionInitialisation("test.js", 4, 2, 12, 15, "x < calc('7')");
        assertThat(statement.toSource(), equalTo("_$jscoverage['test.js'].branchData['4'][2].init(12, 15, 'x < calc(\\'7\\')');\n"));
    }

    @Test
    public void shouldRemoveInstrumentationFromSource() {
        assertThat(builder.removeInstrumentation("  _$jscoverage['/dir/code.js'].someOtherData[101]++;\n"), equalTo(""));
View Full Code Here

Examples of org.mozilla.javascript.ast.FunctionNode.toSource()

    }

    @Test
    public void shouldBuildLineAndConditionRecordingFunction() {
        FunctionNode statement = builder.buildBranchRecordingFunction("test.js", 1, 4, 2);
        assertThat(statement.toSource(), equalTo("function visit1_4_2(result) {\n" +
                "  _$jscoverage['test.js'].branchData['4'][2].ranCondition(result);\n" +
                "  return result;\n" +
                "}"));
    }
}
View Full Code Here

Examples of org.mozilla.javascript.ast.Name.toSource()

                    }
                }
               
            } else if (node instanceof Name) {
                Name name = (Name)node;               
                String propertyName = name.toSource();
                boolean result = lookupProperty(propertyName);
                if (result) {
                    return false;
                }
            } else if (node instanceof ExpressionStatement) {
View Full Code Here

Examples of org.mozilla.javascript.ast.VariableDeclaration.toSource()

                if (node instanceof VariableDeclaration || node instanceof ExpressionStatement) {

                   
                    if (node instanceof VariableDeclaration) {
                        VariableDeclaration declaration = (VariableDeclaration) node;
                        String source = declaration.toSource();
                        String name = source.substring(0, source.indexOf("=")).trim();
                        name = name.substring(name.indexOf("var") + 3).trim();
                        String value = source.substring(source.indexOf("=") + 1).trim();
                       
                        TMLScriptVariableDeclaration tmlScriptVarDec = new TMLScriptVariableDeclaration(tmlScriptScope, name);
View Full Code Here

Examples of org.yajsdl.video.Screen.toSource()

    @Test
    public void notSetVideoMode() {
        assertEquals( Screen.videoModeOK( 0, 0, 0, 0 ), 0 );
        Screen screen = Screen.setVideoMode( 0, 0, 0, 0 );
        SDL_Surface content = screen.toSource();

        assertNotNull( content );

        System.out.format( "screen.width = %d\n", content.w );
        System.out.format( "screen.height = %d\n", content.h );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.