Skip to content

Commit 4843cec

Browse files
committed
ST6RI-795 Added KerML Xpect tests for diamond redefinition.
1 parent d9ecb1f commit 4843cec

4 files changed

Lines changed: 156 additions & 0 deletions

File tree

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
//*
2+
XPECT_SETUP org.omg.kerml.xpect.tests.validation.KerMLValidationTest
3+
ResourceSet {
4+
ThisFile {}
5+
File {from ="/library/Base.kerml"}
6+
File {from ="/library/Occurrences.kerml"}
7+
File {from ="/library/Objects.kerml"}
8+
File {from ="/library/Performances.kerml"}
9+
}
10+
Workspace {
11+
JavaProject {
12+
SrcFolder {
13+
ThisFile {}
14+
File {from ="/library/Base.kerml"}
15+
File {from ="/library/Occurrences.kerml"}
16+
File {from ="/library/Objects.kerml"}
17+
File {from ="/library/Performances.kerml"}
18+
}
19+
}
20+
}
21+
END_SETUP
22+
*/
23+
package RedefinitionDiamond {
24+
feature A {
25+
feature p[*];
26+
}
27+
feature A1 :> A {
28+
p1 :>> p;
29+
}
30+
feature A2 :> A {
31+
// p :>> p; // 1
32+
}
33+
34+
feature B :> A1, A2 {
35+
// p2 :>> p1; // 2
36+
// XPECT noErrors ---> ""
37+
feature p;
38+
}
39+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
//*
2+
XPECT_SETUP org.omg.kerml.xpect.tests.validation.KerMLValidationTest
3+
ResourceSet {
4+
ThisFile {}
5+
File {from ="/library/Base.kerml"}
6+
File {from ="/library/Occurrences.kerml"}
7+
File {from ="/library/Objects.kerml"}
8+
File {from ="/library/Performances.kerml"}
9+
}
10+
Workspace {
11+
JavaProject {
12+
SrcFolder {
13+
ThisFile {}
14+
File {from ="/library/Base.kerml"}
15+
File {from ="/library/Occurrences.kerml"}
16+
File {from ="/library/Objects.kerml"}
17+
File {from ="/library/Performances.kerml"}
18+
}
19+
}
20+
}
21+
END_SETUP
22+
*/
23+
package RedefinitionDiamond {
24+
feature A {
25+
feature p[*];
26+
}
27+
feature A1 :> A {
28+
p1 :>> p;
29+
}
30+
feature A2 :> A {
31+
p :>> p; // 1
32+
}
33+
34+
feature B :> A1, A2 {
35+
p2 :>> p1; // 2
36+
// XPECT noErrors ---> ""
37+
feature p;
38+
}
39+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
//*
2+
XPECT_SETUP org.omg.kerml.xpect.tests.validation.KerMLValidationTest
3+
ResourceSet {
4+
ThisFile {}
5+
File {from ="/library/Base.kerml"}
6+
File {from ="/library/Occurrences.kerml"}
7+
File {from ="/library/Objects.kerml"}
8+
File {from ="/library/Performances.kerml"}
9+
}
10+
Workspace {
11+
JavaProject {
12+
SrcFolder {
13+
ThisFile {}
14+
File {from ="/library/Base.kerml"}
15+
File {from ="/library/Occurrences.kerml"}
16+
File {from ="/library/Objects.kerml"}
17+
File {from ="/library/Performances.kerml"}
18+
}
19+
}
20+
}
21+
END_SETUP
22+
*/
23+
package RedefinitionDiamond {
24+
feature A {
25+
feature p[*];
26+
}
27+
feature A1 :> A {
28+
p1 :>> p;
29+
}
30+
feature A2 :> A {
31+
// p :>> p; // 1
32+
}
33+
34+
feature B :> A1, A2 {
35+
p2 :>> p1; // 2
36+
// XPECT noErrors ---> ""
37+
feature p;
38+
}
39+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
//*
2+
XPECT_SETUP org.omg.kerml.xpect.tests.validation.KerMLValidationTest
3+
ResourceSet {
4+
ThisFile {}
5+
File {from ="/library/Base.kerml"}
6+
File {from ="/library/Occurrences.kerml"}
7+
File {from ="/library/Objects.kerml"}
8+
File {from ="/library/Performances.kerml"}
9+
}
10+
Workspace {
11+
JavaProject {
12+
SrcFolder {
13+
ThisFile {}
14+
File {from ="/library/Base.kerml"}
15+
File {from ="/library/Occurrences.kerml"}
16+
File {from ="/library/Objects.kerml"}
17+
File {from ="/library/Performances.kerml"}
18+
}
19+
}
20+
}
21+
END_SETUP
22+
*/
23+
package RedefinitionDiamond {
24+
feature A {
25+
feature p[*];
26+
}
27+
feature A1 :> A {
28+
p1 :>> p;
29+
}
30+
feature A2 :> A {
31+
p :>> p; // 1
32+
}
33+
34+
feature B :> A1, A2 {
35+
// p2 :>> p1; // 2
36+
// XPECT warnings ---> "Duplicate of inherited member name" at "p"
37+
feature p;
38+
}
39+
}

0 commit comments

Comments
 (0)