File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
storage/smiles/src/test/java/org/openscience/cdk/io Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -156,4 +156,17 @@ public void testWriteWithoutTitle() throws Exception {
156156 assertThat (wtr .toString (), not (containsString ("mol 1" )));
157157 assertThat (wtr .toString (), not (containsString ("mol 2" )));
158158 }
159+
160+ @ Test
161+ public void testWriteSmiFlavor () throws Exception {
162+ SmilesParser smipar = new SmilesParser (SilentChemObjectBuilder .getInstance ());
163+ IAtomContainer mol1 = smipar .parseSmiles ("c1ccccc1" );
164+ StringWriter wtr = new StringWriter ();
165+ try (SMILESWriter smigen = new SMILESWriter (wtr )) {
166+ smigen .setFlavor (SmiFlavor .InChILabelling );
167+ smigen .write (mol1 );
168+ }
169+ String [] lines = wtr .toString ().split ("\n " );
170+ assertThat (wtr .toString (), containsString ("C=1C=CC=CC1" ));
171+ }
159172}
You can’t perform that action at this time.
0 commit comments