Parser { static Graph strict(String str) throws InvalidSmilesException { return new Parser(CharBuffer.fromString(str), true).molecule(); } Parser(CharBuffer buffer, boolean strict);   Parser(String str); List<Edge> getEdges(LocalArrangement localArrangement, int u); int[] getAlleneCarriers(int focus); Collection<? extends String> getWarnings();  }
@Test(expected = InvalidSmilesException.class) public void hydrogen_strict() throws IOException { Graph g = Parser.strict("HH"); }
@Test(expected = InvalidSmilesException.class) public void deuterium_strict() throws IOException { Graph g = Parser.strict("DD"); }
@Test(expected = InvalidSmilesException.class) public void tritium_strict() throws IOException { Graph g = Parser.strict("TT"); }
@Test public void hydrogen_strict_okay() throws IOException { Graph g = Parser.strict("[H][H]"); }
@Test(expected = InvalidSmilesException.class) public void tellurium_strict() throws IOException { Graph g = Parser.strict("[te]"); }
@Test(expected = InvalidSmilesException.class) public void rejectMultipleUpBonds() throws Exception { Parser.strict("C/C=C(/C)/C"); }
@Test(expected = InvalidSmilesException.class) public void lowPercentNums() throws Exception { Parser.strict("C%1CCCC%1"); }