Skip to content

Commit

Permalink
Adding xpect tests for cyclic hierachy
Browse files Browse the repository at this point in the history
  • Loading branch information
fdodino committed Apr 21, 2017
1 parent 763b7aa commit 411951e
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/* XPECT_SETUP org.uqbar.project.wollok.tests.xpect.WollokXPectTest END_SETUP */

// XPECT errors --> "Infinite Cycle hierarchy" at "B"
class A inherits B { }

// XPECT errors --> "Infinite Cycle hierarchy" at "A"
class B inherits A { }

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/* XPECT_SETUP org.uqbar.project.wollok.tests.xpect.WollokXPectTest END_SETUP */

// XPECT errors --> "Infinite Cycle hierarchy" at "B"
class A inherits B { }

// XPECT errors --> "Infinite Cycle hierarchy" at "C"
class B inherits C { }

// XPECT errors --> "Infinite Cycle hierarchy" at "E"
class C inherits E { }

// XPECT errors --> "Infinite Cycle hierarchy" at "A"
class E inherits A { }
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
/* XPECT_SETUP org.uqbar.project.wollok.tests.xpect.WollokXPectTest END_SETUP */

// XPECT errors --> "Infinite Cycle hierarchy" at "class A inherits B { }"
class A inherits B { }

// XPECT errors --> "Infinite Cycle hierarchy" at "class B inherits A { }"
class B inherits A { }
// XPECT errors --> "Infinite Cycle hierarchy" at "B"
class B inherits B { }
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,6 @@ class WollokDslValidator extends AbstractConfigurableDslValidator {
@DefaultSeverity(ERROR)
def cyclicHierarchy(WMethodContainer it) {
if (declaringContext.hasCyclicHierarchy) {
println("Lanzo error con " + it)
report(WollokDslValidator_CYCLIC_HIERARCHY, it, WCLASS__PARENT)
}
}
Expand Down

0 comments on commit 411951e

Please sign in to comment.