Examples of Printer


Examples of avrora.util.Printer

     * compiled to Java source and each compiled block is output to the console.
     * @param args the arguments from the command line to the DBBC test program
     * @throws Exception
     */
    public void run(String[] args) throws Exception {
        Printer printer = Printer.STDOUT;
        PrettyPrinter pp = new PrettyPrinter(printer);
        Program p = Main.loadProgram(args);
        DBBC dbbc = new DBBC(p, options);

        ControlFlowGraph cfg = p.getCFG();
        Iterator i = cfg.getSortedBlockIterator();
        while (i.hasNext()) {
            ControlFlowGraph.Block b = (ControlFlowGraph.Block)i.next();
            printer.startblock("block starting at: " + StringUtil.addrToString(b.getAddress()));
            DBBC.CodeBlock code = dbbc.getCodeBlock(b.getAddress());
            if (code != null) {
                printer.println("// worst case execution time = " + code.wcet + " cycles");
                pp.visitStmtList(code.stmts);
            } else {
                printer.println("// no code generated for this block");
            }
            printer.endblock();
        }
    }
View Full Code Here

Examples of com.bazaarvoice.jless.ast.visitor.Printer

    /**
     * Utility method that can be run from within the debugger to look at the parsed output file.
     */
    public static String printParsedResult(Node root) {
        Printer p = new Printer();
        root.traverse(p);
        return p.toString();
    }
View Full Code Here

Examples of com.eclipsesource.tabris.print.Printer

  @Test
  public void testHasPrintService() {
    TabrisClient client = new TabrisClientImpl();

    Printer print = client.getService( Printer.class );

    assertNotNull( print );
  }
View Full Code Here

Examples of com.eclipsesource.tabris.print.Printer

  @Test
  public void testPrintServiceIsSingleton() {
    TabrisClient client = new TabrisClientImpl();

    Printer print1 = client.getService( Printer.class );
    Printer print2 = client.getService( Printer.class );

    assertSame( print1, print2 );
  }
View Full Code Here

Examples of com.eclipsesource.tabris.print.Printer

  }

  @Test
  public void testSendsPrintWithPrintCall() {
    RemoteObject remoteObject = environment.getServiceObject();
    Printer print = new PrinterImpl();

    print.print( "http://localhost/file.pdf", createOptions() );

    ArgumentCaptor<JsonObject> captor = ArgumentCaptor.forClass( JsonObject.class );
    verify( remoteObject ).call( eq( "print" ), captor.capture() );
    assertEquals( "http://localhost/file.pdf", captor.getValue().get( "url" ).asString() );
    assertEquals( "A Printer ID", captor.getValue().get( "printer" ).asString() );
View Full Code Here

Examples of com.eclipsesource.tabris.print.Printer

    assertEquals( "color", captor.getValue().get( "outputType" ).asString() );
  }

  @Test( expected = IllegalArgumentException.class )
  public void testPrintFailsWithNullOptions() {
    Printer print = new PrinterImpl();

    print.print( "foo", null );
  }
View Full Code Here

Examples of com.eclipsesource.tabris.print.Printer

    print.print( "foo", null );
  }

  @Test( expected = IllegalArgumentException.class )
  public void testPrintFailsWithNullUrl() {
    Printer print = new PrinterImpl();

    print.print( null, new PrintOptions() );
  }
View Full Code Here

Examples of com.eclipsesource.tabris.print.Printer

    print.print( null, new PrintOptions() );
  }

  @Test( expected = IllegalArgumentException.class )
  public void testPrintFailsWithEmptyUrl() {
    Printer print = new PrinterImpl();

    print.print( "", new PrintOptions() );
  }
View Full Code Here

Examples of com.eclipsesource.tabris.print.Printer

    print.print( "", new PrintOptions() );
  }

  @Test( expected = IllegalArgumentException.class )
  public void testAddListenerFailsWithNullListener() {
    Printer print = new PrinterImpl();

    print.addPrintListener( null );
  }
View Full Code Here

Examples of com.eclipsesource.tabris.print.Printer

    print.addPrintListener( null );
  }

  @Test( expected = IllegalArgumentException.class )
  public void testRemoveListenerFailsWithNullListener() {
    Printer print= new PrinterImpl();

    print.removePrintListener( null );
  }
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.