Skip to content

Commit

Permalink
Extend from CDKTestCase and use the slow running test check
Browse files Browse the repository at this point in the history
  • Loading branch information
gilleain authored and egonw committed Jun 23, 2010
1 parent 3998ed7 commit 6969629
Showing 1 changed file with 17 additions and 14 deletions.
31 changes: 17 additions & 14 deletions src/test/org/openscience/cdk/signature/MoleculeSignatureTest.java
Expand Up @@ -29,7 +29,10 @@

import junit.framework.Assert;

import org.junit.Assume;
import org.junit.Test;
import org.junit.runner.notification.RunListener;
import org.openscience.cdk.CDKTestCase;
import org.openscience.cdk.DefaultChemObjectBuilder;
import org.openscience.cdk.exception.InvalidSmilesException;
import org.openscience.cdk.graph.AtomContainerAtomPermutor;
Expand All @@ -50,7 +53,7 @@
* @author maclean
*
*/
public class MoleculeSignatureTest {
public class MoleculeSignatureTest extends CDKTestCase {

private SmilesParser parser;

Expand Down Expand Up @@ -365,20 +368,20 @@ public int findFirstAtomIndexForSymbol(

// XXX commented out this test for now, as it takes a long time - this
// is a known weakness of the current implementation
// @Test
// public void testPolyPhenylMolecule() throws Exception {
// String smiles = "C1=CC=C(C=C1)P(C2=CC=CC=C2)(C3=CC=CC=C3)[RhH]" +
// "(P(C4=CC=CC=C4)(C5=CC=CC=C5)C6=CC=CC=C6)(P(C7=CC=CC=C7)" +
// "(C8=CC=CC=C8)C9=CC=CC=C9)P(C%10=CC=CC=C%10)" +
// "(C%11=CC=CC=C%11)C%12=CC=CC=C%12";
//// testSmiles(smiles);
// IMolecule mol = parser.parseSmiles(smiles);
// int rhIndex = findFirstAtomIndexForSymbol(mol, "Rh");
@Test
public void testPolyPhenylMolecule() throws Exception {
Assume.assumeTrue(runSlowTests());
String smiles = "C1=CC=C(C=C1)P(C2=CC=CC=C2)(C3=CC=CC=C3)[RhH]" +
"(P(C4=CC=CC=C4)(C5=CC=CC=C5)C6=CC=CC=C6)(P(C7=CC=CC=C7)" +
"(C8=CC=CC=C8)C9=CC=CC=C9)P(C%10=CC=CC=C%10)" +
"(C%11=CC=CC=C%11)C%12=CC=CC=C%12";
IMolecule mol = parser.parseSmiles(smiles);
int rhIndex = findFirstAtomIndexForSymbol(mol, "Rh");

// MoleculeSignature molSig = new MoleculeSignature(mol);
// String signatureForRh = molSig.signatureStringForVertex(rhIndex);
// System.out.println(signatureForRh);
// }
MoleculeSignature molSig = new MoleculeSignature(mol);
String signatureForRh = molSig.signatureStringForVertex(rhIndex);
System.out.println(signatureForRh);
}

@Test
public void methylFerroceneTest() throws Exception {
Expand Down

0 comments on commit 6969629

Please sign in to comment.