示例#1
0
  @Test
  @Category({P3, UNIT, FAST})
  @Description("Correct parsing spaces in comments")
  public void testSpaceComment() throws Exception {

    String name = "vjospacecomment.txt";
    String file = FileUtils.getResourceAsString(ParsingTests.class, name);
    VjoParser p = new VjoParser();
    p.addLib(LibManager.getInstance().getJavaPrimitiveLib());
    p.addLib(LibManager.getInstance().getJsNativeGlobalLib());
    p.addLib(LibManager.getInstance().getBrowserTypesLib());

    IJstParseController c = new JstParseController(p);

    IJstType type = c.parse(name, name, file).getType();
    ParseUtils.printTree(type);
  }
示例#2
0
  @Test
  @Category({P1, UNIT, FAST})
  @Description("Parses and validates property declared public and final")
  public void testPublicFinal() throws Exception {

    String name = "vjopublicfinal.txt";
    String file = FileUtils.getResourceAsString(ParsingTests.class, name);
    VjoParser p = new VjoParser();
    p.addLib(LibManager.getInstance().getJavaPrimitiveLib());
    p.addLib(LibManager.getInstance().getJsNativeGlobalLib());
    p.addLib(LibManager.getInstance().getBrowserTypesLib());

    IJstParseController c = new JstParseController(p);

    IJstType type = c.parse(name, name, file).getType();
    ParseUtils.printTree(type);
  }