Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Issue #426 Applied new coding style

Applied the new coding style to the code base for issue #426.
  • Loading branch information...
commit 30f2b16525dabb477373be9ed3e76bb98b200806 1 parent 68cc61e
authored October 04, 2012

Showing 228 changed files with 15,515 additions and 14,870 deletions. Show diff stats Hide diff stats

  1. 108  src/main/java/junit/extensions/ActiveTestSuite.java
  2. 49  src/main/java/junit/extensions/RepeatedTest.java
  3. 59  src/main/java/junit/extensions/TestDecorator.java
  4. 50  src/main/java/junit/extensions/TestSetup.java
  5. 613  src/main/java/junit/framework/Assert.java
  6. 18  src/main/java/junit/framework/AssertionFailedError.java
  7. 121  src/main/java/junit/framework/ComparisonCompactor.java
  8. 90  src/main/java/junit/framework/ComparisonFailure.java
  9. 137  src/main/java/junit/framework/JUnit4TestAdapter.java
  10. 116  src/main/java/junit/framework/JUnit4TestAdapterCache.java
  11. 39  src/main/java/junit/framework/JUnit4TestCaseFacade.java
  12. 8  src/main/java/junit/framework/Protectable.java
  13. 17  src/main/java/junit/framework/Test.java
  14. 938  src/main/java/junit/framework/TestCase.java
  15. 97  src/main/java/junit/framework/TestFailure.java
  16. 35  src/main/java/junit/framework/TestListener.java
  17. 318  src/main/java/junit/framework/TestResult.java
  18. 536  src/main/java/junit/framework/TestSuite.java
  19. 577  src/main/java/junit/runner/BaseTestRunner.java
  20. 26  src/main/java/junit/runner/TestRunListener.java
  21. 20  src/main/java/junit/runner/Version.java
  22. 244  src/main/java/junit/textui/ResultPrinter.java
  23. 357  src/main/java/junit/textui/TestRunner.java
  24. 6  src/main/java/org/junit/After.java
  25. 6  src/main/java/org/junit/AfterClass.java
  26. 1,765  src/main/java/org/junit/Assert.java
  27. 231  src/main/java/org/junit/Assume.java
  28. 6  src/main/java/org/junit/Before.java
  29. 5  src/main/java/org/junit/BeforeClass.java
  30. 71  src/main/java/org/junit/ClassRule.java
  31. 271  src/main/java/org/junit/ComparisonFailure.java
  32. 12  src/main/java/org/junit/FixMethodOrder.java
  33. 24  src/main/java/org/junit/Ignore.java
  34. 41  src/main/java/org/junit/Rule.java
  35. 53  src/main/java/org/junit/Test.java
  36. 86  src/main/java/org/junit/experimental/ParallelComputer.java
  37. 313  src/main/java/org/junit/experimental/categories/Categories.java
  38. 56  src/main/java/org/junit/experimental/categories/Category.java
  39. 14  src/main/java/org/junit/experimental/max/CouldNotReadCoreException.java
  40. 289  src/main/java/org/junit/experimental/max/MaxCore.java
  41. 282  src/main/java/org/junit/experimental/max/MaxHistory.java
  42. 35  src/main/java/org/junit/experimental/results/FailureList.java
  43. 82  src/main/java/org/junit/experimental/results/PrintableResult.java
  44. 100  src/main/java/org/junit/experimental/results/ResultMatchers.java
  45. 28  src/main/java/org/junit/experimental/runners/Enclosed.java
  46. 160  src/main/java/org/junit/experimental/theories/ParameterSignature.java
  47. 3  src/main/java/org/junit/experimental/theories/ParameterSupplier.java
  48. 2  src/main/java/org/junit/experimental/theories/ParametersSuppliedBy.java
  49. 52  src/main/java/org/junit/experimental/theories/PotentialAssignment.java
  50. 355  src/main/java/org/junit/experimental/theories/Theories.java
  51. 5  src/main/java/org/junit/experimental/theories/Theory.java
  52. 243  src/main/java/org/junit/experimental/theories/internal/AllMembersSupplier.java
  53. 228  src/main/java/org/junit/experimental/theories/internal/Assignments.java
  54. 79  src/main/java/org/junit/experimental/theories/internal/ParameterizedAssertionError.java
  55. 3  src/main/java/org/junit/experimental/theories/suppliers/TestedOn.java
  56. 19  src/main/java/org/junit/experimental/theories/suppliers/TestedOnSupplier.java
  57. 94  src/main/java/org/junit/internal/ArrayComparisonFailure.java
  58. 130  src/main/java/org/junit/internal/AssumptionViolatedException.java
  59. 118  src/main/java/org/junit/internal/ComparisonCriteria.java
  60. 8  src/main/java/org/junit/internal/ExactComparisonCriteria.java
  61. 31  src/main/java/org/junit/internal/InexactComparisonCriteria.java
  62. 2  src/main/java/org/junit/internal/JUnitSystem.java
  63. 25  src/main/java/org/junit/internal/MethodSorter.java
  64. 6  src/main/java/org/junit/internal/RealSystem.java
  65. 171  src/main/java/org/junit/internal/TextListener.java
  66. 93  src/main/java/org/junit/internal/builders/AllDefaultPossibilitiesBuilder.java
  67. 62  src/main/java/org/junit/internal/builders/AnnotatedBuilder.java
  68. 16  src/main/java/org/junit/internal/builders/IgnoredBuilder.java
  69. 27  src/main/java/org/junit/internal/builders/IgnoredClassRunner.java
  70. 22  src/main/java/org/junit/internal/builders/JUnit3Builder.java
  71. 11  src/main/java/org/junit/internal/builders/JUnit4Builder.java
  72. 11  src/main/java/org/junit/internal/builders/NullBuilder.java
  73. 32  src/main/java/org/junit/internal/builders/SuiteMethodBuilder.java
  74. 82  src/main/java/org/junit/internal/matchers/StacktracePrintingMatcher.java
  75. 56  src/main/java/org/junit/internal/matchers/ThrowableCauseMatcher.java
  76. 56  src/main/java/org/junit/internal/matchers/ThrowableMessageMatcher.java
  77. 17  src/main/java/org/junit/internal/matchers/TypeSafeMatcher.java
  78. 41  src/main/java/org/junit/internal/requests/ClassRequest.java
  79. 52  src/main/java/org/junit/internal/requests/FilterRequest.java
  80. 24  src/main/java/org/junit/internal/requests/SortingRequest.java
  81. 115  src/main/java/org/junit/internal/runners/ClassRoadie.java
  82. 97  src/main/java/org/junit/internal/runners/ErrorReportingRunner.java
  83. 3  src/main/java/org/junit/internal/runners/FailedBefore.java
  84. 32  src/main/java/org/junit/internal/runners/InitializationError.java
  85. 274  src/main/java/org/junit/internal/runners/JUnit38ClassRunner.java
  86. 234  src/main/java/org/junit/internal/runners/JUnit4ClassRunner.java
  87. 253  src/main/java/org/junit/internal/runners/MethodRoadie.java
  88. 128  src/main/java/org/junit/internal/runners/MethodValidator.java
  89. 37  src/main/java/org/junit/internal/runners/SuiteMethod.java
  90. 162  src/main/java/org/junit/internal/runners/TestClass.java
  91. 78  src/main/java/org/junit/internal/runners/TestMethod.java
  92. 80  src/main/java/org/junit/internal/runners/model/EachTestNotifier.java
  93. 8  src/main/java/org/junit/internal/runners/model/MultipleFailureException.java
  94. 19  src/main/java/org/junit/internal/runners/model/ReflectiveCallable.java
  95. 158  src/main/java/org/junit/internal/runners/rules/RuleFieldValidator.java
  96. 60  src/main/java/org/junit/internal/runners/statements/ExpectException.java
  97. 17  src/main/java/org/junit/internal/runners/statements/Fail.java
  98. 155  src/main/java/org/junit/internal/runners/statements/FailOnTimeout.java
  99. 27  src/main/java/org/junit/internal/runners/statements/InvokeMethod.java
  100. 56  src/main/java/org/junit/internal/runners/statements/RunAfters.java
  101. 32  src/main/java/org/junit/internal/runners/statements/RunBefores.java
  102. 195  src/main/java/org/junit/matchers/JUnitMatchers.java
  103. 2  src/main/java/org/junit/package-info.java
  104. 107  src/main/java/org/junit/rules/ErrorCollector.java
  105. 271  src/main/java/org/junit/rules/ExpectedException.java
  106. 60  src/main/java/org/junit/rules/ExpectedExceptionMatcherBuilder.java
  107. 100  src/main/java/org/junit/rules/ExternalResource.java
  108. 27  src/main/java/org/junit/rules/MethodRule.java
  109. 106  src/main/java/org/junit/rules/RuleChain.java
  110. 32  src/main/java/org/junit/rules/RunRules.java
  111. 259  src/main/java/org/junit/rules/TemporaryFolder.java
  112. 49  src/main/java/org/junit/rules/TestName.java
  113. 35  src/main/java/org/junit/rules/TestRule.java
  114. 227  src/main/java/org/junit/rules/TestWatcher.java
  115. 145  src/main/java/org/junit/rules/TestWatchman.java
  116. 59  src/main/java/org/junit/rules/Timeout.java
  117. 37  src/main/java/org/junit/rules/Verifier.java
  118. 51  src/main/java/org/junit/runner/Computer.java
  119. 9  src/main/java/org/junit/runner/Describable.java
  120. 554  src/main/java/org/junit/runner/Description.java
  121. 320  src/main/java/org/junit/runner/JUnitCore.java
  122. 267  src/main/java/org/junit/runner/Request.java
  123. 179  src/main/java/org/junit/runner/Result.java
  124. 23  src/main/java/org/junit/runner/RunWith.java
  125. 40  src/main/java/org/junit/runner/Runner.java
  126. 191  src/main/java/org/junit/runner/manipulation/Filter.java
  127. 14  src/main/java/org/junit/runner/manipulation/Filterable.java
  128. 3  src/main/java/org/junit/runner/manipulation/NoTestsRemainException.java
  129. 12  src/main/java/org/junit/runner/manipulation/Sortable.java
  130. 61  src/main/java/org/junit/runner/manipulation/Sorter.java
  131. 112  src/main/java/org/junit/runner/notification/Failure.java
  132. 113  src/main/java/org/junit/runner/notification/RunListener.java
  133. 358  src/main/java/org/junit/runner/notification/RunNotifier.java
  134. 6  src/main/java/org/junit/runner/notification/StoppedByUserException.java
  135. 16  src/main/java/org/junit/runners/AllTests.java
  136. 750  src/main/java/org/junit/runners/BlockJUnit4ClassRunner.java
  137. 13  src/main/java/org/junit/runners/JUnit4.java
  138. 15  src/main/java/org/junit/runners/MethodSorters.java
  139. 489  src/main/java/org/junit/runners/Parameterized.java
  140. 674  src/main/java/org/junit/runners/ParentRunner.java
  141. 200  src/main/java/org/junit/runners/Suite.java
  142. 93  src/main/java/org/junit/runners/model/FrameworkField.java
  143. 43  src/main/java/org/junit/runners/model/FrameworkMember.java
  144. 352  src/main/java/org/junit/runners/model/FrameworkMethod.java
  145. 55  src/main/java/org/junit/runners/model/InitializationError.java
  146. 97  src/main/java/org/junit/runners/model/MultipleFailureException.java
  147. 87  src/main/java/org/junit/runners/model/NoGenericTypeParametersValidator.java
  148. 135  src/main/java/org/junit/runners/model/RunnerBuilder.java
  149. 25  src/main/java/org/junit/runners/model/RunnerScheduler.java
  150. 9  src/main/java/org/junit/runners/model/Statement.java
  151. 317  src/main/java/org/junit/runners/model/TestClass.java
  152. 22  src/test/java/junit/samples/AllTests.java
  153. 105  src/test/java/junit/samples/ListTest.java
  154. 106  src/test/java/junit/samples/SimpleTest.java
  155. 82  src/test/java/junit/samples/money/IMoney.java
  156. 156  src/test/java/junit/samples/money/Money.java
  157. 257  src/test/java/junit/samples/money/MoneyBag.java
  158. 297  src/test/java/junit/samples/money/MoneyTest.java
  159. 23  src/test/java/junit/tests/AllTests.java
  160. 11  src/test/java/junit/tests/WasRun.java
  161. 98  src/test/java/junit/tests/extensions/ActiveTestTest.java
  162. 23  src/test/java/junit/tests/extensions/AllTests.java
  163. 172  src/test/java/junit/tests/extensions/ExtensionTest.java
  164. 99  src/test/java/junit/tests/extensions/RepeatedTestTest.java
  165. 41  src/test/java/junit/tests/framework/AllTests.java
  166. 324  src/test/java/junit/tests/framework/AssertTest.java
  167. 26  src/test/java/junit/tests/framework/AssertionFailedErrorTest.java
  168. 188  src/test/java/junit/tests/framework/ComparisonCompactorTest.java
  169. 76  src/test/java/junit/tests/framework/ComparisonFailureTest.java
  170. 92  src/test/java/junit/tests/framework/DoublePrecisionAssertTest.java
  171. 9  src/test/java/junit/tests/framework/Failure.java
  172. 108  src/test/java/junit/tests/framework/FloatAssertTest.java
  173. 6  src/test/java/junit/tests/framework/InheritedTestCase.java
  174. 5  src/test/java/junit/tests/framework/NoArgTestCaseTest.java
  175. 5  src/test/java/junit/tests/framework/NoTestCaseClass.java
  176. 8  src/test/java/junit/tests/framework/NoTestCases.java
  177. 13  src/test/java/junit/tests/framework/NotPublicTestCase.java
  178. 15  src/test/java/junit/tests/framework/NotVoidTestCase.java
  179. 18  src/test/java/junit/tests/framework/OneTestCase.java
  180. 6  src/test/java/junit/tests/framework/OverrideTestCase.java
  181. 15  src/test/java/junit/tests/framework/Success.java
  182. 195  src/test/java/junit/tests/framework/SuiteTest.java
  183. 367  src/test/java/junit/tests/framework/TestCaseTest.java
  184. 84  src/test/java/junit/tests/framework/TestImplementorTest.java
  185. 131  src/test/java/junit/tests/framework/TestListenerTest.java
  186. 18  src/test/java/junit/tests/framework/ThreeTestCases.java
  187. 39  src/test/java/junit/tests/runner/AllTests.java
  188. 89  src/test/java/junit/tests/runner/BaseTestRunnerTest.java
  189. 36  src/test/java/junit/tests/runner/ResultTest.java
  190. 70  src/test/java/junit/tests/runner/StackFilterTest.java
  191. 199  src/test/java/junit/tests/runner/TextFeedbackTest.java
  192. 50  src/test/java/junit/tests/runner/TextRunnerSingleMethodTest.java
  193. 93  src/test/java/junit/tests/runner/TextRunnerTest.java
  194. 156  src/test/java/org/junit/internal/MethodSorterTest.java
  195. 41  src/test/java/org/junit/internal/matchers/StacktracePrintingMatcherTest.java
  196. 81  src/test/java/org/junit/runner/notification/RunNotifierTest.java
  197. 130  src/test/java/org/junit/samples/ListTest.java
  198. 62  src/test/java/org/junit/samples/SimpleTest.java
  199. 335  src/test/java/org/junit/samples/money/MoneyTest.java
  200. 156  src/test/java/org/junit/tests/AllTests.java
  201. 46  src/test/java/org/junit/tests/ObjectContractTest.java
  202. 24  src/test/java/org/junit/tests/TestSystem.java
  203. 1,067  src/test/java/org/junit/tests/assertion/AssertionTest.java
  204. 72  src/test/java/org/junit/tests/assertion/MultipleFailureExceptionTest.java
  205. 84  src/test/java/org/junit/tests/deprecated/JUnit4ClassRunnerTest.java
  206. 160  src/test/java/org/junit/tests/description/AnnotatedDescriptionTest.java
  207. 51  src/test/java/org/junit/tests/description/SuiteDescriptionTest.java
  208. 24  src/test/java/org/junit/tests/description/TestDescriptionTest.java
  209. 469  src/test/java/org/junit/tests/experimental/AssumptionTest.java
  210. 67  src/test/java/org/junit/tests/experimental/AssumptionViolatedExceptionTest.java
  211. 14  src/test/java/org/junit/tests/experimental/ExperimentalTests.java
  212. 42  src/test/java/org/junit/tests/experimental/MatcherTest.java
  213. 202  src/test/java/org/junit/tests/experimental/categories/CategoriesAndParameterizedTest.java
  214. 482  src/test/java/org/junit/tests/experimental/categories/CategoryTest.java
  215. 212  src/test/java/org/junit/tests/experimental/max/DescriptionTest.java
  216. 79  src/test/java/org/junit/tests/experimental/max/JUnit38SortingTest.java
  217. 523  src/test/java/org/junit/tests/experimental/max/MaxStarterTest.java
  218. 118  src/test/java/org/junit/tests/experimental/parallel/ParallelClassTest.java
  219. 85  src/test/java/org/junit/tests/experimental/parallel/ParallelMethodTest.java
  220. 60  src/test/java/org/junit/tests/experimental/results/PrintableResultTest.java
  221. 22  src/test/java/org/junit/tests/experimental/results/ResultMatchersTest.java
  222. 122  src/test/java/org/junit/tests/experimental/rules/BlockJUnit4ClassRunnerOverrideTest.java
  223. 431  src/test/java/org/junit/tests/experimental/rules/ClassRulesTest.java
  224. 317  src/test/java/org/junit/tests/experimental/rules/EventCollector.java
  225. 672  src/test/java/org/junit/tests/experimental/rules/ExpectedExceptionTest.java
  226. 58  src/test/java/org/junit/tests/experimental/rules/ExternalResourceRuleTest.java
  227. 40  src/test/java/org/junit/tests/experimental/rules/LoggingTestWatcher.java
108  src/main/java/junit/extensions/ActiveTestSuite.java
@@ -10,61 +10,61 @@
10 10
  * test in a separate thread and waits until all
11 11
  * threads have terminated.
12 12
  * -- Aarhus Radisson Scandinavian Center 11th floor
13  
- */ 
  13
+ */
14 14
 public class ActiveTestSuite extends TestSuite {
15  
-	private volatile int fActiveTestDeathCount;
  15
+    private volatile int fActiveTestDeathCount;
16 16
 
17  
-	public ActiveTestSuite() {
18  
-	}
19  
-		
20  
-	public ActiveTestSuite(Class<? extends TestCase> theClass) {
21  
-		super(theClass);
22  
-	}
23  
-	
24  
-	public ActiveTestSuite(String name) {
25  
-		super (name);
26  
-	}
27  
-	
28  
-	public ActiveTestSuite(Class<? extends TestCase> theClass, String name) {
29  
-		super(theClass, name);
30  
-	}
31  
-	
32  
-	@Override
33  
-	public void run(TestResult result) {
34  
-		fActiveTestDeathCount= 0;
35  
-		super.run(result);
36  
-		waitUntilFinished();
37  
-	}
38  
-	
39  
-	@Override
40  
-	public void runTest(final Test test, final TestResult result) {
41  
-		Thread t= new Thread() {
42  
-			@Override
43  
-			public void run() {
44  
-				try {
45  
-					// inlined due to limitation in VA/Java 
46  
-					//ActiveTestSuite.super.runTest(test, result);
47  
-					test.run(result);
48  
-				} finally {
49  
-					ActiveTestSuite.this.runFinished();
50  
-				}
51  
-			}
52  
-		};
53  
-		t.start();
54  
-	}
  17
+    public ActiveTestSuite() {
  18
+    }
55 19
 
56  
-	synchronized void waitUntilFinished() {
57  
-		while (fActiveTestDeathCount < testCount()) {
58  
-			try {
59  
-				wait();
60  
-			} catch (InterruptedException e) {
61  
-				return; // ignore
62  
-			}
63  
-		}
64  
-	}
65  
-	
66  
-	synchronized public void runFinished() {
67  
-		fActiveTestDeathCount++;
68  
-		notifyAll();
69  
-	}
  20
+    public ActiveTestSuite(Class<? extends TestCase> theClass) {
  21
+        super(theClass);
  22
+    }
  23
+
  24
+    public ActiveTestSuite(String name) {
  25
+        super(name);
  26
+    }
  27
+
  28
+    public ActiveTestSuite(Class<? extends TestCase> theClass, String name) {
  29
+        super(theClass, name);
  30
+    }
  31
+
  32
+    @Override
  33
+    public void run(TestResult result) {
  34
+        fActiveTestDeathCount = 0;
  35
+        super.run(result);
  36
+        waitUntilFinished();
  37
+    }
  38
+
  39
+    @Override
  40
+    public void runTest(final Test test, final TestResult result) {
  41
+        Thread t = new Thread() {
  42
+            @Override
  43
+            public void run() {
  44
+                try {
  45
+                    // inlined due to limitation in VA/Java
  46
+                    //ActiveTestSuite.super.runTest(test, result);
  47
+                    test.run(result);
  48
+                } finally {
  49
+                    ActiveTestSuite.this.runFinished();
  50
+                }
  51
+            }
  52
+        };
  53
+        t.start();
  54
+    }
  55
+
  56
+    synchronized void waitUntilFinished() {
  57
+        while (fActiveTestDeathCount < testCount()) {
  58
+            try {
  59
+                wait();
  60
+            } catch (InterruptedException e) {
  61
+                return; // ignore
  62
+            }
  63
+        }
  64
+    }
  65
+
  66
+    synchronized public void runFinished() {
  67
+        fActiveTestDeathCount++;
  68
+        notifyAll();
  69
+    }
70 70
 }
49  src/main/java/junit/extensions/RepeatedTest.java
@@ -5,34 +5,35 @@
5 5
 
6 6
 /**
7 7
  * A Decorator that runs a test repeatedly.
8  
- * 
9 8
  */
10 9
 public class RepeatedTest extends TestDecorator {
11  
-	private int fTimesRepeat;
  10
+    private int fTimesRepeat;
12 11
 
13  
-	public RepeatedTest(Test test, int repeat) {
14  
-		super(test);
15  
-		if (repeat < 0)
16  
-			throw new IllegalArgumentException("Repetition count must be >= 0");
17  
-		fTimesRepeat= repeat;
18  
-	}
  12
+    public RepeatedTest(Test test, int repeat) {
  13
+        super(test);
  14
+        if (repeat < 0) {
  15
+            throw new IllegalArgumentException("Repetition count must be >= 0");
  16
+        }
  17
+        fTimesRepeat = repeat;
  18
+    }
19 19
 
20  
-	@Override
21  
-	public int countTestCases() {
22  
-		return super.countTestCases() * fTimesRepeat;
23  
-	}
  20
+    @Override
  21
+    public int countTestCases() {
  22
+        return super.countTestCases() * fTimesRepeat;
  23
+    }
24 24
 
25  
-	@Override
26  
-	public void run(TestResult result) {
27  
-		for (int i= 0; i < fTimesRepeat; i++) {
28  
-			if (result.shouldStop())
29  
-				break;
30  
-			super.run(result);
31  
-		}
32  
-	}
  25
+    @Override
  26
+    public void run(TestResult result) {
  27
+        for (int i = 0; i < fTimesRepeat; i++) {
  28
+            if (result.shouldStop()) {
  29
+                break;
  30
+            }
  31
+            super.run(result);
  32
+        }
  33
+    }
33 34
 
34  
-	@Override
35  
-	public String toString() {
36  
-		return super.toString() + "(repeated)";
37  
-	}
  35
+    @Override
  36
+    public String toString() {
  37
+        return super.toString() + "(repeated)";
  38
+    }
38 39
 }
59  src/main/java/junit/extensions/TestDecorator.java
@@ -8,36 +8,35 @@
8 8
  * A Decorator for Tests. Use TestDecorator as the base class for defining new
9 9
  * test decorators. Test decorator subclasses can be introduced to add behaviour
10 10
  * before or after a test is run.
11  
- * 
12 11
  */
13 12
 public class TestDecorator extends Assert implements Test {
14  
-	protected Test fTest;
15  
-
16  
-	public TestDecorator(Test test) {
17  
-		fTest= test;
18  
-	}
19  
-
20  
-	/**
21  
-	 * The basic run behaviour.
22  
-	 */
23  
-	public void basicRun(TestResult result) {
24  
-		fTest.run(result);
25  
-	}
26  
-
27  
-	public int countTestCases() {
28  
-		return fTest.countTestCases();
29  
-	}
30  
-
31  
-	public void run(TestResult result) {
32  
-		basicRun(result);
33  
-	}
34  
-
35  
-	@Override
36  
-	public String toString() {
37  
-		return fTest.toString();
38  
-	}
39  
-
40  
-	public Test getTest() {
41  
-		return fTest;
42  
-	}
  13
+    protected Test fTest;
  14
+
  15
+    public TestDecorator(Test test) {
  16
+        fTest = test;
  17
+    }
  18
+
  19
+    /**
  20
+     * The basic run behaviour.
  21
+     */
  22
+    public void basicRun(TestResult result) {
  23
+        fTest.run(result);
  24
+    }
  25
+
  26
+    public int countTestCases() {
  27
+        return fTest.countTestCases();
  28
+    }
  29
+
  30
+    public void run(TestResult result) {
  31
+        basicRun(result);
  32
+    }
  33
+
  34
+    @Override
  35
+    public String toString() {
  36
+        return fTest.toString();
  37
+    }
  38
+
  39
+    public Test getTest() {
  40
+        return fTest;
  41
+    }
43 42
 }
50  src/main/java/junit/extensions/TestSetup.java
@@ -11,32 +11,32 @@
11 11
  */
12 12
 public class TestSetup extends TestDecorator {
13 13
 
14  
-	public TestSetup(Test test) {
15  
-		super(test);
16  
-	}
  14
+    public TestSetup(Test test) {
  15
+        super(test);
  16
+    }
17 17
 
18  
-	@Override
19  
-	public void run(final TestResult result) {
20  
-		Protectable p= new Protectable() {
21  
-			public void protect() throws Exception {
22  
-				setUp();
23  
-				basicRun(result);
24  
-				tearDown();
25  
-			}
26  
-		};
27  
-		result.runProtected(this, p);
28  
-	}
  18
+    @Override
  19
+    public void run(final TestResult result) {
  20
+        Protectable p = new Protectable() {
  21
+            public void protect() throws Exception {
  22
+                setUp();
  23
+                basicRun(result);
  24
+                tearDown();
  25
+            }
  26
+        };
  27
+        result.runProtected(this, p);
  28
+    }
29 29
 
30  
-	/**
31  
-	 * Sets up the fixture. Override to set up additional fixture state.
32  
-	 */
33  
-	protected void setUp() throws Exception {
34  
-	}
  30
+    /**
  31
+     * Sets up the fixture. Override to set up additional fixture state.
  32
+     */
  33
+    protected void setUp() throws Exception {
  34
+    }
35 35
 
36  
-	/**
37  
-	 * Tears down the fixture. Override to tear down the additional fixture
38  
-	 * state.
39  
-	 */
40  
-	protected void tearDown() throws Exception {
41  
-	}
  36
+    /**
  37
+     * Tears down the fixture. Override to tear down the additional fixture
  38
+     * state.
  39
+     */
  40
+    protected void tearDown() throws Exception {
  41
+    }
42 42
 }
613  src/main/java/junit/framework/Assert.java
@@ -7,288 +7,333 @@
7 7
  */
8 8
 @Deprecated
9 9
 public class Assert {
10  
-	/**
11  
-	 * Protect constructor since it is a static only class
12  
-	 */
13  
-	protected Assert() {
14  
-	}
15  
-
16  
-	/**
17  
-	 * Asserts that a condition is true. If it isn't it throws
18  
-	 * an AssertionFailedError with the given message.
19  
-	 */
20  
-	static public void assertTrue(String message, boolean condition) {
21  
-		if (!condition)
22  
-			fail(message);
23  
-	}
24  
-	/**
25  
-	 * Asserts that a condition is true. If it isn't it throws
26  
-	 * an AssertionFailedError.
27  
-	 */
28  
-	static public void assertTrue(boolean condition) {
29  
-		assertTrue(null, condition);
30  
-	}
31  
-	/**
32  
-	 * Asserts that a condition is false. If it isn't it throws
33  
-	 * an AssertionFailedError with the given message.
34  
-	 */
35  
-	static public void assertFalse(String message, boolean condition) {
36  
-		assertTrue(message, !condition);
37  
-	}
38  
-	/**
39  
-	 * Asserts that a condition is false. If it isn't it throws
40  
-	 * an AssertionFailedError.
41  
-	 */
42  
-	static public void assertFalse(boolean condition) {
43  
-		assertFalse(null, condition);
44  
-	}
45  
-	/**
46  
-	 * Fails a test with the given message.
47  
-	 */
48  
-	static public void fail(String message) {
49  
-		if (message == null) {
50  
-			throw new AssertionFailedError();
51  
-		}
52  
-		throw new AssertionFailedError(message);
53  
-	}
54  
-	/**
55  
-	 * Fails a test with no message.
56  
-	 */
57  
-	static public void fail() {
58  
-		fail(null);
59  
-	}
60  
-	/**
61  
-	 * Asserts that two objects are equal. If they are not
62  
-	 * an AssertionFailedError is thrown with the given message.
63  
-	 */
64  
-	static public void assertEquals(String message, Object expected, Object actual) {
65  
-		if (expected == null && actual == null)
66  
-			return;
67  
-		if (expected != null && expected.equals(actual))
68  
-			return;
69  
-		failNotEquals(message, expected, actual);
70  
-	}
71  
-	/**
72  
-	 * Asserts that two objects are equal. If they are not
73  
-	 * an AssertionFailedError is thrown.
74  
-	 */
75  
-	static public void assertEquals(Object expected, Object actual) {
76  
-		assertEquals(null, expected, actual);
77  
-	}
78  
-	/**
79  
-	 * Asserts that two Strings are equal. 
80  
-	 */
81  
-	static public void assertEquals(String message, String expected, String actual) {
82  
-		if (expected == null && actual == null)
83  
-			return;
84  
-		if (expected != null && expected.equals(actual))
85  
-			return;
86  
-		String cleanMessage= message == null ? "" : message;
87  
-		throw new ComparisonFailure(cleanMessage, expected, actual);
88  
-	}
89  
-	/**
90  
-	 * Asserts that two Strings are equal. 
91  
-	 */
92  
-	static public void assertEquals(String expected, String actual) {
93  
-		assertEquals(null, expected, actual);
94  
-	}
95  
-	/**
96  
-	 * Asserts that two doubles are equal concerning a delta.  If they are not
97  
-	 * an AssertionFailedError is thrown with the given message.  If the expected
98  
-	 * value is infinity then the delta value is ignored.
99  
-	 */
100  
-	static public void assertEquals(String message, double expected, double actual, double delta) {
101  
-		if (Double.compare(expected, actual) == 0)
102  
-			return;
103  
-		if (!(Math.abs(expected-actual) <= delta))
104  
-			failNotEquals(message, new Double(expected), new Double(actual));
105  
-	}
106  
-	/**
107  
-	 * Asserts that two doubles are equal concerning a delta. If the expected
108  
-	 * value is infinity then the delta value is ignored.
109  
-	 */
110  
-	static public void assertEquals(double expected, double actual, double delta) {
111  
-		assertEquals(null, expected, actual, delta);
112  
-	}
113  
-	/**
114  
-	 * Asserts that two floats are equal concerning a positive delta. If they
115  
-	 * are not an AssertionFailedError is thrown with the given message. If the
116  
-	 * expected value is infinity then the delta value is ignored.
117  
-	 */
118  
-	static public void assertEquals(String message, float expected, float actual, float delta) {
119  
-		if (Float.compare(expected, actual) == 0)
120  
-			return;
121  
-		if (!(Math.abs(expected - actual) <= delta))
122  
-			failNotEquals(message, new Float(expected), new Float(actual));
123  
-	}
124  
-	/**
125  
-	 * Asserts that two floats are equal concerning a delta. If the expected
126  
-	 * value is infinity then the delta value is ignored.
127  
-	 */
128  
-	static public void assertEquals(float expected, float actual, float delta) {
129  
-		assertEquals(null, expected, actual, delta);
130  
-	}
131  
-	/**
132  
-	 * Asserts that two longs are equal. If they are not
133  
-	 * an AssertionFailedError is thrown with the given message.
134  
-	 */
135  
-	static public void assertEquals(String message, long expected, long actual) {
136  
-		assertEquals(message, new Long(expected), new Long(actual));
137  
-	}
138  
-	/**
139  
-	 * Asserts that two longs are equal.
140  
-	 */
141  
-	static public void assertEquals(long expected, long actual) {
142  
-		assertEquals(null, expected, actual);
143  
-	}
144  
-	/**
145  
-	 * Asserts that two booleans are equal. If they are not
146  
-	 * an AssertionFailedError is thrown with the given message.
147  
-	 */
148  
-	static public void assertEquals(String message, boolean expected, boolean actual) {
149  
-		assertEquals(message, Boolean.valueOf(expected), Boolean.valueOf(actual));
150  
-	}
151  
-	/**
152  
-	 * Asserts that two booleans are equal.
153  
-	 */
154  
-	static public void assertEquals(boolean expected, boolean actual) {
155  
-		assertEquals(null, expected, actual);
156  
-	}
157  
-	/**
158  
-	 * Asserts that two bytes are equal. If they are not
159  
-	 * an AssertionFailedError is thrown with the given message.
160  
-	 */
161  
-	static public void assertEquals(String message, byte expected, byte actual) {
162  
-		assertEquals(message, new Byte(expected), new Byte(actual));
163  
-	}
164  
-	/**
165  
-	 * Asserts that two bytes are equal.
166  
-	 */
167  
-	static public void assertEquals(byte expected, byte actual) {
168  
-		assertEquals(null, expected, actual);
169  
-	}
170  
-	/**
171  
-	 * Asserts that two chars are equal. If they are not
172  
-	 * an AssertionFailedError is thrown with the given message.
173  
-	 */
174  
-	static public void assertEquals(String message, char expected, char actual) {
175  
-		assertEquals(message, new Character(expected), new Character(actual));
176  
-	}
177  
-	/**
178  
-	 * Asserts that two chars are equal.
179  
-	 */
180  
-	static public void assertEquals(char expected, char actual) {
181  
-		assertEquals(null, expected, actual);
182  
-	}
183  
-	/**
184  
-	 * Asserts that two shorts are equal. If they are not
185  
-	 * an AssertionFailedError is thrown with the given message.
186  
-	 */
187  
-	static public void assertEquals(String message, short expected, short actual) {
188  
-		assertEquals(message, new Short(expected), new Short(actual));
189  
-	}
190  
-	/**
191  
-	 * Asserts that two shorts are equal.
192  
-	 */
193  
-	static public void assertEquals(short expected, short actual) {
194  
-		assertEquals(null, expected, actual);
195  
-	}
196  
-	/**
197  
-	 * Asserts that two ints are equal. If they are not
198  
-	 * an AssertionFailedError is thrown with the given message.
199  
-	 */
200  
-	static public void assertEquals(String message, int expected, int actual) {
201  
-		assertEquals(message, new Integer(expected), new Integer(actual));
202  
-	}
203  
-	/**
204  
-	 * Asserts that two ints are equal.
205  
-	 */
206  
-	static public void assertEquals(int expected, int actual) {
207  
-		assertEquals(null, expected, actual);
208  
-	}
209  
-	/**
210  
-	 * Asserts that an object isn't null.
211  
-	 */
212  
-	static public void assertNotNull(Object object) {
213  
-		assertNotNull(null, object);
214  
-	}
215  
-	/**
216  
-	 * Asserts that an object isn't null. If it is
217  
-	 * an AssertionFailedError is thrown with the given message.
218  
-	 */
219  
-	static public void assertNotNull(String message, Object object) {
220  
-		assertTrue(message, object != null);
221  
-	}
222  
-	/**
223  
-	 * Asserts that an object is null. If it isn't an {@link AssertionError} is
224  
-	 * thrown.
225  
-	 * Message contains: Expected: <null> but was: object
226  
-	 *
227  
-	 * @param object
228  
-	 *            Object to check or <code>null</code>
229  
-	 */
230  
-	static public void assertNull(Object object) {
231  
-		if (object != null)
232  
-			assertNull("Expected: <null> but was: " + object.toString(), object);
233  
-	}
234  
-	/**
235  
-	 * Asserts that an object is null.  If it is not
236  
-	 * an AssertionFailedError is thrown with the given message.
237  
-	 */
238  
-	static public void assertNull(String message, Object object) {
239  
-		assertTrue(message, object == null);
240  
-	}
241  
-	/**
242  
-	 * Asserts that two objects refer to the same object. If they are not
243  
-	 * an AssertionFailedError is thrown with the given message.
244  
-	 */
245  
-	static public void assertSame(String message, Object expected, Object actual) {
246  
-		if (expected == actual)
247  
-			return;
248  
-		failNotSame(message, expected, actual);
249  
-	}
250  
-	/**
251  
-	 * Asserts that two objects refer to the same object. If they are not
252  
-	 * the same an AssertionFailedError is thrown.
253  
-	 */
254  
-	static public void assertSame(Object expected, Object actual) {
255  
-		assertSame(null, expected, actual);
256  
-	}
257  
-	/**
258  
-	 * Asserts that two objects do not refer to the same object. If they do
259  
-	 * refer to the same object an AssertionFailedError is thrown with the
260  
-	 * given message.
261  
-	 */
262  
-	static public void assertNotSame(String message, Object expected, Object actual) {
263  
-		if (expected == actual)
264  
-			failSame(message);
265  
-	}
266  
-	/**
267  
-	 * Asserts that two objects do not refer to the same object. If they do
268  
-	 * refer to the same object an AssertionFailedError is thrown.
269  
-	 */
270  
-	static public void assertNotSame(Object expected, Object actual) {
271  
-		assertNotSame(null, expected, actual);
272  
-	}
273  
-
274  
-	static public void failSame(String message) {
275  
-		String formatted= (message != null) ? message+" " : "";
276  
-		fail(formatted+"expected not same");
277  
-	}
278  
-
279  
-	static public void failNotSame(String message, Object expected, Object actual) {
280  
-		String formatted= (message != null) ? message+" " : "";
281  
-		fail(formatted+"expected same:<"+expected+"> was not:<"+actual+">");
282  
-	}
283  
-
284  
-	static public void failNotEquals(String message, Object expected, Object actual) {
285  
-		fail(format(message, expected, actual));
286  
-	}
287  
-
288  
-	public static String format(String message, Object expected, Object actual) {
289  
-		String formatted= "";
290  
-		if (message != null && message.length() > 0)
291  
-			formatted= message+" ";
292  
-		return formatted+"expected:<"+expected+"> but was:<"+actual+">";
293  
-	}
  10
+    /**
  11
+     * Protect constructor since it is a static only class
  12
+     */
  13
+    protected Assert() {
  14
+    }
  15
+
  16
+    /**
  17
+     * Asserts that a condition is true. If it isn't it throws
  18
+     * an AssertionFailedError with the given message.
  19
+     */
  20
+    static public void assertTrue(String message, boolean condition) {
  21
+        if (!condition) {
  22
+            fail(message);
  23
+        }
  24
+    }
  25
+
  26
+    /**
  27
+     * Asserts that a condition is true. If it isn't it throws
  28
+     * an AssertionFailedError.
  29
+     */
  30
+    static public void assertTrue(boolean condition) {
  31
+        assertTrue(null, condition);
  32
+    }
  33
+
  34
+    /**
  35
+     * Asserts that a condition is false. If it isn't it throws
  36
+     * an AssertionFailedError with the given message.
  37
+     */
  38
+    static public void assertFalse(String message, boolean condition) {
  39
+        assertTrue(message, !condition);
  40
+    }
  41
+
  42
+    /**
  43
+     * Asserts that a condition is false. If it isn't it throws
  44
+     * an AssertionFailedError.
  45
+     */
  46
+    static public void assertFalse(boolean condition) {
  47
+        assertFalse(null, condition);
  48
+    }
  49
+
  50
+    /**
  51
+     * Fails a test with the given message.
  52
+     */
  53
+    static public void fail(String message) {
  54
+        if (message == null) {
  55
+            throw new AssertionFailedError();
  56
+        }
  57
+        throw new AssertionFailedError(message);
  58
+    }
  59
+
  60
+    /**
  61
+     * Fails a test with no message.
  62
+     */
  63
+    static public void fail() {
  64
+        fail(null);
  65
+    }
  66
+
  67
+    /**
  68
+     * Asserts that two objects are equal. If they are not
  69
+     * an AssertionFailedError is thrown with the given message.
  70
+     */
  71
+    static public void assertEquals(String message, Object expected, Object actual) {
  72
+        if (expected == null && actual == null) {
  73
+            return;
  74
+        }
  75
+        if (expected != null && expected.equals(actual)) {
  76
+            return;
  77
+        }
  78
+        failNotEquals(message, expected, actual);
  79
+    }
  80
+
  81
+    /**
  82
+     * Asserts that two objects are equal. If they are not
  83
+     * an AssertionFailedError is thrown.
  84
+     */
  85
+    static public void assertEquals(Object expected, Object actual) {
  86
+        assertEquals(null, expected, actual);
  87
+    }
  88
+
  89
+    /**
  90
+     * Asserts that two Strings are equal.
  91
+     */
  92
+    static public void assertEquals(String message, String expected, String actual) {
  93
+        if (expected == null && actual == null) {
  94
+            return;
  95
+        }
  96
+        if (expected != null && expected.equals(actual)) {
  97
+            return;
  98
+        }
  99
+        String cleanMessage = message == null ? "" : message;
  100
+        throw new ComparisonFailure(cleanMessage, expected, actual);
  101
+    }
  102
+
  103
+    /**
  104
+     * Asserts that two Strings are equal.
  105
+     */
  106
+    static public void assertEquals(String expected, String actual) {
  107
+        assertEquals(null, expected, actual);
  108
+    }
  109
+
  110
+    /**
  111
+     * Asserts that two doubles are equal concerning a delta.  If they are not
  112
+     * an AssertionFailedError is thrown with the given message.  If the expected
  113
+     * value is infinity then the delta value is ignored.
  114
+     */
  115
+    static public void assertEquals(String message, double expected, double actual, double delta) {
  116
+        if (Double.compare(expected, actual) == 0) {
  117
+            return;
  118
+        }
  119
+        if (!(Math.abs(expected - actual) <= delta)) {
  120
+            failNotEquals(message, new Double(expected), new Double(actual));
  121
+        }
  122
+    }
  123
+
  124
+    /**
  125
+     * Asserts that two doubles are equal concerning a delta. If the expected
  126
+     * value is infinity then the delta value is ignored.
  127
+     */
  128
+    static public void assertEquals(double expected, double actual, double delta) {
  129
+        assertEquals(null, expected, actual, delta);
  130
+    }
  131
+
  132
+    /**
  133
+     * Asserts that two floats are equal concerning a positive delta. If they
  134
+     * are not an AssertionFailedError is thrown with the given message. If the
  135
+     * expected value is infinity then the delta value is ignored.
  136
+     */
  137
+    static public void assertEquals(String message, float expected, float actual, float delta) {
  138
+        if (Float.compare(expected, actual) == 0) {
  139
+            return;
  140
+        }
  141
+        if (!(Math.abs(expected - actual) <= delta)) {
  142
+            failNotEquals(message, new Float(expected), new Float(actual));
  143
+        }
  144
+    }
  145
+
  146
+    /**
  147
+     * Asserts that two floats are equal concerning a delta. If the expected
  148
+     * value is infinity then the delta value is ignored.
  149
+     */
  150
+    static public void assertEquals(float expected, float actual, float delta) {
  151
+        assertEquals(null, expected, actual, delta);
  152
+    }
  153
+
  154
+    /**
  155
+     * Asserts that two longs are equal. If they are not
  156
+     * an AssertionFailedError is thrown with the given message.
  157
+     */
  158
+    static public void assertEquals(String message, long expected, long actual) {
  159
+        assertEquals(message, new Long(expected), new Long(actual));
  160
+    }
  161
+
  162
+    /**
  163
+     * Asserts that two longs are equal.
  164
+     */
  165
+    static public void assertEquals(long expected, long actual) {
  166
+        assertEquals(null, expected, actual);
  167
+    }
  168
+
  169
+    /**
  170
+     * Asserts that two booleans are equal. If they are not
  171
+     * an AssertionFailedError is thrown with the given message.
  172
+     */
  173
+    static public void assertEquals(String message, boolean expected, boolean actual) {
  174
+        assertEquals(message, Boolean.valueOf(expected), Boolean.valueOf(actual));
  175
+    }
  176
+
  177
+    /**
  178
+     * Asserts that two booleans are equal.
  179
+     */
  180
+    static public void assertEquals(boolean expected, boolean actual) {
  181
+        assertEquals(null, expected, actual);
  182
+    }
  183
+
  184
+    /**
  185
+     * Asserts that two bytes are equal. If they are not
  186
+     * an AssertionFailedError is thrown with the given message.
  187
+     */
  188
+    static public void assertEquals(String message, byte expected, byte actual) {
  189
+        assertEquals(message, new Byte(expected), new Byte(actual));
  190
+    }
  191
+
  192
+    /**
  193
+     * Asserts that two bytes are equal.
  194
+     */
  195
+    static public void assertEquals(byte expected, byte actual) {
  196
+        assertEquals(null, expected, actual);
  197
+    }
  198
+
  199
+    /**
  200
+     * Asserts that two chars are equal. If they are not
  201
+     * an AssertionFailedError is thrown with the given message.
  202
+     */
  203
+    static public void assertEquals(String message, char expected, char actual) {
  204
+        assertEquals(message, new Character(expected), new Character(actual));
  205
+    }
  206
+
  207
+    /**
  208
+     * Asserts that two chars are equal.
  209
+     */
  210
+    static public void assertEquals(char expected, char actual) {
  211
+        assertEquals(null, expected, actual);
  212
+    }
  213
+
  214
+    /**
  215
+     * Asserts that two shorts are equal. If they are not
  216
+     * an AssertionFailedError is thrown with the given message.
  217
+     */
  218
+    static public void assertEquals(String message, short expected, short actual) {
  219
+        assertEquals(message, new Short(expected), new Short(actual));
  220
+    }
  221
+
  222
+    /**
  223
+     * Asserts that two shorts are equal.
  224
+     */
  225
+    static public void assertEquals(short expected, short actual) {
  226
+        assertEquals(null, expected, actual);
  227
+    }
  228
+
  229
+    /**
  230
+     * Asserts that two ints are equal. If they are not
  231
+     * an AssertionFailedError is thrown with the given message.
  232
+     */
  233
+    static public void assertEquals(String message, int expected, int actual) {
  234
+        assertEquals(message, new Integer(expected), new Integer(actual));
  235
+    }
  236
+
  237
+    /**
  238
+     * Asserts that two ints are equal.
  239
+     */
  240
+    static public void assertEquals(int expected, int actual) {
  241
+        assertEquals(null, expected, actual);
  242
+    }
  243
+
  244
+    /**
  245
+     * Asserts that an object isn't null.
  246
+     */
  247
+    static public void assertNotNull(Object object) {
  248
+        assertNotNull(null, object);
  249
+    }
  250
+
  251
+    /**
  252
+     * Asserts that an object isn't null. If it is
  253
+     * an AssertionFailedError is thrown with the given message.
  254
+     */
  255
+    static public void assertNotNull(String message, Object object) {
  256
+        assertTrue(message, object != null);
  257
+    }
  258
+
  259
+    /**
  260
+     * Asserts that an object is null. If it isn't an {@link AssertionError} is
  261
+     * thrown.
  262
+     * Message contains: Expected: <null> but was: object
  263
+     *
  264
+     * @param object Object to check or <code>null</code>
  265
+     */
  266
+    static public void assertNull(Object object) {
  267
+        if (object != null) {
  268
+            assertNull("Expected: <null> but was: " + object.toString(), object);
  269
+        }
  270
+    }
  271
+
  272
+    /**
  273
+     * Asserts that an object is null.  If it is not
  274
+     * an AssertionFailedError is thrown with the given message.
  275
+     */
  276
+    static public void assertNull(String message, Object object) {
  277
+        assertTrue(message, object == null);
  278
+    }
  279
+
  280
+    /**
  281
+     * Asserts that two objects refer to the same object. If they are not
  282
+     * an AssertionFailedError is thrown with the given message.
  283
+     */
  284
+    static public void assertSame(String message, Object expected, Object actual) {
  285
+        if (expected == actual) {
  286
+            return;
  287
+        }
  288
+        failNotSame(message, expected, actual);
  289
+    }
  290
+
  291
+    /**
  292
+     * Asserts that two objects refer to the same object. If they are not
  293
+     * the same an AssertionFailedError is thrown.
  294
+     */
  295
+    static public void assertSame(Object expected, Object actual) {
  296
+        assertSame(null, expected, actual);
  297
+    }
  298
+
  299
+    /**
  300
+     * Asserts that two objects do not refer to the same object. If they do
  301
+     * refer to the same object an AssertionFailedError is thrown with the
  302
+     * given message.
  303
+     */
  304
+    static public void assertNotSame(String message, Object expected, Object actual) {
  305
+        if (expected == actual) {
  306
+            failSame(message);
  307
+        }
  308
+    }
  309
+
  310
+    /**
  311
+     * Asserts that two objects do not refer to the same object. If they do
  312
+     * refer to the same object an AssertionFailedError is thrown.
  313
+     */
  314
+    static public void assertNotSame(Object expected, Object actual) {
  315
+        assertNotSame(null, expected, actual);
  316
+    }
  317
+
  318
+    static public void failSame(String message) {
  319
+        String formatted = (message != null) ? message + " " : "";
  320
+        fail(formatted + "expected not same");
  321
+    }
  322
+
  323
+    static public void failNotSame(String message, Object expected, Object actual) {
  324
+        String formatted = (message != null) ? message + " " : "";
  325
+        fail(formatted + "expected same:<" + expected + "> was not:<" + actual + ">");
  326
+    }
  327
+
  328
+    static public void failNotEquals(String message, Object expected, Object actual) {
  329
+        fail(format(message, expected, actual));
  330
+    }
  331
+
  332
+    public static String format(String message, Object expected, Object actual) {
  333
+        String formatted = "";
  334
+        if (message != null && message.length() > 0) {
  335
+            formatted = message + " ";
  336
+        }
  337
+        return formatted + "expected:<" + expected + "> but was:<" + actual + ">";
  338
+    }
294 339
 }
18  src/main/java/junit/framework/AssertionFailedError.java
@@ -5,16 +5,16 @@
5 5
  */
6 6
 public class AssertionFailedError extends AssertionError {
7 7
 
8  
-	private static final long serialVersionUID= 1L;
  8
+    private static final long serialVersionUID = 1L;
9 9
 
10  
-	public AssertionFailedError() {
11  
-	}
  10
+    public AssertionFailedError() {
  11
+    }
12 12
 
13  
-	public AssertionFailedError(String message) {
14  
-		super(defaultString(message));
15  
-	}
  13
+    public AssertionFailedError(String message) {
  14
+        super(defaultString(message));
  15
+    }
16 16
 
17  
-	private static String defaultString(String message) {
18  
-		return message == null ? "" : message;
19  
-	}
  17
+    private static String defaultString(String message) {
  18
+        return message == null ? "" : message;
  19
+    }
20 20
 }
121  src/main/java/junit/framework/ComparisonCompactor.java
@@ -2,71 +2,76 @@
2 2
 
3 3
 public class ComparisonCompactor {
4 4
 
5  
-	private static final String ELLIPSIS= "...";
6  
-	private static final String DELTA_END= "]";
7  
-	private static final String DELTA_START= "[";
8  
-	
9  
-	private int fContextLength;
10  
-	private String fExpected;
11  
-	private String fActual;
12  
-	private int fPrefix;
13  
-	private int fSuffix;
  5
+    private static final String ELLIPSIS = "...";
  6
+    private static final String DELTA_END = "]";
  7
+    private static final String DELTA_START = "[";
14 8
 
15  
-	public ComparisonCompactor(int contextLength, String expected, String actual) {
16  
-		fContextLength= contextLength;
17  
-		fExpected= expected;
18  
-		fActual= actual;
19  
-	}
  9
+    private int fContextLength;
  10
+    private String fExpected;
  11
+    private String fActual;
  12
+    private int fPrefix;
  13
+    private int fSuffix;
20 14
 
21  
-	public String compact(String message) {
22  
-		if (fExpected == null || fActual == null || areStringsEqual())
23  
-			return Assert.format(message, fExpected, fActual);
  15
+    public ComparisonCompactor(int contextLength, String expected, String actual) {
  16
+        fContextLength = contextLength;
  17
+        fExpected = expected;
  18
+        fActual = actual;
  19
+    }
24 20
 
25