Normalise tabulation and line breaks (cf master) Project: http://git-wip-us.apache.org/repos/asf/ant/repo Commit: http://git-wip-us.apache.org/repos/asf/ant/commit/0ed7f4ab Tree: http://git-wip-us.apache.org/repos/asf/ant/tree/0ed7f4ab Diff: http://git-wip-us.apache.org/repos/asf/ant/diff/0ed7f4ab
Branch: refs/heads/1.9.x Commit: 0ed7f4ab51a47e717b35d14e5af46b124e183f9c Parents: ecb6acf Author: Gintas Grigelionis <[email protected]> Authored: Wed Nov 29 22:57:58 2017 +0100 Committer: Gintas Grigelionis <[email protected]> Committed: Wed Nov 29 22:57:58 2017 +0100 ---------------------------------------------------------------------- .../taskdefs/manifestclasspath/Alpha.java | 32 +- .../taskdefs/manifestclasspath/Beta.java | 36 +- .../types/assertions/AssertionMain.java | 14 +- .../types/assertions/AssertionTest.java | 48 +- src/main/org/apache/tools/ant/Target.java | 4 +- .../tools/ant/taskdefs/optional/NetRexxC.java | 3 +- .../optional/junit/IgnoredTestResult.java | 2 +- .../optional/junit/JUnitVersionHelper.java | 8 +- .../BaseResourceCollectionWrapper.java | 2 +- .../org/apache/tools/ant/util/JavaEnvUtils.java | 2 +- .../core/location/src/task/EchoLocation.java | 34 +- .../junit/org/apache/tools/ant/AntAssert.java | 20 +- .../apache/tools/ant/AntClassLoaderTest.java | 8 +- .../org/apache/tools/ant/BuildFileRule.java | 7 +- .../junit/org/apache/tools/ant/CaseTest.java | 19 +- .../apache/tools/ant/DirectoryScannerTest.java | 16 +- .../org/apache/tools/ant/DispatchTaskTest.java | 10 +- .../org/apache/tools/ant/ExecutorTest.java | 11 +- .../apache/tools/ant/ExtendedTaskdefTest.java | 32 +- .../junit/org/apache/tools/ant/IncludeTest.java | 6 +- .../org/apache/tools/ant/LoaderRefTest.java | 23 +- .../tools/ant/filters/TokenFilterTest.java | 68 +- .../apache/tools/ant/taskdefs/DirnameTest.java | 42 +- .../apache/tools/ant/taskdefs/ExecTaskTest.java | 8 +- .../org/apache/tools/ant/taskdefs/GzipTest.java | 42 +- .../apache/tools/ant/taskdefs/ImportTest.java | 24 +- .../org/apache/tools/ant/taskdefs/JarTest.java | 52 +- .../apache/tools/ant/taskdefs/LoadFileTest.java | 34 +- .../apache/tools/ant/taskdefs/MacroDefTest.java | 71 +- .../apache/tools/ant/taskdefs/MakeUrlTest.java | 40 +- .../ant/taskdefs/ManifestClassPathTest.java | 126 +- .../apache/tools/ant/taskdefs/MkdirTest.java | 20 +- .../org/apache/tools/ant/taskdefs/NiceTest.java | 20 +- .../tools/ant/taskdefs/PreSetDefTest.java | 27 +- .../apache/tools/ant/taskdefs/PropertyTest.java | 34 +- .../apache/tools/ant/taskdefs/ReplaceTest.java | 62 +- .../apache/tools/ant/taskdefs/SleepTest.java | 7 +- .../apache/tools/ant/taskdefs/TStampTest.java | 2 +- .../org/apache/tools/ant/taskdefs/TarTest.java | 60 +- .../apache/tools/ant/taskdefs/TaskdefTest.java | 46 +- .../tools/ant/taskdefs/TypeAdapterTest.java | 10 +- .../apache/tools/ant/taskdefs/TypedefTest.java | 70 +- .../apache/tools/ant/taskdefs/UnzipTest.java | 40 +- .../apache/tools/ant/taskdefs/UpToDateTest.java | 8 +- .../apache/tools/ant/taskdefs/XmlnsTest.java | 11 +- .../org/apache/tools/ant/taskdefs/ZipTest.java | 48 +- .../tools/ant/taskdefs/email/MessageTest.java | 124 +- .../tools/ant/taskdefs/optional/ANTLRTest.java | 432 ++-- .../optional/AbstractXSLTLiaisonTest.java | 208 +- .../taskdefs/optional/BeanShellScriptTest.java | 96 +- .../taskdefs/optional/EchoPropertiesTest.java | 531 +++-- .../tools/ant/taskdefs/optional/JavahTest.java | 120 +- .../tools/ant/taskdefs/optional/JspcTest.java | 399 ++-- .../ant/taskdefs/optional/Native2AsciiTest.java | 114 +- .../ant/taskdefs/optional/PropertyFileTest.java | 470 ++-- .../tools/ant/taskdefs/optional/PvcsTest.java | 158 +- .../taskdefs/optional/ReplaceRegExpTest.java | 264 +-- .../taskdefs/optional/RhinoReferenceTest.java | 90 +- .../ant/taskdefs/optional/RhinoScriptTest.java | 134 +- .../tools/ant/taskdefs/optional/RpmTest.java | 142 +- .../taskdefs/optional/SchemaValidateTest.java | 256 +-- .../optional/XmlValidateCatalogTest.java | 142 +- .../ant/taskdefs/optional/XmlValidateTest.java | 386 ++-- .../tools/ant/taskdefs/optional/XsltTest.java | 171 +- .../taskdefs/optional/depend/DependTest.java | 426 ++-- .../taskdefs/optional/i18n/TranslateTest.java | 173 +- .../ant/taskdefs/optional/image/ImageTest.java | 265 ++- .../taskdefs/optional/jdepend/JDependTest.java | 198 +- .../taskdefs/optional/junit/BatchTestTest.java | 242 +- .../taskdefs/optional/junit/DOMUtilTest.java | 106 +- .../optional/junit/JUnitClassLoaderTest.java | 74 +- .../taskdefs/optional/junit/JUnitTaskTest.java | 62 +- .../optional/junit/JUnitTestListenerTest.java | 222 +- .../optional/junit/JUnitTestRunnerTest.java | 21 +- .../optional/junit/JUnitVersionHelperTest.java | 204 +- .../ant/taskdefs/optional/junit/NoVmCrash.java | 60 +- .../ant/taskdefs/optional/junit/Printer.java | 84 +- .../ant/taskdefs/optional/junit/Sleeper.java | 60 +- .../optional/junit/SuiteMethodTest.java | 84 +- .../optional/junit/TearDownOnVmCrashTest.java | 106 +- .../taskdefs/optional/junit/TestFormatter.java | 224 +- .../ant/taskdefs/optional/junit/VmCrash.java | 62 +- .../junit/XMLFormatterWithCDATAOnSystemOut.java | 166 +- .../optional/junit/XMLResultAggregatorTest.java | 186 +- .../ant/taskdefs/optional/net/FTPTest.java | 1758 +++++++-------- .../taskdefs/optional/script/ScriptDefTest.java | 292 +-- .../ant/taskdefs/optional/sos/SOSTest.java | 702 +++--- .../optional/splash/SplashScreenTest.java | 99 +- .../ant/taskdefs/optional/unix/SymlinkTest.java | 594 ++--- .../ant/taskdefs/optional/vss/MSVSSTest.java | 950 ++++---- .../tools/ant/types/AbstractFileSetTest.java | 496 ++-- .../org/apache/tools/ant/types/AddTypeTest.java | 446 ++-- .../apache/tools/ant/types/AssertionsTest.java | 248 +- .../tools/ant/types/CommandlineJavaTest.java | 382 ++-- .../apache/tools/ant/types/CommandlineTest.java | 360 +-- .../apache/tools/ant/types/DescriptionTest.java | 118 +- .../org/apache/tools/ant/types/DirSetTest.java | 188 +- .../ant/types/EnumeratedAttributeTest.java | 212 +- .../apache/tools/ant/types/FileListTest.java | 326 +-- .../org/apache/tools/ant/types/FileSetTest.java | 72 +- .../apache/tools/ant/types/FilterSetTest.java | 478 ++-- .../apache/tools/ant/types/FlexIntegerTest.java | 148 +- .../org/apache/tools/ant/types/MapperTest.java | 470 ++-- .../org/apache/tools/ant/types/PathTest.java | 1158 +++++----- .../apache/tools/ant/types/PatternSetTest.java | 412 ++-- .../apache/tools/ant/types/PermissionsTest.java | 316 +-- .../org/apache/tools/ant/types/PolyTest.java | 158 +- .../tools/ant/types/RedirectorElementTest.java | 172 +- .../tools/ant/types/ResourceOutputTest.java | 320 +-- .../apache/tools/ant/types/TarFileSetTest.java | 238 +- .../ant/types/XMLCatalogBuildFileTest.java | 196 +- .../apache/tools/ant/types/XMLCatalogTest.java | 784 +++---- .../apache/tools/ant/types/ZipFileSetTest.java | 236 +- .../tools/ant/types/mappers/GlobMapperTest.java | 96 +- .../tools/ant/types/mappers/MapperResult.java | 206 +- .../types/mappers/RegexpPatternMapperTest.java | 100 +- .../ant/types/optional/ScriptMapperTest.java | 106 +- .../ant/types/optional/ScriptSelectorTest.java | 166 +- .../types/optional/depend/ClassFileSetTest.java | 372 +-- .../ant/types/resources/FileResourceTest.java | 274 +-- .../ant/types/resources/JavaResourceTest.java | 124 +- .../resources/LazyResourceCollectionTest.java | 372 +-- .../types/resources/MultiRootFileSetTest.java | 262 +-- .../ant/types/resources/ResourceListTest.java | 268 +-- .../ant/types/resources/TarResourceTest.java | 108 +- .../ant/types/selectors/BaseSelectorRule.java | 250 +-- .../ant/types/selectors/BaseSelectorTest.java | 590 ++--- .../ant/types/selectors/ContainsRegexpTest.java | 111 +- .../types/selectors/ContainsSelectorTest.java | 228 +- .../ant/types/selectors/DependSelectorTest.java | 370 +-- .../ant/types/selectors/DepthSelectorTest.java | 294 +-- .../types/selectors/FilenameSelectorTest.java | 230 +- .../ant/types/selectors/MockAlgorithm.java | 74 +- .../tools/ant/types/selectors/MockCache.java | 136 +- .../ant/types/selectors/MockComparator.java | 64 +- .../types/selectors/ModifiedSelectorTest.java | 2124 +++++++++--------- .../types/selectors/PresentSelectorTest.java | 274 +-- .../ant/types/selectors/SignedSelectorTest.java | 108 +- .../ant/types/selectors/SizeSelectorTest.java | 474 ++-- .../types/selectors/TokenizedPatternTest.java | 154 +- .../ant/types/selectors/TypeSelectorTest.java | 162 +- .../tools/ant/util/Base64ConverterTest.java | 86 +- .../tools/ant/util/ClasspathUtilsTest.java | 134 +- .../tools/ant/util/CollectionUtilsTest.java | 204 +- .../tools/ant/util/DOMElementWriterTest.java | 610 ++--- .../apache/tools/ant/util/DeweyDecimalTest.java | 140 +- .../apache/tools/ant/util/FileUtilsTest.java | 1250 +++++------ .../tools/ant/util/GlobPatternMapperTest.java | 204 +- .../apache/tools/ant/util/JAXPUtilsTest.java | 86 +- .../apache/tools/ant/util/JavaEnvUtilsTest.java | 2 +- .../util/LayoutPreservingPropertiesTest.java | 632 +++--- .../ant/util/LazyFileOutputStreamTest.java | 150 +- .../ant/util/LineOrientedOutputStreamTest.java | 306 +-- .../tools/ant/util/LinkedHashtableTest.java | 330 +-- .../apache/tools/ant/util/LoaderUtilsTest.java | 86 +- .../tools/ant/util/PackageNameMapperTest.java | 86 +- .../tools/ant/util/ReaderInputStreamTest.java | 284 +-- .../tools/ant/util/ResourceUtilsTest.java | 126 +- .../apache/tools/ant/util/StringUtilsTest.java | 340 +-- .../apache/tools/ant/util/SymlinkUtilsTest.java | 80 +- .../tools/ant/util/UnPackageNameMapperTest.java | 84 +- .../apache/tools/ant/util/UnicodeUtilTest.java | 66 +- .../apache/tools/ant/util/VectorSetTest.java | 590 ++--- .../apache/tools/ant/util/XMLFragmentTest.java | 182 +- .../ant/util/facade/FacadeTaskHelperTest.java | 128 +- .../ImplementationSpecificArgumentTest.java | 118 +- .../ant/util/regexp/JakartaOroMatcherTest.java | 70 +- .../ant/util/regexp/JakartaOroRegexpTest.java | 70 +- .../util/regexp/JakartaRegexpMatcherTest.java | 126 +- .../util/regexp/JakartaRegexpRegexpTest.java | 124 +- .../ant/util/regexp/Jdk14RegexpMatcherTest.java | 140 +- .../ant/util/regexp/Jdk14RegexpRegexpTest.java | 142 +- .../ant/util/regexp/RegexpMatcherTest.java | 408 ++-- .../tools/ant/util/regexp/RegexpTest.java | 126 +- .../org/apache/tools/bzip2/BlockSortTest.java | 342 +-- .../apache/tools/bzip2/CBZip2StreamTest.java | 94 +- .../org/apache/tools/mail/MailMessageTest.java | 1414 ++++++------ .../org/apache/tools/tar/TarEntryTest.java | 70 +- .../apache/tools/tar/TarOutputStreamTest.java | 70 +- .../org/apache/tools/tar/TarRoundTripTest.java | 146 +- .../org/apache/tools/zip/AsiExtraFieldTest.java | 326 +-- .../apache/tools/zip/ExtraFieldUtilsTest.java | 420 ++-- .../org/apache/tools/zip/UTF8ZipFilesTest.java | 519 +++-- .../org/apache/tools/zip/ZipEncodingTest.java | 304 +-- .../org/apache/tools/zip/ZipEntryTest.java | 456 ++-- .../junit/org/apache/tools/zip/ZipLongTest.java | 188 +- .../apache/tools/zip/ZipOutputStreamTest.java | 146 +- .../org/apache/tools/zip/ZipShortTest.java | 184 +- .../example/junit/AbstractJUnit3TestMissed.java | 54 +- .../junit/AbstractJUnit3TestNotMissed.java | 62 +- .../org/example/junit/AbstractTestMissed.java | 58 +- .../example/junit/AbstractTestNotMissed.java | 64 +- .../org/example/junit/JUnit3NonTestMissed.java | 54 +- .../org/example/junit/JUnit3TestNotMissed.java | 56 +- .../org/example/junit/JUnit4Skippable.java | 148 +- .../org/example/junit/MultilineAsserts.java | 54 +- .../junit/org/example/junit/NonTestMissed.java | 50 +- src/tests/junit/org/example/junit/Output.java | 74 +- .../junit/org/example/junit/TestNotMissed.java | 58 +- .../example/junit/TestWithSuiteNotMissed.java | 64 +- .../junit/org/example/junit/ThreadedOutput.java | 86 +- src/tests/junit/org/example/junit/Timeout.java | 64 +- .../junit/org/example/junit/XmlParserTest.java | 116 +- .../example/tasks/TaskdefTestContainerTask.java | 50 +- .../example/tasks/TaskdefTestSimpleTask.java | 89 +- .../org/example/types/TypedefTestType.java | 49 +- 206 files changed, 21204 insertions(+), 21232 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ant/blob/0ed7f4ab/src/etc/testcases/taskdefs/manifestclasspath/Alpha.java ---------------------------------------------------------------------- diff --git a/src/etc/testcases/taskdefs/manifestclasspath/Alpha.java b/src/etc/testcases/taskdefs/manifestclasspath/Alpha.java index 96124d5..9f00a93 100644 --- a/src/etc/testcases/taskdefs/manifestclasspath/Alpha.java +++ b/src/etc/testcases/taskdefs/manifestclasspath/Alpha.java @@ -1,21 +1,21 @@ /* -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You under the Apache License, Version 2.0 -(the "License"); you may not use this file except in compliance with -the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ public class Alpha { public String toString() { - return "alpha"; + return "alpha"; } } http://git-wip-us.apache.org/repos/asf/ant/blob/0ed7f4ab/src/etc/testcases/taskdefs/manifestclasspath/Beta.java ---------------------------------------------------------------------- diff --git a/src/etc/testcases/taskdefs/manifestclasspath/Beta.java b/src/etc/testcases/taskdefs/manifestclasspath/Beta.java index c1b446f..7ffeffe 100644 --- a/src/etc/testcases/taskdefs/manifestclasspath/Beta.java +++ b/src/etc/testcases/taskdefs/manifestclasspath/Beta.java @@ -1,25 +1,25 @@ /* -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You under the Apache License, Version 2.0 -(the "License"); you may not use this file except in compliance with -the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ public class Beta extends Alpha { public String toString() { - return "beta " + super.toString(); + return "beta " + super.toString(); } public static void main(String [] args) { - Beta myBeta = new Beta(); - System.out.println(myBeta.toString()); + Beta myBeta = new Beta(); + System.out.println(myBeta.toString()); } } http://git-wip-us.apache.org/repos/asf/ant/blob/0ed7f4ab/src/etc/testcases/types/assertions/AssertionMain.java ---------------------------------------------------------------------- diff --git a/src/etc/testcases/types/assertions/AssertionMain.java b/src/etc/testcases/types/assertions/AssertionMain.java index f4aa690..bc8853b 100644 --- a/src/etc/testcases/types/assertions/AssertionMain.java +++ b/src/etc/testcases/types/assertions/AssertionMain.java @@ -1,4 +1,4 @@ -/* +/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -13,19 +13,19 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * + * */ - + /** * this is an assertion tester * It has a main() entry */ public class AssertionMain { - + public static void main(String args[]) { - assert true == false : "there exist no facts that are both true and false"; - System.out.println("Assertions are disabled"); + assert true == false : "there exist no facts that are both true and false"; + System.out.println("Assertions are disabled"); } - + } http://git-wip-us.apache.org/repos/asf/ant/blob/0ed7f4ab/src/etc/testcases/types/assertions/AssertionTest.java ---------------------------------------------------------------------- diff --git a/src/etc/testcases/types/assertions/AssertionTest.java b/src/etc/testcases/types/assertions/AssertionTest.java index 19ed2df..28a9dc3 100644 --- a/src/etc/testcases/types/assertions/AssertionTest.java +++ b/src/etc/testcases/types/assertions/AssertionTest.java @@ -1,4 +1,4 @@ -/* +/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -13,33 +13,33 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * + * */ - + import junit.framework.TestCase; /** - * this is an assertion tester for junit + * this is an assertion tester for junit */ public class AssertionTest extends TestCase { - - public AssertionTest(String name) { - super(name); - } - - public void testAssertRaised() { - try { - assert true == false; - fail("expected an assertion"); - } catch(AssertionError asserto) { - //if we got here, all was well - } - } - - - public void testAssertNotRaised() { - assert(2+2==4); - } - - + + public AssertionTest(String name) { + super(name); + } + + public void testAssertRaised() { + try { + assert true == false; + fail("expected an assertion"); + } catch(AssertionError asserto) { + //if we got here, all was well + } + } + + + public void testAssertNotRaised() { + assert(2+2==4); + } + + } http://git-wip-us.apache.org/repos/asf/ant/blob/0ed7f4ab/src/main/org/apache/tools/ant/Target.java ---------------------------------------------------------------------- diff --git a/src/main/org/apache/tools/ant/Target.java b/src/main/org/apache/tools/ant/Target.java index 796b7e1..b1df2b2 100644 --- a/src/main/org/apache/tools/ant/Target.java +++ b/src/main/org/apache/tools/ant/Target.java @@ -426,8 +426,8 @@ public class Target implements TaskContainer { try { // use index-based approach to avoid ConcurrentModificationExceptions; // also account for growing target children - // do not optimize this loop by replacing children.size() by a variable - // as children can be added dynamically as in RhinoScriptTest where a target is adding work for itself + // do not optimize this loop by replacing children.size() by a variable + // as children can be added dynamically as in RhinoScriptTest where a target is adding work for itself for (int i = 0; i < children.size(); i++) { Object o = children.get(i); if (o instanceof Task) { http://git-wip-us.apache.org/repos/asf/ant/blob/0ed7f4ab/src/main/org/apache/tools/ant/taskdefs/optional/NetRexxC.java ---------------------------------------------------------------------- diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/NetRexxC.java b/src/main/org/apache/tools/ant/taskdefs/optional/NetRexxC.java index 21440f1..dff24bc 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/NetRexxC.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/NetRexxC.java @@ -745,7 +745,7 @@ public class NetRexxC extends MatchingTask { filecopyList.put(srcFile.getAbsolutePath(), destFile.getAbsolutePath()); compileList.addElement(destFile.getAbsolutePath()); } else if (compile && srcFile.lastModified() > classFile.lastModified()) { - // compile case tests against .class file + // compile case tests against .class file filecopyList.put(srcFile.getAbsolutePath(), destFile.getAbsolutePath()); compileList.addElement(destFile.getAbsolutePath()); } @@ -1039,4 +1039,3 @@ public class NetRexxC extends MatchingTask { } } } - http://git-wip-us.apache.org/repos/asf/ant/blob/0ed7f4ab/src/main/org/apache/tools/ant/taskdefs/optional/junit/IgnoredTestResult.java ---------------------------------------------------------------------- diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/junit/IgnoredTestResult.java b/src/main/org/apache/tools/ant/taskdefs/optional/junit/IgnoredTestResult.java index c3bb18d..ae82857 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/junit/IgnoredTestResult.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/junit/IgnoredTestResult.java @@ -83,7 +83,7 @@ public class IgnoredTestResult extends TestResult { * @param cause the details of the test and assumption failure. */ public void testAssumptionFailure(Test test, Throwable cause) { - skipped.add(new TestIgnored(test)); + skipped.add(new TestIgnored(test)); for (IgnoredTestListener listener : listeners) { listener.testAssumptionFailure(test, cause); } http://git-wip-us.apache.org/repos/asf/ant/blob/0ed7f4ab/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitVersionHelper.java ---------------------------------------------------------------------- diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitVersionHelper.java b/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitVersionHelper.java index 9a21cae..f0d7433 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitVersionHelper.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitVersionHelper.java @@ -145,10 +145,10 @@ public class JUnitVersionHelper { Class<?> junit4FacadeClass = Class.forName("junit.framework.JUnit4TestCaseFacade"); if (test != null && test.getClass().isAssignableFrom(junit4FacadeClass)) { //try and get the message coded as part of the ignore - /* - * org.junit.runner.Description contains a getAnnotation(Class) method... but this - * wasn't in older versions of JUnit4 so we have to try and do this by reflection - */ + /* + * org.junit.runner.Description contains a getAnnotation(Class) method... but this + * wasn't in older versions of JUnit4 so we have to try and do this by reflection + */ Class<?> testClass = Class.forName(JUnitVersionHelper.getTestCaseClassName(test)); Method testMethod = testClass.getMethod(JUnitVersionHelper.getTestCaseName(test)); http://git-wip-us.apache.org/repos/asf/ant/blob/0ed7f4ab/src/main/org/apache/tools/ant/types/resources/BaseResourceCollectionWrapper.java ---------------------------------------------------------------------- diff --git a/src/main/org/apache/tools/ant/types/resources/BaseResourceCollectionWrapper.java b/src/main/org/apache/tools/ant/types/resources/BaseResourceCollectionWrapper.java index 78ba95e..2734620 100644 --- a/src/main/org/apache/tools/ant/types/resources/BaseResourceCollectionWrapper.java +++ b/src/main/org/apache/tools/ant/types/resources/BaseResourceCollectionWrapper.java @@ -36,7 +36,7 @@ public abstract class BaseResourceCollectionWrapper return cacheCollection().iterator(); } - protected int getSize() { + protected int getSize() { return cacheCollection().size(); } http://git-wip-us.apache.org/repos/asf/ant/blob/0ed7f4ab/src/main/org/apache/tools/ant/util/JavaEnvUtils.java ---------------------------------------------------------------------- diff --git a/src/main/org/apache/tools/ant/util/JavaEnvUtils.java b/src/main/org/apache/tools/ant/util/JavaEnvUtils.java index a551c0f..969621d 100644 --- a/src/main/org/apache/tools/ant/util/JavaEnvUtils.java +++ b/src/main/org/apache/tools/ant/util/JavaEnvUtils.java @@ -518,7 +518,7 @@ public final class JavaEnvUtils { case VERSION_1_4: tests.addElement("sun.audio.AudioPlayer"); if (javaVersionNumber == VERSION_1_4) { - // only for 1.4, not for higher versions which fall through + // only for 1.4, not for higher versions which fall through tests.addElement("org.apache.crimson.parser.ContentModel"); tests.addElement("org.apache.xalan.processor.ProcessorImport"); tests.addElement("org.apache.xml.utils.URI"); http://git-wip-us.apache.org/repos/asf/ant/blob/0ed7f4ab/src/tests/antunit/core/location/src/task/EchoLocation.java ---------------------------------------------------------------------- diff --git a/src/tests/antunit/core/location/src/task/EchoLocation.java b/src/tests/antunit/core/location/src/task/EchoLocation.java index 0143145..a2031e6 100644 --- a/src/tests/antunit/core/location/src/task/EchoLocation.java +++ b/src/tests/antunit/core/location/src/task/EchoLocation.java @@ -1,26 +1,26 @@ /* -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You under the Apache License, Version 2.0 -(the "License"); you may not use this file except in compliance with -the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package task; import org.apache.tools.ant.Project; import org.apache.tools.ant.Task; public class EchoLocation extends Task { - public void execute() { + public void execute() { log("Line: " + getLocation().getLineNumber(), Project.MSG_INFO); } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ant/blob/0ed7f4ab/src/tests/junit/org/apache/tools/ant/AntAssert.java ---------------------------------------------------------------------- diff --git a/src/tests/junit/org/apache/tools/ant/AntAssert.java b/src/tests/junit/org/apache/tools/ant/AntAssert.java index 7771924..5bc3caa 100644 --- a/src/tests/junit/org/apache/tools/ant/AntAssert.java +++ b/src/tests/junit/org/apache/tools/ant/AntAssert.java @@ -32,10 +32,10 @@ public class AntAssert { * @param needle the string to search for. * @param haystack the string to search in. */ - public static void assertContains(String message, String needle, String haystack) { - String formattedMessage = (message == null ? "" : message + " "); - assertTrue(formattedMessage + String.format("expected message containing: <%s> but got: <%s>", needle, haystack), haystack.contains(needle)); - } + public static void assertContains(String message, String needle, String haystack) { + String formattedMessage = (message == null ? "" : message + " "); + assertTrue(formattedMessage + String.format("expected message containing: <%s> but got: <%s>", needle, haystack), haystack.contains(needle)); + } /** * Assert that a string contains the given substring. A default failure message will be used if the target string @@ -43,9 +43,9 @@ public class AntAssert { * @param needle the target string to search for. * @param haystack the string to search in. */ - public static void assertContains(String needle, String haystack) { - assertContains("", needle, haystack); - } + public static void assertContains(String needle, String haystack) { + assertContains("", needle, haystack); + } /** * Assert that a string does not contain the given substring. @@ -54,8 +54,8 @@ public class AntAssert { * @param haystack the string to search in. */ public static void assertNotContains(String message, String needle, String haystack) { - String formattedMessage = (message == null ? "" : message + " "); - assertFalse(formattedMessage + String.format("expected message not to contain: <%s> but got: <%s>", needle, haystack), haystack.contains(needle)); + String formattedMessage = (message == null ? "" : message + " "); + assertFalse(formattedMessage + String.format("expected message not to contain: <%s> but got: <%s>", needle, haystack), haystack.contains(needle)); } /** @@ -67,6 +67,6 @@ public class AntAssert { public static void assertNotContains(String needle, String haystack) { assertNotContains("", needle, haystack); } - + } http://git-wip-us.apache.org/repos/asf/ant/blob/0ed7f4ab/src/tests/junit/org/apache/tools/ant/AntClassLoaderTest.java ---------------------------------------------------------------------- diff --git a/src/tests/junit/org/apache/tools/ant/AntClassLoaderTest.java b/src/tests/junit/org/apache/tools/ant/AntClassLoaderTest.java index 568cbc1..17c418a 100644 --- a/src/tests/junit/org/apache/tools/ant/AntClassLoaderTest.java +++ b/src/tests/junit/org/apache/tools/ant/AntClassLoaderTest.java @@ -44,7 +44,7 @@ import org.junit.Test; * */ public class AntClassLoaderTest { - + @Rule public BuildFileRule buildRule = new BuildFileRule(); @@ -62,7 +62,7 @@ public class AntClassLoaderTest { loader.cleanup(); } } - + //test inspired by bug report 37085 @Test public void testJarWithManifestInDirWithSpace() { @@ -75,7 +75,7 @@ public class AntClassLoaderTest { String path = loader.getClasspath(); assertEquals(mainjarstring + File.pathSeparator + extjarstring, path); } - + @Test public void testJarWithManifestInNonAsciiDir() { String mainjarstring = buildRule.getProject().getProperty("main.jar.nonascii"); @@ -87,7 +87,7 @@ public class AntClassLoaderTest { String path = loader.getClasspath(); assertEquals(mainjarstring + File.pathSeparator + extjarstring, path); } - + @Test public void testCleanup() throws BuildException { Path path = new Path(buildRule.getProject(), "."); http://git-wip-us.apache.org/repos/asf/ant/blob/0ed7f4ab/src/tests/junit/org/apache/tools/ant/BuildFileRule.java ---------------------------------------------------------------------- diff --git a/src/tests/junit/org/apache/tools/ant/BuildFileRule.java b/src/tests/junit/org/apache/tools/ant/BuildFileRule.java index b4e00fd..05f7d8e 100644 --- a/src/tests/junit/org/apache/tools/ant/BuildFileRule.java +++ b/src/tests/junit/org/apache/tools/ant/BuildFileRule.java @@ -61,14 +61,14 @@ import org.junit.rules.ExternalResource; */ public class BuildFileRule extends ExternalResource { - private Project project; + private Project project; private StringBuffer logBuffer; private StringBuffer fullLogBuffer; private StringBuffer outputBuffer; private StringBuffer errorBuffer; - + /** * Tidies up following a test execution. If the currently configured @@ -313,6 +313,5 @@ public class BuildFileRule extends ExternalResource { public File getOutputDir() { return new File(getProject().getProperty("output")); } - -} +} http://git-wip-us.apache.org/repos/asf/ant/blob/0ed7f4ab/src/tests/junit/org/apache/tools/ant/CaseTest.java ---------------------------------------------------------------------- diff --git a/src/tests/junit/org/apache/tools/ant/CaseTest.java b/src/tests/junit/org/apache/tools/ant/CaseTest.java index 81cf385..04f60be 100644 --- a/src/tests/junit/org/apache/tools/ant/CaseTest.java +++ b/src/tests/junit/org/apache/tools/ant/CaseTest.java @@ -29,9 +29,9 @@ import static org.junit.Assert.fail; * Simple tests of build file processing */ public class CaseTest { - - @Rule - public BuildFileRule buildRule = new BuildFileRule(); + + @Rule + public BuildFileRule buildRule = new BuildFileRule(); @Before public void setUp() { @@ -53,12 +53,11 @@ public class CaseTest { */ @Test public void testTaskCase() { - try { - buildRule.executeTarget("taskcase"); - fail("Build exception should have been thrown due to case sensitivity of name"); - } catch(BuildException ex) { - assertContains("Task names should be case sensitive", "Problem: failed to create task or type ecHO", ex.getMessage()); - } + try { + buildRule.executeTarget("taskcase"); + fail("Build exception should have been thrown due to case sensitivity of name"); + } catch(BuildException ex) { + assertContains("Task names should be case sensitive", "Problem: failed to create task or type ecHO", ex.getMessage()); + } } } - http://git-wip-us.apache.org/repos/asf/ant/blob/0ed7f4ab/src/tests/junit/org/apache/tools/ant/DirectoryScannerTest.java ---------------------------------------------------------------------- diff --git a/src/tests/junit/org/apache/tools/ant/DirectoryScannerTest.java b/src/tests/junit/org/apache/tools/ant/DirectoryScannerTest.java index c0c25fd..baf0b20 100644 --- a/src/tests/junit/org/apache/tools/ant/DirectoryScannerTest.java +++ b/src/tests/junit/org/apache/tools/ant/DirectoryScannerTest.java @@ -44,9 +44,9 @@ import org.junit.Test; */ public class DirectoryScannerTest { - @Rule - public BuildFileRule buildRule = new BuildFileRule(); - + @Rule + public BuildFileRule buildRule = new BuildFileRule(); + // keep track of what operating systems are supported here. private boolean supportsSymlinks = Os.isFamily("unix"); @@ -121,8 +121,8 @@ public class DirectoryScannerTest { @Test public void testAllowSymlinks() { - - assumeTrue("Current system does not support Symlinks", supportsSymlinks); + + assumeTrue("Current system does not support Symlinks", supportsSymlinks); buildRule.getProject().executeTarget("symlink-setup"); DirectoryScanner ds = new DirectoryScanner(); @@ -135,7 +135,7 @@ public class DirectoryScannerTest { @Test public void testProhibitSymlinks() { - assumeTrue("Current system does not support Symlinks", supportsSymlinks); + assumeTrue("Current system does not support Symlinks", supportsSymlinks); buildRule.getProject().executeTarget("symlink-setup"); @@ -244,14 +244,14 @@ public class DirectoryScannerTest { * Only supports test on Linux at the moment because Java has * no real notion of symlinks built in, so an os-specfic call * to Runtime.exec() must be made to create a link to test against. - * @throws InterruptedException + * @throws InterruptedException */ @Test public void testSetFollowLinks() throws IOException, InterruptedException { if (supportsSymlinks) { File linkFile = new File(System.getProperty("root"), "src/main/org/apache/tools/ThisIsALink"); System.err.println("link exists pre-test? " + linkFile.exists()); - + try { // add conditions and more commands as soon as the need arises String[] command = new String[] { http://git-wip-us.apache.org/repos/asf/ant/blob/0ed7f4ab/src/tests/junit/org/apache/tools/ant/DispatchTaskTest.java ---------------------------------------------------------------------- diff --git a/src/tests/junit/org/apache/tools/ant/DispatchTaskTest.java b/src/tests/junit/org/apache/tools/ant/DispatchTaskTest.java index 604a0a2..c682093 100644 --- a/src/tests/junit/org/apache/tools/ant/DispatchTaskTest.java +++ b/src/tests/junit/org/apache/tools/ant/DispatchTaskTest.java @@ -26,8 +26,8 @@ import org.junit.Test; public class DispatchTaskTest { - @Rule - public BuildFileRule buildRule = new BuildFileRule(); + @Rule + public BuildFileRule buildRule = new BuildFileRule(); @Before public void setUp() { @@ -37,10 +37,10 @@ public class DispatchTaskTest { @Test public void testDisp() { try { - buildRule.executeTarget("disp"); - fail("BuildException should have been thrown"); + buildRule.executeTarget("disp"); + fail("BuildException should have been thrown"); } catch(BuildException ex) { - //FIXME the previous method used here ignored the build exception - what are we trying to test + //FIXME the previous method used here ignored the build exception - what are we trying to test } } } http://git-wip-us.apache.org/repos/asf/ant/blob/0ed7f4ab/src/tests/junit/org/apache/tools/ant/ExecutorTest.java ---------------------------------------------------------------------- diff --git a/src/tests/junit/org/apache/tools/ant/ExecutorTest.java b/src/tests/junit/org/apache/tools/ant/ExecutorTest.java index 6a37093..80ec96f 100644 --- a/src/tests/junit/org/apache/tools/ant/ExecutorTest.java +++ b/src/tests/junit/org/apache/tools/ant/ExecutorTest.java @@ -31,22 +31,22 @@ import org.junit.Test; * Executor tests */ public class ExecutorTest implements BuildListener { - - private static final String SINGLE_CHECK + + private static final String SINGLE_CHECK = "org.apache.tools.ant.helper.SingleCheckExecutor"; private static final String IGNORE_DEPS = "org.apache.tools.ant.helper.IgnoreDependenciesExecutor"; - + private static final Vector<String> TARGET_NAMES; static { TARGET_NAMES = new Vector<String>(); TARGET_NAMES.add("a"); TARGET_NAMES.add("b"); } - + @Rule public BuildFileRule buildRule = new BuildFileRule(); - + private int targetCount; /* BuildListener stuff */ @@ -168,4 +168,3 @@ public class ExecutorTest implements BuildListener { } } - http://git-wip-us.apache.org/repos/asf/ant/blob/0ed7f4ab/src/tests/junit/org/apache/tools/ant/ExtendedTaskdefTest.java ---------------------------------------------------------------------- diff --git a/src/tests/junit/org/apache/tools/ant/ExtendedTaskdefTest.java b/src/tests/junit/org/apache/tools/ant/ExtendedTaskdefTest.java index a141241..7c8ef75 100644 --- a/src/tests/junit/org/apache/tools/ant/ExtendedTaskdefTest.java +++ b/src/tests/junit/org/apache/tools/ant/ExtendedTaskdefTest.java @@ -32,10 +32,10 @@ import org.junit.Test; public class ExtendedTaskdefTest { - @Rule - public BuildFileRule buildRule = new BuildFileRule(); - - @Before + @Rule + public BuildFileRule buildRule = new BuildFileRule(); + + @Before public void setUp() { buildRule.configureProject("src/etc/testcases/core/extended-taskdef.xml"); } @@ -47,22 +47,22 @@ public class ExtendedTaskdefTest { @Test public void testRun() throws Exception { - try { - buildRule.executeTarget("testRun"); - fail("BuildException should have been thrown"); - } catch(BuildException ex) { - assertContains("exception thrown by the subclass", "executing the Foo task", ex.getMessage()); - } + try { + buildRule.executeTarget("testRun"); + fail("BuildException should have been thrown"); + } catch(BuildException ex) { + assertContains("exception thrown by the subclass", "executing the Foo task", ex.getMessage()); + } } @Test public void testRun2() throws Exception { - try { - buildRule.executeTarget("testRun2"); - fail("BuildException should have been thrown"); - } catch(BuildException ex) { - assertContains("exception thrown by the subclass", "executing the Foo task", ex.getMessage()); - } + try { + buildRule.executeTarget("testRun2"); + fail("BuildException should have been thrown"); + } catch(BuildException ex) { + assertContains("exception thrown by the subclass", "executing the Foo task", ex.getMessage()); + } } } http://git-wip-us.apache.org/repos/asf/ant/blob/0ed7f4ab/src/tests/junit/org/apache/tools/ant/IncludeTest.java ---------------------------------------------------------------------- diff --git a/src/tests/junit/org/apache/tools/ant/IncludeTest.java b/src/tests/junit/org/apache/tools/ant/IncludeTest.java index 54e61a4..80e53fe 100644 --- a/src/tests/junit/org/apache/tools/ant/IncludeTest.java +++ b/src/tests/junit/org/apache/tools/ant/IncludeTest.java @@ -31,9 +31,9 @@ import org.junit.Test; * */ public class IncludeTest { - - @Rule - public BuildFileRule buildRule = new BuildFileRule(); + + @Rule + public BuildFileRule buildRule = new BuildFileRule(); @Test public void test1() { http://git-wip-us.apache.org/repos/asf/ant/blob/0ed7f4ab/src/tests/junit/org/apache/tools/ant/LoaderRefTest.java ---------------------------------------------------------------------- diff --git a/src/tests/junit/org/apache/tools/ant/LoaderRefTest.java b/src/tests/junit/org/apache/tools/ant/LoaderRefTest.java index 2fb7439..668170b 100644 --- a/src/tests/junit/org/apache/tools/ant/LoaderRefTest.java +++ b/src/tests/junit/org/apache/tools/ant/LoaderRefTest.java @@ -29,10 +29,10 @@ import org.junit.Test; */ public class LoaderRefTest { - @Rule - public BuildFileRule buildRule = new BuildFileRule(); - - @Before + @Rule + public BuildFileRule buildRule = new BuildFileRule(); + + @Before public void setUp() { buildRule.configureProject("src/etc/testcases/core/loaderref/loaderref.xml"); buildRule.executeTarget("setUp"); @@ -40,13 +40,12 @@ public class LoaderRefTest { // override allowed on <available> @Test - public void testBadRef() { - try { - buildRule.executeTarget("testbadref"); - fail("BuildRule should have thrown an exception due to a bad classloader being specified"); - } catch (BuildException ex) { - assertContains("Should fail due to ref not being a class loader", "does not reference a class loader", ex.getMessage()); - } + public void testBadRef() { + try { + buildRule.executeTarget("testbadref"); + fail("BuildRule should have thrown an exception due to a bad classloader being specified"); + } catch (BuildException ex) { + assertContains("Should fail due to ref not being a class loader", "does not reference a class loader", ex.getMessage()); + } } } - http://git-wip-us.apache.org/repos/asf/ant/blob/0ed7f4ab/src/tests/junit/org/apache/tools/ant/filters/TokenFilterTest.java ---------------------------------------------------------------------- diff --git a/src/tests/junit/org/apache/tools/ant/filters/TokenFilterTest.java b/src/tests/junit/org/apache/tools/ant/filters/TokenFilterTest.java index f0db15a..daa7f2e 100644 --- a/src/tests/junit/org/apache/tools/ant/filters/TokenFilterTest.java +++ b/src/tests/junit/org/apache/tools/ant/filters/TokenFilterTest.java @@ -37,12 +37,12 @@ import org.junit.Test; /** */ public class TokenFilterTest { - - @Rule - public BuildFileRule buildRule = new BuildFileRule(); + + @Rule + public BuildFileRule buildRule = new BuildFileRule(); private static final FileUtils FILE_UTILS = FileUtils.getFileUtils(); - + @Before public void setUp() { buildRule.configureProject("src/etc/testcases/filters/tokenfilter.xml"); @@ -57,20 +57,20 @@ public class TokenFilterTest { @Test public void testTrimignore() throws IOException { - buildRule.executeTarget("trimignore"); - assertContains("Hello-World", buildRule.getLog()); + buildRule.executeTarget("trimignore"); + assertContains("Hello-World", buildRule.getLog()); } @Test public void testStringTokenizer() throws IOException { - buildRule.executeTarget("stringtokenizer"); + buildRule.executeTarget("stringtokenizer"); assertContains("#This#is#a#number#of#words#", buildRule.getLog()); } @Test public void testUnixLineOutput() throws IOException { - buildRule.executeTarget("unixlineoutput"); - assertContains("\nThis\nis\na\nnumber\nof\nwords\n", + buildRule.executeTarget("unixlineoutput"); + assertContains("\nThis\nis\na\nnumber\nof\nwords\n", getFileString(buildRule.getProject().getProperty("output") + "/unixlineoutput")); } @@ -84,7 +84,7 @@ public class TokenFilterTest { @Test public void testFileTokenizer() throws IOException { - buildRule.executeTarget("filetokenizer"); + buildRule.executeTarget("filetokenizer"); String contents = getFileString(buildRule.getProject().getProperty("output") + "/filetokenizer"); assertContains(" of words", contents); assertNotContains(" This is", contents); @@ -92,20 +92,20 @@ public class TokenFilterTest { @Test public void testReplaceString() throws IOException { - buildRule.executeTarget("replacestring"); - assertContains("this is the moon", + buildRule.executeTarget("replacestring"); + assertContains("this is the moon", getFileString(buildRule.getProject().getProperty("output") + "/replacestring")); } @Test public void testReplaceStrings() throws IOException { - buildRule.executeTarget("replacestrings"); - assertContains("bar bar bar", buildRule.getLog()); + buildRule.executeTarget("replacestrings"); + assertContains("bar bar bar", buildRule.getLog()); } @Test public void testContainsString() throws IOException { - buildRule.executeTarget("containsstring"); + buildRule.executeTarget("containsstring"); String contents = getFileString(buildRule.getProject().getProperty("output") + "/containsstring"); assertContains("this is a line contains foo", contents); assertNotContains("this line does not", contents); @@ -114,7 +114,7 @@ public class TokenFilterTest { @Test public void testReplaceRegex() throws IOException { - buildRule.executeTarget("hasregex"); + buildRule.executeTarget("hasregex"); Assume.assumeTrue("Regex not present", getFileString(buildRule.getProject().getProperty("output") + "/replaceregexp").contains("bye world")); @@ -130,7 +130,7 @@ public class TokenFilterTest { @Test public void testFilterReplaceRegex() throws IOException { - buildRule.executeTarget("hasregex"); + buildRule.executeTarget("hasregex"); Assume.assumeTrue("Regex not present", getFileString(buildRule.getProject().getProperty("output") + "/replaceregexp").contains("bye world")); @@ -142,7 +142,7 @@ public class TokenFilterTest { @Test public void testHandleDollerMatch() throws IOException { - buildRule.executeTarget("hasregex"); + buildRule.executeTarget("hasregex"); Assume.assumeTrue("Regex not present", getFileString(buildRule.getProject().getProperty("output") + "/replaceregexp").contains("bye world")); buildRule.executeTarget("dollermatch"); @@ -150,7 +150,7 @@ public class TokenFilterTest { @Test public void testTrimFile() throws IOException { - buildRule.executeTarget("trimfile"); + buildRule.executeTarget("trimfile"); String contents = getFileString(buildRule.getProject().getProperty("output") + "/trimfile"); assertTrue("no ws at start", contents.startsWith("This is th")); assertTrue("no ws at end", contents.endsWith("second line.")); @@ -159,7 +159,7 @@ public class TokenFilterTest { @Test public void testTrimFileByLine() throws IOException { - buildRule.executeTarget("trimfilebyline"); + buildRule.executeTarget("trimfilebyline"); String contents = getFileString(buildRule.getProject().getProperty("output") + "/trimfilebyline"); assertFalse("no ws at start", contents.startsWith("This is th")); assertFalse("no ws at end", contents.endsWith("second line.")); @@ -169,20 +169,20 @@ public class TokenFilterTest { @Test public void testFilterReplaceString() throws IOException { - buildRule.executeTarget("filterreplacestring"); + buildRule.executeTarget("filterreplacestring"); String contents = getFileString(buildRule.getProject().getProperty("output") + "/filterreplacestring"); assertContains("This is the moon", contents); } @Test public void testFilterReplaceStrings() throws IOException { - buildRule.executeTarget("filterreplacestrings"); - assertContains("bar bar bar", buildRule.getLog()); + buildRule.executeTarget("filterreplacestrings"); + assertContains("bar bar bar", buildRule.getLog()); } @Test public void testContainsRegex() throws IOException { - buildRule.executeTarget("hasregex"); + buildRule.executeTarget("hasregex"); Assume.assumeTrue("Regex not present", getFileString(buildRule.getProject().getProperty("output") + "/replaceregexp").contains("bye world")); //expectFileContains(buildRule.getProject().getProperty("output") + "/replaceregexp", "bye world"); @@ -196,7 +196,7 @@ public class TokenFilterTest { @Test public void testFilterContainsRegex() throws IOException { - buildRule.executeTarget("hasregex"); + buildRule.executeTarget("hasregex"); Assume.assumeTrue("Regex not present", getFileString(buildRule.getProject().getProperty("output") + "/replaceregexp").contains("bye world")); buildRule.executeTarget("filtercontainsregex"); @@ -208,9 +208,9 @@ public class TokenFilterTest { @Test public void testContainsRegex2() throws IOException { - buildRule.executeTarget("hasregex"); + buildRule.executeTarget("hasregex"); Assume.assumeTrue("Regex not present", getFileString(buildRule.getProject().getProperty("output") + "/replaceregexp").contains("bye world")); - + buildRule.executeTarget("containsregex2"); String contents = getFileString(buildRule.getProject().getProperty("output") + "/containsregex2"); assertContains("void register_bits();", contents); @@ -218,7 +218,7 @@ public class TokenFilterTest { @Test public void testDeleteCharacters() throws IOException { - buildRule.executeTarget("deletecharacters"); + buildRule.executeTarget("deletecharacters"); String contents = getFileString(buildRule.getProject().getProperty("output") + "/deletechars"); assertNotContains("#", contents); assertNotContains("*", contents); @@ -227,24 +227,24 @@ public class TokenFilterTest { @Test public void testScriptFilter() throws IOException { - Assume.assumeTrue("Project does not have 'testScriptFilter' target", + Assume.assumeTrue("Project does not have 'testScriptFilter' target", buildRule.getProject().getTargets().contains("testScriptFilter")); - buildRule.executeTarget("scriptfilter"); - assertContains("HELLO WORLD", getFileString(buildRule.getProject().getProperty("output") + "/scriptfilter")); + buildRule.executeTarget("scriptfilter"); + assertContains("HELLO WORLD", getFileString(buildRule.getProject().getProperty("output") + "/scriptfilter")); } @Test public void testScriptFilter2() throws IOException { - Assume.assumeTrue("Project does not have 'testScriptFilter' target", buildRule.getProject().getTargets().contains("testScriptFilter")); + Assume.assumeTrue("Project does not have 'testScriptFilter' target", buildRule.getProject().getTargets().contains("testScriptFilter")); buildRule.executeTarget("scriptfilter2"); - assertContains("HELLO MOON", getFileString(buildRule.getProject().getProperty("output") + "/scriptfilter2")); + assertContains("HELLO MOON", getFileString(buildRule.getProject().getProperty("output") + "/scriptfilter2")); } @Test public void testCustomTokenFilter() throws IOException { buildRule.executeTarget("customtokenfilter"); - assertContains("Hello World", getFileString(buildRule.getProject().getProperty("output") + "/custom")); + assertContains("Hello World", getFileString(buildRule.getProject().getProperty("output") + "/custom")); } // ------------------------------------------------------ http://git-wip-us.apache.org/repos/asf/ant/blob/0ed7f4ab/src/tests/junit/org/apache/tools/ant/taskdefs/DirnameTest.java ---------------------------------------------------------------------- diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/DirnameTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/DirnameTest.java index 96c6c4a..8db1c5f 100644 --- a/src/tests/junit/org/apache/tools/ant/taskdefs/DirnameTest.java +++ b/src/tests/junit/org/apache/tools/ant/taskdefs/DirnameTest.java @@ -32,9 +32,9 @@ import org.junit.Test; /** */ public class DirnameTest { - - @Rule - public BuildFileRule buildRule = new BuildFileRule(); + + @Rule + public BuildFileRule buildRule = new BuildFileRule(); @Before public void setUp() { @@ -43,32 +43,32 @@ public class DirnameTest { @Test public void test1() { - try { - buildRule.executeTarget("test1"); - fail("Build exception should have been thrown as property attribute is required"); - } catch(BuildException ex) { - assertEquals("property attribute required", ex.getMessage()); - } + try { + buildRule.executeTarget("test1"); + fail("Build exception should have been thrown as property attribute is required"); + } catch(BuildException ex) { + assertEquals("property attribute required", ex.getMessage()); + } } @Test public void test2() { - try { - buildRule.executeTarget("test2"); - fail("Build exception should have been thrown as file attribute is required"); - } catch(BuildException ex) { - assertEquals("file attribute required", ex.getMessage()); - } + try { + buildRule.executeTarget("test2"); + fail("Build exception should have been thrown as file attribute is required"); + } catch(BuildException ex) { + assertEquals("file attribute required", ex.getMessage()); + } } @Test public void test3() { - try { - buildRule.executeTarget("test3"); - fail("Build exception should have been thrown as property attribute is required"); - } catch(BuildException ex) { - assertEquals("property attribute required", ex.getMessage()); - } + try { + buildRule.executeTarget("test3"); + fail("Build exception should have been thrown as property attribute is required"); + } catch(BuildException ex) { + assertEquals("property attribute required", ex.getMessage()); + } } @Test http://git-wip-us.apache.org/repos/asf/ant/blob/0ed7f4ab/src/tests/junit/org/apache/tools/ant/taskdefs/ExecTaskTest.java ---------------------------------------------------------------------- diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/ExecTaskTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/ExecTaskTest.java index b742760..faa830f 100644 --- a/src/tests/junit/org/apache/tools/ant/taskdefs/ExecTaskTest.java +++ b/src/tests/junit/org/apache/tools/ant/taskdefs/ExecTaskTest.java @@ -39,10 +39,10 @@ import org.junit.Test; * Unit test for the <exec> task. */ public class ExecTaskTest { - - @Rule - public BuildFileRule buildRule = new BuildFileRule(); - + + @Rule + public BuildFileRule buildRule = new BuildFileRule(); + private static final String BUILD_PATH = "src/etc/testcases/taskdefs/exec/"; private static final String BUILD_FILE = BUILD_PATH + "exec.xml"; private static final int TIME_TO_WAIT = 1; http://git-wip-us.apache.org/repos/asf/ant/blob/0ed7f4ab/src/tests/junit/org/apache/tools/ant/taskdefs/GzipTest.java ---------------------------------------------------------------------- diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/GzipTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/GzipTest.java index 00ea063..6319317 100644 --- a/src/tests/junit/org/apache/tools/ant/taskdefs/GzipTest.java +++ b/src/tests/junit/org/apache/tools/ant/taskdefs/GzipTest.java @@ -31,7 +31,7 @@ import static org.junit.Assert.fail; /** */ public class GzipTest { - + @Rule public final BuildFileRule buildRule = new BuildFileRule(); @@ -44,41 +44,41 @@ public class GzipTest { @Test public void test1() { try { - buildRule.executeTarget("test1"); - fail("BuildException expected: required argument missing"); - } catch (BuildException ex) { - //TODO assert value - } + buildRule.executeTarget("test1"); + fail("BuildException expected: required argument missing"); + } catch (BuildException ex) { + //TODO assert value + } } @Test public void test2() { try { - buildRule.executeTarget("test2"); - fail("BuildException expected: required argument missing"); - } catch (BuildException ex) { - //TODO assert value - } + buildRule.executeTarget("test2"); + fail("BuildException expected: required argument missing"); + } catch (BuildException ex) { + //TODO assert value + } } @Test public void test3() { try { - buildRule.executeTarget("test3"); - fail("BuildException expected: required argument missing"); - } catch (BuildException ex) { - //TODO assert value - } + buildRule.executeTarget("test3"); + fail("BuildException expected: required argument missing"); + } catch (BuildException ex) { + //TODO assert value + } } @Test public void test4() { try { - buildRule.executeTarget("test4"); - fail("BuildException expected: zipfile must not point to a directory"); - } catch (BuildException ex) { - //TODO assert value - } + buildRule.executeTarget("test4"); + fail("BuildException expected: zipfile must not point to a directory"); + } catch (BuildException ex) { + //TODO assert value + } } @Test http://git-wip-us.apache.org/repos/asf/ant/blob/0ed7f4ab/src/tests/junit/org/apache/tools/ant/taskdefs/ImportTest.java ---------------------------------------------------------------------- diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/ImportTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/ImportTest.java index e64d6f8..5fdf8a4 100644 --- a/src/tests/junit/org/apache/tools/ant/taskdefs/ImportTest.java +++ b/src/tests/junit/org/apache/tools/ant/taskdefs/ImportTest.java @@ -39,16 +39,16 @@ import org.junit.Test; public class ImportTest { - @Rule - public BuildFileRule buildRule = new BuildFileRule(); - - @Test + @Rule + public BuildFileRule buildRule = new BuildFileRule(); + + @Test public void testSimpleImport() { buildRule.configureProject("src/etc/testcases/taskdefs/import/import.xml"); assertContains("Before importIn imported topAfter import", buildRule.getLog()); } - @Test + @Test public void testUnnamedNesting() { buildRule.configureProject("src/etc/testcases/taskdefs/import/unnamedImport.xml", Project.MSG_WARN); @@ -57,17 +57,17 @@ public class ImportTest { log.length() == 0); } - @Test + @Test public void testSerial() { buildRule.configureProject("src/etc/testcases/taskdefs/import/subdir/serial.xml"); assertContains("Unnamed2.xmlUnnamed1.xml", buildRule.getLog()); assertContains("Expected string was not found in log", - "Skipped already imported file", buildRule.getFullLog()); + "Skipped already imported file", buildRule.getFullLog()); } // allow this as imported in targets are only tested when a target is run @Test - public void testImportInTargetNoEffect() { + public void testImportInTargetNoEffect() { buildRule.configureProject("src/etc/testcases/taskdefs/import/subdir/importintarget.xml"); buildRule.executeTarget("no-import"); assertNull(buildRule.getProject().getProperty("foo")); @@ -88,10 +88,10 @@ public class ImportTest { buildRule.configureProject( "src/etc/testcases/taskdefs/import/subdir/importintarget.xml"); try { - buildRule.executeTarget("do-import"); - fail("Build exception should have been thrown as import only allowed in top level task"); + buildRule.executeTarget("do-import"); + fail("Build exception should have been thrown as import only allowed in top level task"); } catch(BuildException ex) { - assertContains( "not a top level task", "import only allowed as a top-level task", ex.getMessage()); + assertContains( "not a top level task", "import only allowed as a top-level task", ex.getMessage()); } } @@ -111,7 +111,7 @@ public class ImportTest { "src/etc/testcases/taskdefs/import/same_target.xml"); fail("Expected build exception"); } catch (BuildException ex) { - assertContains("Message did not contain expected contents", "Duplicate target", ex.getMessage()); + assertContains("Message did not contain expected contents", "Duplicate target", ex.getMessage()); } } http://git-wip-us.apache.org/repos/asf/ant/blob/0ed7f4ab/src/tests/junit/org/apache/tools/ant/taskdefs/JarTest.java ---------------------------------------------------------------------- diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/JarTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/JarTest.java index 9b8ff15..1c6fa94 100644 --- a/src/tests/junit/org/apache/tools/ant/taskdefs/JarTest.java +++ b/src/tests/junit/org/apache/tools/ant/taskdefs/JarTest.java @@ -48,7 +48,7 @@ import static org.junit.Assert.fail; /** */ public class JarTest { - + @Rule public final BuildFileRule buildRule = new BuildFileRule(); @@ -56,7 +56,7 @@ public class JarTest { private static String tempDir = "jartmp/"; private Reader r1, r2; - + @Before public void setUp() { buildRule.configureProject("src/etc/testcases/taskdefs/jar.xml"); @@ -82,31 +82,31 @@ public class JarTest { @Test public void test1() { try { - buildRule.executeTarget("test1"); - fail("BuildException expected: required argument not specified"); - } catch (BuildException ex) { - //TODO assert value - } + buildRule.executeTarget("test1"); + fail("BuildException expected: required argument not specified"); + } catch (BuildException ex) { + //TODO assert value + } } @Test public void test2() { try { - buildRule.executeTarget("test2"); - fail("BuildException expected: manifest file does not exist"); - } catch (BuildException ex) { - //TODO assert value - } + buildRule.executeTarget("test2"); + fail("BuildException expected: manifest file does not exist"); + } catch (BuildException ex) { + //TODO assert value + } } @Test public void test3() { try { - buildRule.executeTarget("test3"); - fail("BuildException expected: Unrecognized whenempty attribute: format C: /y"); - } catch (BuildException ex) { - //TODO assert value - } + buildRule.executeTarget("test3"); + fail("BuildException expected: Unrecognized whenempty attribute: format C: /y"); + } catch (BuildException ex) { + //TODO assert value + } } private File getOutputDir() { @@ -329,17 +329,17 @@ public class JarTest { public void testIndexJarsPlusJarMarker() { buildRule.executeTarget("testIndexJarsPlusJarMarker"); } - + @Test public void testNoVersionInfoFail() { try { - buildRule.executeTarget("testNoVersionInfoFail"); - fail("BuildException expected: Manifest Implemention information missing."); - } catch (BuildException ex) { - assertContains("No Implementation-Title set.", ex.getMessage()); - } + buildRule.executeTarget("testNoVersionInfoFail"); + fail("BuildException expected: Manifest Implemention information missing."); + } catch (BuildException ex) { + assertContains("No Implementation-Title set.", ex.getMessage()); + } } - + @Test public void testNoVersionInfoIgnore() { buildRule.executeTarget("testNoVersionInfoIgnore"); @@ -363,7 +363,7 @@ public class JarTest { assertFalse(buildRule.getLog().indexOf("No Implementation-Version set.") > -1 ); assertFalse(buildRule.getLog().indexOf("No Implementation-Vendor set.") > -1 ); } - + @Test public void testHasVersionInfo() { buildRule.executeTarget("testHasVersionInfo"); @@ -371,5 +371,5 @@ public class JarTest { assertFalse(buildRule.getLog().indexOf("No Implementation-Version set.") > -1 ); assertFalse(buildRule.getLog().indexOf("No Implementation-Vendor set.") > -1 ); } - + } http://git-wip-us.apache.org/repos/asf/ant/blob/0ed7f4ab/src/tests/junit/org/apache/tools/ant/taskdefs/LoadFileTest.java ---------------------------------------------------------------------- diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/LoadFileTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/LoadFileTest.java index fd8c328..ce166d9 100644 --- a/src/tests/junit/org/apache/tools/ant/taskdefs/LoadFileTest.java +++ b/src/tests/junit/org/apache/tools/ant/taskdefs/LoadFileTest.java @@ -37,7 +37,7 @@ public class LoadFileTest { @Rule public final BuildFileRule buildRule = new BuildFileRule(); - + @Before public void setUp() { @@ -57,11 +57,11 @@ public class LoadFileTest { @Test public void testNoSourcefileDefined() { try { - buildRule.executeTarget("testNoSourcefileDefined"); - fail("BuildException expected: source file not defined"); - } catch (BuildException ex) { - //TODO assert value - } + buildRule.executeTarget("testNoSourcefileDefined"); + fail("BuildException expected: source file not defined"); + } catch (BuildException ex) { + //TODO assert value + } } @@ -71,11 +71,11 @@ public class LoadFileTest { @Test public void testNoPropertyDefined() { try { - buildRule.executeTarget("testNoPropertyDefined"); - fail("BuildException expected: output property not defined"); - } catch (BuildException ex) { - //TODO assert value - } + buildRule.executeTarget("testNoPropertyDefined"); + fail("BuildException expected: output property not defined"); + } catch (BuildException ex) { + //TODO assert value + } } @@ -85,11 +85,11 @@ public class LoadFileTest { @Test public void testNoSourcefilefound() { try { - buildRule.executeTarget("testNoSourcefilefound"); - fail("BuildException expected: File not found"); - } catch (BuildException ex) { - assertContains(" doesn't exist", ex.getMessage()); - } + buildRule.executeTarget("testNoSourcefilefound"); + fail("BuildException expected: File not found"); + } catch (BuildException ex) { + assertContains(" doesn't exist", ex.getMessage()); + } } /** @@ -99,7 +99,7 @@ public class LoadFileTest { public void testFailOnError() throws BuildException { buildRule.executeTarget("testFailOnError"); - assertNull(buildRule.getProject().getProperty("testFailOnError")); + assertNull(buildRule.getProject().getProperty("testFailOnError")); } http://git-wip-us.apache.org/repos/asf/ant/blob/0ed7f4ab/src/tests/junit/org/apache/tools/ant/taskdefs/MacroDefTest.java ---------------------------------------------------------------------- diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/MacroDefTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/MacroDefTest.java index 18b9786..ebcd015 100644 --- a/src/tests/junit/org/apache/tools/ant/taskdefs/MacroDefTest.java +++ b/src/tests/junit/org/apache/tools/ant/taskdefs/MacroDefTest.java @@ -43,114 +43,114 @@ public class MacroDefTest { @Test public void testSimple() { buildRule.executeTarget("simple"); - assertEquals("Hello World", buildRule.getLog()); + assertEquals("Hello World", buildRule.getLog()); } @Test public void testText() { buildRule.executeTarget("text"); - assertEquals("Inner Text", buildRule.getLog()); + assertEquals("Inner Text", buildRule.getLog()); } @Test public void testDuplicateAttribute() { try { - buildRule.executeTarget("duplicate.attribute"); - fail("BuildException expected: the attribute text has already been specified"); - } catch (BuildException ex) { - //TODO assert value - } + buildRule.executeTarget("duplicate.attribute"); + fail("BuildException expected: the attribute text has already been specified"); + } catch (BuildException ex) { + //TODO assert value + } } @Test public void testDuplicateElement() { try { - buildRule.executeTarget("duplicate.element"); - fail("BuildException expected: the element text has already been specified"); - } catch (BuildException ex) { - //TODO assert value - } + buildRule.executeTarget("duplicate.element"); + fail("BuildException expected: the element text has already been specified"); + } catch (BuildException ex) { + //TODO assert value + } } @Test public void testUri() { buildRule.executeTarget("uri"); - assertEquals("Hello World", buildRule.getLog()); + assertEquals("Hello World", buildRule.getLog()); } @Test public void testNested() { buildRule.executeTarget("nested"); - assertEquals("A nested element", buildRule.getLog()); + assertEquals("A nested element", buildRule.getLog()); } @Test public void testDouble() { buildRule.executeTarget("double"); - assertEquals("@{prop} is 'property', value of ${property} is 'A property value'", buildRule.getLog()); + assertEquals("@{prop} is 'property', value of ${property} is 'A property value'", buildRule.getLog()); } @Test public void testIgnoreCase() { buildRule.executeTarget("ignorecase"); - assertEquals("a is ab is b", buildRule.getLog()); + assertEquals("a is ab is b", buildRule.getLog()); } @Test public void testIgnoreElementCase() { buildRule.executeTarget("ignore-element-case"); - assertEquals("nested elementnested element", buildRule.getLog()); + assertEquals("nested elementnested element", buildRule.getLog()); } @Test public void testTextElement() { buildRule.executeTarget("textelement"); - assertContains("Hello world", buildRule.getLog()); + assertContains("Hello world", buildRule.getLog()); } @Test public void testTextTrim() { buildRule.executeTarget("text.trim"); - assertContains("[Hello world]", buildRule.getLog()); + assertContains("[Hello world]", buildRule.getLog()); } @Test public void testDuplicateTextName() { try { - buildRule.executeTarget("duplicatetextname"); - fail("BuildException expected: the name \"text\" is already used as an attribute"); - } catch (BuildException ex) { - //TODO assert value - } + buildRule.executeTarget("duplicatetextname"); + fail("BuildException expected: the name \"text\" is already used as an attribute"); + } catch (BuildException ex) { + //TODO assert value + } } @Test public void testDuplicateTextName2() { try { - buildRule.executeTarget("duplicatetextname2"); - fail("BuildException expected: the attribute name \"text\" has already been used by the text element"); - } catch (BuildException ex) { - //TODO assert value - } + buildRule.executeTarget("duplicatetextname2"); + fail("BuildException expected: the attribute name \"text\" has already been used by the text element"); + } catch (BuildException ex) { + //TODO assert value + } } @Test public void testEscape() { buildRule.executeTarget("escape"); - assertEquals("a@b or a@b is avalue@bvalue", buildRule.getLog()); + assertEquals("a@b or a@b is avalue@bvalue", buildRule.getLog()); } @Test public void testAttributeDescription() { buildRule.executeTarget("attribute.description"); - assertEquals("description is hello world", buildRule.getLog()); + assertEquals("description is hello world", buildRule.getLog()); } @Test public void testOverrideDefault() { buildRule.executeTarget("override.default"); - assertEquals("value is new", buildRule.getLog()); + assertEquals("value is new", buildRule.getLog()); } @Test public void testImplicit() { buildRule.executeTarget("implicit"); - assertEquals("Before implicitIn implicitAfter implicit", buildRule.getLog()); + assertEquals("Before implicitIn implicitAfter implicit", buildRule.getLog()); } @Test public void testImplicitNotOptional() { @@ -164,7 +164,7 @@ public class MacroDefTest { @Test public void testImplicitOptional() { buildRule.executeTarget("implicit.optional"); - assertEquals("Before implicitAfter implicit", buildRule.getLog()); + assertEquals("Before implicitAfter implicit", buildRule.getLog()); } @Test public void testImplicitExplicit() { @@ -200,7 +200,6 @@ public class MacroDefTest { @Test public void testTopLevelText() { buildRule.executeTarget("top-level-text"); - assertContains("Hello World", buildRule.getLog()); + assertContains("Hello World", buildRule.getLog()); } } - http://git-wip-us.apache.org/repos/asf/ant/blob/0ed7f4ab/src/tests/junit/org/apache/tools/ant/taskdefs/MakeUrlTest.java ---------------------------------------------------------------------- diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/MakeUrlTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/MakeUrlTest.java index 8c2762a..07e53fd 100644 --- a/src/tests/junit/org/apache/tools/ant/taskdefs/MakeUrlTest.java +++ b/src/tests/junit/org/apache/tools/ant/taskdefs/MakeUrlTest.java @@ -46,41 +46,41 @@ public class MakeUrlTest { @Test public void testEmpty() { try { - buildRule.executeTarget("testEmpty"); - fail("BuildException expected: missing property"); - } catch (BuildException ex) { - assertContains("property", ex.getMessage()); - } + buildRule.executeTarget("testEmpty"); + fail("BuildException expected: missing property"); + } catch (BuildException ex) { + assertContains("property", ex.getMessage()); + } } @Test public void testNoProperty() { try { - buildRule.executeTarget("testNoProperty"); - fail("BuildException expected: missing property"); - } catch (BuildException ex) { - assertContains("property", ex.getMessage()); - } + buildRule.executeTarget("testNoProperty"); + fail("BuildException expected: missing property"); + } catch (BuildException ex) { + assertContains("property", ex.getMessage()); + } } @Test public void testNoFile() { try { - buildRule.executeTarget("testNoFile"); - fail("BuildException expected: missing file"); - } catch (BuildException ex) { - assertContains("file", ex.getMessage()); - } + buildRule.executeTarget("testNoFile"); + fail("BuildException expected: missing file"); + } catch (BuildException ex) { + assertContains("file", ex.getMessage()); + } } @Test public void testValidation() { try { - buildRule.executeTarget("testValidation"); - fail("BuildException expected: " + MakeUrl.ERROR_MISSING_FILE); - } catch (BuildException ex) { - assertContains("file", ex.getMessage()); - } + buildRule.executeTarget("testValidation"); + fail("BuildException expected: " + MakeUrl.ERROR_MISSING_FILE); + } catch (BuildException ex) { + assertContains("file", ex.getMessage()); + } } @Test
