Echtzeitsysteme / java-refactoring-ttc

Object-oriented Refactoring of Java Programs using Graph Transformation (TTC'2015)
0 stars 0 forks source link

Wrong assertion in hidden_csc2_1 #30

Closed tsdh closed 9 years ago

tsdh commented 9 years ago

This CSR refactoring tries applyCreateSuperClass([hidden.program.two.ChildClass1, hidden.program.two.ChildClass2], hidden.program.two.NewParent) which cannot work because ChildClass1 has ParentClass as superclass while ChildClass2 doesn't. Therefore, my transformation doesn't apply that refactoring and the sources stay unchanged.

But the assertions still want the refactoring to have taken place:

Executing hidden test case: "hidden_csc2_1"
    Description:
        Have a look on inheritance relations.

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)
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

ssssssssssss  Triggering Extract Superclass Refactoring ssssssssssss
applyCreateSuperClass([hidden.program.two.ChildClass1, hidden.program.two.ChildClass2], hidden.program.two.NewParent)
The create-superclass rule didn't match!
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss

ssssssssssss  Triggering Synchronization with Java Code ssssssssssss
Deleting folder /home/horn/tmp/JR/not_executable_exs_1-before
Copying /tmp/tmp_ttc/hiddenProgram2 to /home/horn/tmp/JR/not_executable_exs_1-before
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
Deleting folder /home/horn/tmp/JR/not_executable_exs_1-after
Copying /tmp/tmp_ttc/hiddenProgram2 to /home/horn/tmp/JR/not_executable_exs_1-after
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss

FAILURE: Extension of "hidden.program.two.NewParent" expected but "hidden.program.two.ParentClass" has been extended. (false-negative) 

    Output of execution after refactoring:
        k=3
        k=3

SUCCESS: Output before and after refactoring are equal.
SvenPeldszus commented 9 years ago

Ok, I think at some point I changed the wrong files

SvenPeldszus commented 9 years ago

I've pushed now a correct version

tsdh commented 9 years ago

This one works now.