Skip to content

Commit

Permalink
Added missing TestMethod annotations for the matching methods
Browse files Browse the repository at this point in the history
  • Loading branch information
egonw committed Jan 24, 2012
1 parent c11a1e3 commit 8392519
Show file tree
Hide file tree
Showing 50 changed files with 50 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/main/org/openscience/cdk/io/formats/ABINITFormat.java
Expand Up @@ -68,6 +68,7 @@ public String[] getNameExtensions() {
@TestMethod("testGetWriterClassName")
public String getWriterClassName() { return null; }

@TestMethod("testMatches")
public boolean matches(int lineNumber, String line) {
if (line.indexOf("natom") >= 0 ||
line.indexOf("ABINIT") >= 0) {
Expand Down
1 change: 1 addition & 0 deletions src/main/org/openscience/cdk/io/formats/ADFFormat.java
Expand Up @@ -69,6 +69,7 @@ public String[] getNameExtensions() {
@TestMethod("testGetWriterClassName")
public String getWriterClassName() { return null; }

@TestMethod("testMatches")
public boolean matches(int lineNumber, String line) {
if (line.indexOf("Amsterdam Density Functional") >= 0) {
return true;
Expand Down
1 change: 1 addition & 0 deletions src/main/org/openscience/cdk/io/formats/Aces2Format.java
Expand Up @@ -68,6 +68,7 @@ public String[] getNameExtensions() {
@TestMethod("testGetWriterClassName")
public String getWriterClassName() { return null; }

@TestMethod("testMatches")
public boolean matches(int lineNumber, String line) {
if (line.indexOf("ACES2") >= 0) {
return true;
Expand Down
1 change: 1 addition & 0 deletions src/main/org/openscience/cdk/io/formats/CACheFormat.java
Expand Up @@ -68,6 +68,7 @@ public String[] getNameExtensions() {
@TestMethod("testGetWriterClassName")
public String getWriterClassName() { return null; }

@TestMethod("testMatches")
public boolean matches(int lineNumber, String line) {
if (line.startsWith("molstruct")) {
return true;
Expand Down
1 change: 1 addition & 0 deletions src/main/org/openscience/cdk/io/formats/CDKOWLFormat.java
Expand Up @@ -70,6 +70,7 @@ public String getWriterClassName() {
return "org.openscience.cdk.io.rdf.CDKOWLWriter";
}

@TestMethod("testMatches")
public boolean matches(int lineNumber, String line) {
if (line.startsWith("PREFIX") &&
line.contains("http://cdk.sourceforge.net/model.owl#")) {
Expand Down
1 change: 1 addition & 0 deletions src/main/org/openscience/cdk/io/formats/CIFFormat.java
Expand Up @@ -70,6 +70,7 @@ public String getReaderClassName() {
@TestMethod("testGetWriterClassName")
public String getWriterClassName() { return null; }

@TestMethod("testMatches")
public boolean matches(int lineNumber, String line) {
if (line.startsWith("_cell_length_a") ||
line.startsWith("_audit_creation_date") ||
Expand Down
1 change: 1 addition & 0 deletions src/main/org/openscience/cdk/io/formats/CMLFormat.java
Expand Up @@ -74,6 +74,7 @@ public String getWriterClassName() {
return "org.openscience.cdk.io.CMLWriter";
}

@TestMethod("testMatches")
public boolean matches(int lineNumber, String line) {
if ((line.indexOf("http://www.xml-cml.org/schema") != -1) ||
(line.indexOf("<atom") != -1) ||
Expand Down
1 change: 1 addition & 0 deletions src/main/org/openscience/cdk/io/formats/CTXFormat.java
Expand Up @@ -72,6 +72,7 @@ public String getWriterClassName() {
return null;
}

@TestMethod("testMatches")
public boolean matches(int lineNumber, String line) {
if (lineNumber == 1 && line.startsWith(" /IDENT")) {
return true;
Expand Down
Expand Up @@ -72,6 +72,7 @@ public String getWriterClassName() {
return "org.openscience.cdk.io.CrystClustWriter";
}

@TestMethod("testMatches")
public boolean matches(int lineNumber, String line) {
if (lineNumber == 1 && line.startsWith("frame: ")) {
return true;
Expand Down
1 change: 1 addition & 0 deletions src/main/org/openscience/cdk/io/formats/DaltonFormat.java
Expand Up @@ -70,6 +70,7 @@ public String[] getNameExtensions() {
@TestMethod("testGetWriterClassName")
public String getWriterClassName() { return null; }

@TestMethod("testMatches")
public boolean matches(int lineNumber, String line) {
if (line.indexOf("DALTON") >= 0) {
return true;
Expand Down
1 change: 1 addition & 0 deletions src/main/org/openscience/cdk/io/formats/GamessFormat.java
Expand Up @@ -72,6 +72,7 @@ public String getReaderClassName() {
@TestMethod("testGetWriterClassName")
public String getWriterClassName() { return null; }

@TestMethod("testMatches")
public boolean matches(int lineNumber, String line) {
if (line.indexOf("GAMESS execution script") >= 0 ||
line.indexOf("GAMESS VERSION") >= 0) {
Expand Down
Expand Up @@ -72,6 +72,7 @@ public String getReaderClassName() {
@TestMethod("testGetWriterClassName")
public String getWriterClassName() { return null; }

@TestMethod("testMatches")
public boolean matches(int lineNumber, String line) {
if (line.indexOf("Gaussian(R) 03") >= 0) {
return true;
Expand Down
Expand Up @@ -69,6 +69,7 @@ public String[] getNameExtensions() {
@TestMethod("testGetWriterClassName")
public String getWriterClassName() { return null; }

@TestMethod("testMatches")
public boolean matches(int lineNumber, String line) {
if (line.indexOf("Gaussian G90") >= 0) {
return true;
Expand Down
Expand Up @@ -69,6 +69,7 @@ public String[] getNameExtensions() {
@TestMethod("testGetWriterClassName")
public String getWriterClassName() { return null; }

@TestMethod("testMatches")
public boolean matches(int lineNumber, String line) {
if (line.indexOf("Gaussian 92") >= 0) {
return true;
Expand Down
Expand Up @@ -69,6 +69,7 @@ public String[] getNameExtensions() {
@TestMethod("testGetWriterClassName")
public String getWriterClassName() { return null; }

@TestMethod("testMatches")
public boolean matches(int lineNumber, String line) {
if (line.indexOf("Gaussian 94") >= 0) {
return true;
Expand Down
Expand Up @@ -69,6 +69,7 @@ public String[] getNameExtensions() {
@TestMethod("testGetWriterClassName")
public String getWriterClassName() { return null; }

@TestMethod("testMatches")
public boolean matches(int lineNumber, String line) {
if (line.indexOf("Gaussian 95") >= 0) {
return true;
Expand Down
Expand Up @@ -70,6 +70,7 @@ public String getReaderClassName() {
@TestMethod("testGetWriterClassName")
public String getWriterClassName() { return null; }

@TestMethod("testMatches")
public boolean matches(int lineNumber, String line) {
if (line.indexOf("Gaussian(R) 98") >= 0 ||
line.indexOf("Gaussian 98") >= 0) {
Expand Down
Expand Up @@ -72,6 +72,7 @@ public String getReaderClassName() {
@TestMethod("testGetWriterClassName")
public String getWriterClassName() { return null; }

@TestMethod("testMatches")
public boolean matches(int lineNumber, String line) {
if (line.startsWith("!Header gpr")) {
return true;
Expand Down
Expand Up @@ -70,6 +70,7 @@ public String getReaderClassName() {
@TestMethod("testGetWriterClassName")
public String getWriterClassName() { return null; }

@TestMethod("testMatches")
public boolean matches(int lineNumber, String line) {
if (line.startsWith("!Header mm1gp")) {
return true;
Expand Down
1 change: 1 addition & 0 deletions src/main/org/openscience/cdk/io/formats/HINFormat.java
Expand Up @@ -76,6 +76,7 @@ public String getWriterClassName() {
return "org.openscience.cdk.io.HINWriter";
}

@TestMethod("testMatches")
public boolean matches(int lineNumber, String line) {
if (line.startsWith("atom ") &&
(line.endsWith(" s") || line.endsWith(" d") ||
Expand Down
1 change: 1 addition & 0 deletions src/main/org/openscience/cdk/io/formats/INChIFormat.java
Expand Up @@ -72,6 +72,7 @@ public String getReaderClassName() {
@TestMethod("testGetWriterClassName")
public String getWriterClassName() { return null; }

@TestMethod("testMatches")
public boolean matches(int lineNumber, String line) {
if (line.indexOf("<INChI") != -1) {
return true;
Expand Down
Expand Up @@ -70,6 +70,7 @@ public String getReaderClassName() {
@TestMethod("testGetWriterClassName")
public String getWriterClassName() { return null; }

@TestMethod("testMatches")
public boolean matches(int lineNumber, String line) {
if (line.startsWith("INChI=")) {
return true;
Expand Down
1 change: 1 addition & 0 deletions src/main/org/openscience/cdk/io/formats/JaguarFormat.java
Expand Up @@ -71,6 +71,7 @@ public String[] getNameExtensions() {
@TestMethod("testGetWriterClassName")
public String getWriterClassName() { return null; }

@TestMethod("testMatches")
public boolean matches(int lineNumber, String line) {
if (line.indexOf("Jaguar") >= 0 &&
line.indexOf("Schrodinger") >= 0) {
Expand Down
1 change: 1 addition & 0 deletions src/main/org/openscience/cdk/io/formats/MDLFormat.java
Expand Up @@ -74,6 +74,7 @@ public String getWriterClassName() {
return null;
}

@TestMethod("testMatches")
public boolean matches(int lineNumber, String line) {
if (lineNumber == 4 && line.length()>7 &&
(line.indexOf("2000") == -1) && // MDL Mol V2000 format
Expand Down
1 change: 1 addition & 0 deletions src/main/org/openscience/cdk/io/formats/MDLRXNFormat.java
Expand Up @@ -72,6 +72,7 @@ public String getReaderClassName() {
@TestMethod("testGetWriterClassName")
public String getWriterClassName() { return null; }

@TestMethod("testMatches")
public boolean matches(int lineNumber, String line) {
if (line.startsWith("$RXN")) {
return true;
Expand Down
Expand Up @@ -75,6 +75,7 @@ public String getReaderClassName() {
@TestMethod("testGetWriterClassName")
public String getWriterClassName() { return null; }

@TestMethod("testMatches")
public boolean matches(int lineNumber, String line) {
if (lineNumber == 1) {
isRXN = (line.indexOf("$RXN") != -1);
Expand Down
Expand Up @@ -72,6 +72,7 @@ public String getWriterClassName() {
return "org.openscience.cdk.io.MDLV2000Writer";
}

@TestMethod("testMatches")
public boolean matches(int lineNumber, String line) {
if (lineNumber == 4 &&
(line.indexOf("v2000") >= 0 ||
Expand Down
Expand Up @@ -70,6 +70,7 @@ public String getReaderClassName() {
@TestMethod("testGetWriterClassName")
public String getWriterClassName() { return null; }

@TestMethod("testMatches")
public boolean matches(int lineNumber, String line) {
if (lineNumber == 4 &&
(line.indexOf("v3000") >= 0 ||
Expand Down
Expand Up @@ -68,6 +68,7 @@ public String[] getNameExtensions() {
@TestMethod("testGetWriterClassName")
public String getWriterClassName() { return null; }

@TestMethod("testMatches")
public boolean matches(int lineNumber, String line) {
if (line.indexOf("MOPAC2002") >= 0) {
return true;
Expand Down
1 change: 1 addition & 0 deletions src/main/org/openscience/cdk/io/formats/MOPAC7Format.java
Expand Up @@ -69,6 +69,7 @@ public String[] getNameExtensions() {
@TestMethod("testGetWriterClassName")
public String getWriterClassName() { return null; }

@TestMethod("testMatches")
public boolean matches(int lineNumber, String line) {
if (line.indexOf("MOPAC: VERSION 7.00") >= 0) {
return true;
Expand Down
1 change: 1 addition & 0 deletions src/main/org/openscience/cdk/io/formats/MOPAC93Format.java
Expand Up @@ -68,6 +68,7 @@ public String[] getNameExtensions() {
@TestMethod("testGetWriterClassName")
public String getWriterClassName() { return null; }

@TestMethod("testMatches")
public boolean matches(int lineNumber, String line) {
if (line.indexOf("MOPAC 93") >= 0) {
return true;
Expand Down
1 change: 1 addition & 0 deletions src/main/org/openscience/cdk/io/formats/MOPAC97Format.java
Expand Up @@ -68,6 +68,7 @@ public String[] getNameExtensions() {
@TestMethod("testGetWriterClassName")
public String getWriterClassName() { return null; }

@TestMethod("testMatches")
public boolean matches(int lineNumber, String line) {
if (line.indexOf("MOPAC 97.") >= 0){
return true;
Expand Down
Expand Up @@ -78,6 +78,7 @@ public String getReaderClassName() {
public String getWriterClassName() { return null; }

/** {@inheritDoc} */
@TestMethod("testMatches")
public boolean matches(int lineNumber, String line) {
if (lineNumber == 1 && line.equals("id,description,nodes,edges,s_abs,s_rel,c_abs,c_rel")) {
return true;
Expand Down
1 change: 1 addition & 0 deletions src/main/org/openscience/cdk/io/formats/Mol2Format.java
Expand Up @@ -74,6 +74,7 @@ public String getWriterClassName() {
return "org.openscience.cdk.io.Mol2Writer";
}

@TestMethod("testMatches")
public boolean matches(int lineNumber, String line) {
if (line.indexOf("<TRIPOS>") >= 0) {
return true;
Expand Down
1 change: 1 addition & 0 deletions src/main/org/openscience/cdk/io/formats/NWChemFormat.java
Expand Up @@ -71,6 +71,7 @@ public String[] getNameExtensions() {
@TestMethod("testGetWriterClassName")
public String getWriterClassName() { return null; }

@TestMethod("testMatches")
public boolean matches(int lineNumber, String line) {
if (line.indexOf("Northwest Computational Chemistry Package") >= 0) {
return true;
Expand Down
1 change: 1 addition & 0 deletions src/main/org/openscience/cdk/io/formats/PDBFormat.java
Expand Up @@ -74,6 +74,7 @@ public String getWriterClassName() {
return "org.openscience.cdk.io.PDBWriter";
}

@TestMethod("testMatches")
public boolean matches(int lineNumber, String line) {
if (line.startsWith("HEADER") ||
line.startsWith("HETATM ") ||
Expand Down
1 change: 1 addition & 0 deletions src/main/org/openscience/cdk/io/formats/PMPFormat.java
Expand Up @@ -70,6 +70,7 @@ public String getReaderClassName() {
@TestMethod("testGetWriterClassName")
public String getWriterClassName() { return null; }

@TestMethod("testMatches")
public boolean matches(int lineNumber, String line) {
if (line.startsWith("%%Header Start")) {
return true;
Expand Down
Expand Up @@ -84,6 +84,7 @@ public int getRequiredDataFeatures() {
return DataFeatures.NONE;
}

@TestMethod("testMatches")
public boolean matches(int lineNumber, String line) {
if (lineNumber == 1 && line.startsWith("PC-Compound")) return true;
return false;
Expand Down
Expand Up @@ -84,6 +84,7 @@ public int getRequiredDataFeatures() {
return DataFeatures.NONE;
}

@TestMethod("testMatches")
public boolean matches(int lineNumber, String line) {
if (lineNumber <= 2 && line.contains("<PC-Compound") &&
!line.contains("<PC-Compounds")) return true;
Expand Down
Expand Up @@ -84,6 +84,7 @@ public int getRequiredDataFeatures() {
return DataFeatures.NONE;
}

@TestMethod("testMatches")
public boolean matches(int lineNumber, String line) {
if (line.contains("<PC-Compounds")) return true;
return false;
Expand Down
Expand Up @@ -84,6 +84,7 @@ public int getRequiredDataFeatures() {
return DataFeatures.NONE;
}

@TestMethod("testMatches")
public boolean matches(int lineNumber, String line) {
if (lineNumber <= 2 && line.contains("<PC-Substance") &&
!line.contains("<PC-Substances")) return true;
Expand Down
Expand Up @@ -84,6 +84,7 @@ public int getRequiredDataFeatures() {
return DataFeatures.NONE;
}

@TestMethod("testMatches")
public boolean matches(int lineNumber, String line) {
if (lineNumber == 1 && line.startsWith("PC-Substances")) return true;
return false;
Expand Down
Expand Up @@ -84,6 +84,7 @@ public int getRequiredDataFeatures() {
return DataFeatures.NONE;
}

@TestMethod("testMatches")
public boolean matches(int lineNumber, String line) {
if (line.contains("<PC-Substances")) return true;
return false;
Expand Down
1 change: 1 addition & 0 deletions src/main/org/openscience/cdk/io/formats/QChemFormat.java
Expand Up @@ -70,6 +70,7 @@ public String[] getNameExtensions() {
@TestMethod("testGetWriterClassName")
public String getWriterClassName() { return null; }

@TestMethod("testMatches")
public boolean matches(int lineNumber, String line) {
if (line.indexOf("Welcome to Q-Chem") != -1) {
return true;
Expand Down
Expand Up @@ -80,6 +80,7 @@ public String getWriterClassName() {
return "org.openscience.cdk.io.RGroupQueryWriter";
}

@TestMethod("testMatches")
public boolean matches(int lineNumber, String line) {
if (line.indexOf("$RGP") >= 0)
return true;
Expand Down
1 change: 1 addition & 0 deletions src/main/org/openscience/cdk/io/formats/SDFFormat.java
Expand Up @@ -74,6 +74,7 @@ public String getWriterClassName() {
return "org.openscience.cdk.io.SDFWriter";
}

@TestMethod("testMatches")
public boolean matches(int lineNumber, String line) {
if (line.equals("$$$$")) {
return true;
Expand Down
1 change: 1 addition & 0 deletions src/main/org/openscience/cdk/io/formats/ShelXFormat.java
Expand Up @@ -74,6 +74,7 @@ public String getWriterClassName() {
return "org.openscience.cdk.io.ShelXWriter";
}

@TestMethod("testMatches")
public boolean matches(int lineNumber, String line) {
if (line.startsWith("ZERR ") ||
line.startsWith("TITL ")) {
Expand Down
1 change: 1 addition & 0 deletions src/main/org/openscience/cdk/io/formats/SpartanFormat.java
Expand Up @@ -68,6 +68,7 @@ public String[] getNameExtensions() {
@TestMethod("testGetWriterClassName")
public String getWriterClassName() { return null; }

@TestMethod("testMatches")
public boolean matches(int lineNumber, String line) {
if (line.indexOf("Spartan") != -1 &&
line.indexOf("Quantum Mechanics Program") != -1) {
Expand Down
1 change: 1 addition & 0 deletions src/main/org/openscience/cdk/io/formats/VASPFormat.java
Expand Up @@ -70,6 +70,7 @@ public String getReaderClassName() {
@TestMethod("testGetWriterClassName")
public String getWriterClassName() { return null; }

@TestMethod("testMatches")
public boolean matches(int lineNumber, String line) {
if (line.indexOf("NCLASS=") >= 0) {
return true;
Expand Down
1 change: 1 addition & 0 deletions src/main/org/openscience/cdk/io/formats/ZMatrixFormat.java
Expand Up @@ -70,6 +70,7 @@ public String getReaderClassName() {
@TestMethod("testGetWriterClassName")
public String getWriterClassName() { return null; }

@TestMethod("testMatches")
public boolean matches(int lineNumber, String line) {
if (lineNumber == 4 && line.indexOf("Z Matrix") != -1) {
return true;
Expand Down

0 comments on commit 8392519

Please sign in to comment.