From: Stefan B. <bo...@us...> - 2005-01-21 09:13:48
|
Update of /cvsroot/ant-contrib/ant-contrib/test/src/net/sf/antcontrib/property In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22465/test/src/net/sf/antcontrib/property Modified Files: PropertySelectorTest.java Log Message: test depended on order returned by Properties#keys() Index: PropertySelectorTest.java =================================================================== RCS file: /cvsroot/ant-contrib/ant-contrib/test/src/net/sf/antcontrib/property/PropertySelectorTest.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PropertySelectorTest.java 5 Feb 2004 16:36:57 -0000 1.4 --- PropertySelectorTest.java 21 Jan 2005 09:13:39 -0000 1.5 *************** *** 1,4 **** /* ! * Copyright (c) 2001-2004 Ant-Contrib project. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); --- 1,4 ---- /* ! * Copyright (c) 2001-2005 Ant-Contrib project. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); *************** *** 19,23 **** /** ! * Testcase for <propertycopy>. */ public class PropertySelectorTest extends BuildFileTest { --- 19,23 ---- /** ! * Testcase for <propertyselector>. */ public class PropertySelectorTest extends BuildFileTest { *************** *** 33,50 **** public void testDefaultGrouping() { simpleTest("select.test.grouping.0", ! "module.Module1.id,module.Module2.id"); } public void testDefaultGrouping1() { simpleTest("select.test.grouping.1", ! "Module1,Module2"); } ! private void simpleTest(String target, String expected) { executeTarget(target); ! assertTrue("'" + expected + "' was not found in '" + getLog() + "'", ! getLog().indexOf(expected) > -1); ! } } --- 33,55 ---- public void testDefaultGrouping() { simpleTest("select.test.grouping.0", ! "module.Module1.id", "module.Module2.id"); } public void testDefaultGrouping1() { simpleTest("select.test.grouping.1", ! "Module1", "Module2"); } ! private void simpleTest(String target, String expected1, String expected2) { executeTarget(target); ! String order1 = expected1 + "," + expected2; ! String order2 = expected2 + "," + expected1; ! int index1 = getLog().indexOf(order1); ! int index2 = getLog().indexOf(order2); ! assertTrue("Neither '" + order1 + "' nor '" + order2 ! + "'was not found in '" + getLog() + "'", ! index1 > -1 || index2 > -1); ! } } |