Closed tsdh closed 9 years ago
Yes, you are right I think at this point we switched the assertions with the refactoring you had problems with before.
I've fixt it.
Now I get this output:
Executing hidden test case: "hidden_pum2_2"
Description:
Do method calls confuse your solution?
SUCCESS: The java program has been compiled.
Output of execution before refactoring:
k=3
k=3
sssssssssssssss Triggering Program Graph Generation ssssssssssssssss
createProgramGraph(/tmp/tmp_ttc/hiddenProgram2)
Deleting folder /home/horn/tmp/JR
Copying program to /home/horn/tmp/JR/hiddenProgram2
Parsing file /tmp/tmp_ttc/hiddenProgram2/src/hidden/program/two/ParentClass.java... Done
Parsing file /tmp/tmp_ttc/hiddenProgram2/src/hidden/program/two/ChildClass3.java... Done
Parsing file /tmp/tmp_ttc/hiddenProgram2/src/hidden/program/two/ChildClass2.java... Done
Parsing file /tmp/tmp_ttc/hiddenProgram2/src/hidden/program/two/ChildClass1.java... Done
Base-package is hidden
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
ssssssssssssss Triggering Pull-Up Method Refactoring ssssssssssssss
applyPullUpMethod(hidden.program.two.ParentClass, second)
The rule didn't match!
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
ssssssssssss Triggering Synchronization with Java Code ssssssssssss
synchronizeChanges(): 0 changes to be applied
Saving resource to /tmp/tmp_ttc/hiddenProgram2/src/hidden/program/two/ParentClass.java
Saving resource to /tmp/tmp_ttc/hiddenProgram2/src/hidden/program/two/ChildClass3.java
Saving resource to /tmp/tmp_ttc/hiddenProgram2/src/hidden/program/two/ChildClass2.java
Saving resource to /tmp/tmp_ttc/hiddenProgram2/src/hidden/program/two/ChildClass1.java
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
SUCCESS: This static check whether a class contains a specific method or field was successful.
FAILURE: Containment of element expected but is not contained. (false-negative)
Output of execution after refactoring:
k=3
k=3
SUCCESS: Output before and after refactoring are equal.
--------------------------------------------------------------------
FAILURE: Test case "hidden_pum2_2" has not been executed successfully.
The solution needed 0.029 seconds for execution.
--------------------------------------------------------------------
So now I get a SUCCESS because my rule doesn't match. None of the Java sources are modified. But why do I still get a FAILURE: Containment of element expected but is not contained. (false-negative)
?
Sorry, I introduced a new typo last time I edited the test case.
I've now reviewed all test cases and have hopefully detected all remaining mistakes.
I think I found another one. I'll open a separate issue for that.
Ah, no. Error on my side. ;-)
This test tries
applyPullUpMethod(hidden.program.two.ParentClass, second)
.ParentClass
has the subclassesChildClass1
andChildClass3
but onlyChildClass1
has a methodsecond()
.ChildClass2
also has asecond()
method but it is no subclass ofParentClass
.Shouldn't the PUM refactoring only be applicable if all subclasses have a declaration of the method to be pulled up?