@Test public void testParseHexUnsignedIntLiteral() throws Exception { final String shader = "#version 300 es\n" + "void main() {" + " int x = 0xA03Bu;" + "}"; final TranslationUnit tu = ParseHelper.parse(shader); assertTrue( new CheckPredicateVisitor() { @Override public void visitInitializer(Initializer initializer) { super.visitInitializer(initializer); if (initializer.getExpr() instanceof UIntConstantExpr && ((UIntConstantExpr) initializer.getExpr()).getValue().equals("0xA03Bu")) { predicateHolds(); } } }.test(tu)); }
public static synchronized TranslationUnit parse(File file) throws IOException, ParseTimeoutException, InterruptedException, GlslParserException { return parseInputStream(new ByteArrayInputStream(FileUtils.readFileToByteArray(file)), ShaderKind.fromExtension(FilenameUtils.getExtension(file.getName()))); }
ParseHelper { public static synchronized TranslationUnit parse(File file) throws IOException, ParseTimeoutException, InterruptedException, GlslParserException { return parseInputStream(new ByteArrayInputStream(FileUtils.readFileToByteArray(file)), ShaderKind.fromExtension(FilenameUtils.getExtension(file.getName()))); } }
ParseHelper { public static synchronized TranslationUnit parse(File file) throws IOException, ParseTimeoutException, InterruptedException, GlslParserException { return parseInputStream(new ByteArrayInputStream(FileUtils.readFileToByteArray(file)), ShaderKind.fromExtension(FilenameUtils.getExtension(file.getName()))); }  }
ParseHelper { public static synchronized TranslationUnit parse(File file) throws IOException, ParseTimeoutException, InterruptedException, GlslParserException { return parseInputStream(new ByteArrayInputStream(FileUtils.readFileToByteArray(file)), ShaderKind.fromExtension(FilenameUtils.getExtension(file.getName()))); }  static Optional<TranslationUnit> maybeParseShader(File shader); static synchronized TranslationUnit parse(File file); static synchronized TranslationUnit parse(String string, ShaderKind shaderKind); static synchronized TranslationUnit parse(String string); }
ParseHelper { public static synchronized TranslationUnit parse(File file) throws IOException, ParseTimeoutException, InterruptedException, GlslParserException { return parseInputStream(new ByteArrayInputStream(FileUtils.readFileToByteArray(file)), ShaderKind.fromExtension(FilenameUtils.getExtension(file.getName()))); }  static Optional<TranslationUnit> maybeParseShader(File shader); static synchronized TranslationUnit parse(File file); static synchronized TranslationUnit parse(String string, ShaderKind shaderKind); static synchronized TranslationUnit parse(String string); static final String END_OF_GRAPHICSFUZZ_DEFINES; }