From: <ha...@us...> - 2006-10-23 05:39:19
|
Revision: 6007 http://svn.sourceforge.net/jmol/?rev=6007&view=rev Author: hansonr Date: 2006-10-22 22:39:15 -0700 (Sun, 22 Oct 2006) Log Message: ----------- ADF test Modified Paths: -------------- trunk/Jmol/test/org/jmol/adapter/smarter/TestSmarterJmolAdapter.java Modified: trunk/Jmol/test/org/jmol/adapter/smarter/TestSmarterJmolAdapter.java =================================================================== --- trunk/Jmol/test/org/jmol/adapter/smarter/TestSmarterJmolAdapter.java 2006-10-23 05:34:40 UTC (rev 6006) +++ trunk/Jmol/test/org/jmol/adapter/smarter/TestSmarterJmolAdapter.java 2006-10-23 05:39:15 UTC (rev 6007) @@ -1,5 +1,5 @@ /* - * JUnit TestCase for the SmilesParser + * JUnit TestCase for the Smarter Adapter */ package org.jmol.adapter.smarter; @@ -40,6 +40,13 @@ /** * Test for reading files in aminoacids/ */ + public void testAdf() { + checkDirectory("adf", "adf", ""); + } + + /** + * Test for reading files in aminoacids/ + */ public void testAminoAcids() { checkDirectory("aminoacids", "mol,pdb", ""); } @@ -214,9 +221,9 @@ */ private void checkDirectory(String directory, String exts, String extsZ) { File dir = new File("../Jmol-datafiles", directory); - + String message = ""; - + // Checking uncompressed files final String[] ext = exts.split("[,]"); String[] files = dir.list(new FilenameFilter() { @@ -229,7 +236,7 @@ } return false; } - + }); for (int i = 0; i < files.length; i++) { try { @@ -238,10 +245,12 @@ message += error + "\n"; } } catch (Exception e) { - message += "Exception " + e.getClass().getName() + ": " + e.getMessage(); + message += files[i] + " "; + message += "Exception " + e.getClass().getName() + ": " + + e.getMessage(); } } - + // Checking compressed files final String[] extZ = extsZ.split("[,]"); String[] filesZ = dir.list(new FilenameFilter() { @@ -254,7 +263,7 @@ } return false; } - + }); for (int i = 0; i < filesZ.length; i++) { try { @@ -263,10 +272,12 @@ message += error + "\n"; } } catch (Exception e) { - message += "Exception " + e.getClass().getName() + ": " + e.getMessage(); + message += files[i] + " "; + message += "Exception " + e.getClass().getName() + ": " + + e.getMessage(); } } - + // Checking error messages if (message.length() > 0) { System.out.flush(); @@ -293,6 +304,7 @@ SmarterJmolAdapter adapter = new SmarterJmolAdapter(null); adapter.logger = new TestLogger(adapter); File file = new File(new File("../Jmol-datafiles", directory), filename); + System.out.println(file); JUnitLogger.setInformation(file.getPath()); InputStream iStream = new FileInputStream(file); BufferedInputStream biStream = new BufferedInputStream(iStream); @@ -329,6 +341,7 @@ SmarterJmolAdapter adapter = new SmarterJmolAdapter(null); adapter.logger = new TestLogger(adapter); File file = new File(new File("../Jmol-datafiles", directory), filename); + System.out.println(file); JUnitLogger.setInformation(file.getPath()); InputStream iStream = new FileInputStream(file); BufferedInputStream biStream = new BufferedInputStream(iStream); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |