From: Dean H. <dea...@us...> - 2005-01-20 04:13:39
|
Update of /cvsroot/ant-contrib/ant-contrib/test/src/net/sf/antcontrib/design In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9235/test/src/net/sf/antcontrib/design Modified Files: VerifyDesignTest.java Log Message: add some new features. I think we are ready to release this guy now with 29 tests total on such a little task :) Index: VerifyDesignTest.java =================================================================== RCS file: /cvsroot/ant-contrib/ant-contrib/test/src/net/sf/antcontrib/design/VerifyDesignTest.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** VerifyDesignTest.java 16 Jan 2005 20:51:12 -0000 1.6 --- VerifyDesignTest.java 20 Jan 2005 04:13:28 -0000 1.7 *************** *** 82,85 **** --- 82,114 ---- expectSpecificBuildException("testCatchDepend", REASON, Design.getErrorMessage(class1, class2)); } + + public void testDeclareJavaUtil() { + executeTarget("testDeclareJavaUtil"); + } + + public void testDeclareJavaUtilFail() { + String class1 = "mod.declarejavautil.ClassDependsOnJavaUtil"; + String class2 = "java.util.List"; + expectSpecificBuildException("testDeclareJavaUtilFail", REASON, Design.getErrorMessage(class1, class2)); + } + + public void testDeclareJavax() { + String class1 = "mod.declarejavax.ClassDependsOnJavax"; + String class2 = "javax.swing.JButton"; + expectSpecificBuildException("testDeclareJavax", REASON, Design.getErrorMessage(class1, class2)); + } + + public void testDeclareJavaxPass() { + executeTarget("testDeclareJavaxPass"); + } + + + //tests to write + + //depend on java.util should pass by default + //depend on java.util should fail after defining needDeclareTrue + //depend on javax.swing should pass after needDeclareFalse + + //depend on dummy should pass after needDeclareFalse public void testFieldDepend() { *************** *** 215,222 **** // executeTarget(""); // } ! public static void main(String[] args) { TestSuite suite = new TestSuite(); ! suite.addTest(new VerifyDesignTest("testRecursion3")); TestRunner.run(suite); } --- 244,251 ---- // executeTarget(""); // } ! public static void main(String[] args) { TestSuite suite = new TestSuite(); ! suite.addTest(new VerifyDesignTest("testDeclareJavaxPass")); TestRunner.run(suite); } |