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_csc1_2 #28

Closed tsdh closed 9 years ago

tsdh commented 9 years ago

In this test, applyCreateSuperClass([hidden.program.one.ChildClass1, hidden.program.one.ChildClass2], hidden.program.one.NewParent) is done where ChildClass1 and ChildClass2 already have an existing parent ParentClass. Thus my transformation creates NewParent as new parent of ChildClass1 and ChildClass2, and NewParent's parent is ParentClass thereafter.

However, ARTE wants that refactoring to fail which seems strange since csr.getName() returns executable_exs_1, i.e., you've named it in a way that indicates that is should be executable.

ssssssssssss  Triggering Extract Superclass Refactoring ssssssssssss
applyCreateSuperClass([hidden.program.one.ChildClass1, hidden.program.one.ChildClass2], hidden.program.one.NewParent)
Creating new superclass hidden.program.one.NewParent with parenthidden.program.one.ParentClass
The create-superclass rule did match!
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss

FAILURE: Execution of refactoring has been expected to FAIL. (false-positive)
SvenPeldszus commented 9 years ago

You are right, the is a mistake instead of executable_exs_1 the refactoring not_executable_exs_1 should be assigned.

tsdh commented 9 years ago

Did you intend to fix this issue with https://github.com/Echtzeitsysteme/java-refactoring-ttc/commit/aea421a7716baa0cd6497c3707039cc51f0d5b44? If so, it hasn't worked. Still executable_exs_1 is assigned.

Executing hidden test case: "hidden_csc1_2"
    Description:
        Check which elements already exist.

SUCCESS: The java program has been compiled.

    Output of execution before refactoring:
        Field: I am a field
        Method: Hello World!I am a field

sssssssssssssss Triggering Program Graph Generation ssssssssssssssss
createProgramGraph(/tmp/tmp_ttc/hiddenProgram1)
Parsing file /tmp/tmp_ttc/hiddenProgram1/src/hidden/program/one/ParentClass.java... Done
Parsing file /tmp/tmp_ttc/hiddenProgram1/src/hidden/program/one/ExistingClass.java... Done
Parsing file /tmp/tmp_ttc/hiddenProgram1/src/hidden/program/one/ChildClass2.java... Done
Parsing file /tmp/tmp_ttc/hiddenProgram1/src/hidden/program/one/ChildClass1.java... Done
Base-package is hidden
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss

ssssssssssss  Triggering Extract Superclass Refactoring ssssssssssss
applyCreateSuperClass([hidden.program.one.ChildClass1, hidden.program.one.ChildClass2], hidden.program.one.NewParent)
Creating new superclass hidden.program.one.NewParent with parenthidden.program.one.ParentClass
The create-superclass rule did match!
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss

FAILURE: Execution of refactoring has been expected to FAIL. (false-positive)
ssssssssssss  Triggering Synchronization with Java Code ssssssssssss
Deleting folder /home/horn/tmp/JR/executable_exs_1-before
Copying /tmp/tmp_ttc/hiddenProgram1 to /home/horn/tmp/JR/executable_exs_1-before
synchronizeChanges(): 1 changes to be applied
Saving resource to /tmp/tmp_ttc/hiddenProgram1/src/hidden/program/one/ParentClass.java
Saving resource to /tmp/tmp_ttc/hiddenProgram1/src/hidden/program/one/ExistingClass.java
Saving resource to /tmp/tmp_ttc/hiddenProgram1/src/hidden/program/one/ChildClass2.java
Saving resource to /tmp/tmp_ttc/hiddenProgram1/src/hidden/program/one/ChildClass1.java
Saving resource to /tmp/tmp_ttc/hiddenProgram1/src/hidden/program/one/NewParent.java
Deleting folder /home/horn/tmp/JR/executable_exs_1-after
Copying /tmp/tmp_ttc/hiddenProgram1 to /home/horn/tmp/JR/executable_exs_1-after
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss

    Output of execution after refactoring:
        Field: I am a field
        Method: Hello World!I am a field

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

At the moment I am a bit in confusion.

Currently I am carefully checking every thing to stop creating new errors.

SvenPeldszus commented 9 years ago

Ok, I missed to push the fix for this test case

tsdh commented 9 years ago

Works now.