Closed reprogrammer closed 13 years ago
The test under consideration is /edu.illinois.codingspectator.ui.tests/src/edu/illinois/codingspectator/ui/tests/move/T04.java
When the test project is deleted, a new problems log is created. This is because, the delete triggers an undoable operation history. For now, I've commented out the check for checking if the log doesn't exist.
Is it alright to let the test pass if the refactoring error log is empty in the sense that afterMinusBefore and beforeMinusAfter is empty?
Please wait. I broke something. Fixing it.
@rajkuma1: Can you explain more what has broken?
java.lang.AssertionError: at org.junit.Assert.fail(Assert.java:91) at org.junit.Assert.assertTrue(Assert.java:43) at org.junit.Assert.assertFalse(Assert.java:68) at org.junit.Assert.assertFalse(Assert.java:79) at edu.illinois.codingspectator.ui.tests.RefactoringProblemsChecker.assertLogIsEmpty(RefactoringProblemsChecker.java:36) at edu.illinois.codingspectator.ui.tests.RefactoringTest.doRefactoringLogShouldBeEmpty(RefactoringTest.java:103) at edu.illinois.codingspectator.ui.tests.RefactoringTest.deleteCurrentProject(RefactoringTest.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.swtbot.eclipse.core.RemotePluginTestRunner.main(RemotePluginTestRunner.java:64) at org.eclipse.swtbot.eclipse.core.UITestApplication.runTests(UITestApplication.java:117) at org.eclipse.ui.internal.testing.WorkbenchTestable$1.run(WorkbenchTestable.java:71) at java.lang.Thread.run(Thread.java:662)
Checked the refactoring problems log of test move.T04
in f46b9c9d9734e751bd7e825e3b5097df33855bc8.
CodingSpectator captures both the changes to compilation problems due to refactorings. But, the automated tests do not check for the correctness of these log files. We need to extend the automated tests to check if an expected file is provided for these logs. If such an expected file is provided, the automated tests should check it against the actual log.