diff options
author | 2019-05-09 09:28:40 -0400 | |
---|---|---|
committer | 2019-05-09 09:28:40 -0400 | |
commit | 94a7e721fba3c3bf6bcda75cde474e21c5afdf39 (patch) | |
tree | b8d1789201dbc58dabec53e45a971e588183ce47 /Tests/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.tests/src/hu | |
parent | Interval comparison (diff) | |
download | VIATRA-Generator-94a7e721fba3c3bf6bcda75cde474e21c5afdf39.tar.gz VIATRA-Generator-94a7e721fba3c3bf6bcda75cde474e21c5afdf39.tar.zst VIATRA-Generator-94a7e721fba3c3bf6bcda75cde474e21c5afdf39.zip |
Fix interval join
Diffstat (limited to 'Tests/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.tests/src/hu')
-rw-r--r-- | Tests/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.tests/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/tests/interval/RelationTest.xtend | 150 |
1 files changed, 78 insertions, 72 deletions
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.tests/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/tests/interval/RelationTest.xtend b/Tests/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.tests/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/tests/interval/RelationTest.xtend index 23fc69ea..5527fbaa 100644 --- a/Tests/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.tests/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/tests/interval/RelationTest.xtend +++ b/Tests/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.tests/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/tests/interval/RelationTest.xtend | |||
@@ -16,78 +16,78 @@ class RelationTest { | |||
16 | @Parameters(name = "{index}: {0} <> {1}") | 16 | @Parameters(name = "{index}: {0} <> {1}") |
17 | static def Collection<Object[]> data() { | 17 | static def Collection<Object[]> data() { |
18 | #[ | 18 | #[ |
19 | #[EMPTY, EMPTY, true, false, true, false], | 19 | #[EMPTY, EMPTY, true, false, true, false, EMPTY], |
20 | #[EMPTY, between(1, 2), true, false, true, false], | 20 | #[EMPTY, between(1, 2), true, false, true, false, between(1, 2)], |
21 | #[between(1, 2), EMPTY, true, false, true, false], | 21 | #[between(1, 2), EMPTY, true, false, true, false, between(1, 2)], |
22 | #[upTo(1), upTo(0), false, true, false, true], | 22 | #[upTo(1), upTo(0), false, true, false, true, upTo(1)], |
23 | #[upTo(1), upTo(1), false, true, false, true], | 23 | #[upTo(1), upTo(1), false, true, false, true, upTo(1)], |
24 | #[upTo(1), upTo(2), false, true, false, true], | 24 | #[upTo(1), upTo(2), false, true, false, true, upTo(2)], |
25 | #[upTo(1), above(0), false, true, false, true], | 25 | #[upTo(1), above(0), false, true, false, true, UNBOUNDED], |
26 | #[upTo(1), above(1), false, true, false, true], | 26 | #[upTo(1), above(1), false, true, false, true, UNBOUNDED], |
27 | #[upTo(1), above(2), false, false, true, true], | 27 | #[upTo(1), above(2), false, false, true, true, UNBOUNDED], |
28 | #[upTo(1), between(-1, -1), false, true, false, true], | 28 | #[upTo(1), between(-1, -1), false, true, false, true, upTo(1)], |
29 | #[upTo(1), between(-1, 0), false, true, false, true], | 29 | #[upTo(1), between(-1, 0), false, true, false, true, upTo(1)], |
30 | #[upTo(1), between(-1, 1), false, true, false, true], | 30 | #[upTo(1), between(-1, 1), false, true, false, true, upTo(1)], |
31 | #[upTo(1), between(-1, 2), false, true, false, true], | 31 | #[upTo(1), between(-1, 2), false, true, false, true, upTo(2)], |
32 | #[upTo(1), between(1, 1), false, true, false, true], | 32 | #[upTo(1), between(1, 1), false, true, false, true, upTo(1)], |
33 | #[upTo(1), between(1, 2), false, true, false, true], | 33 | #[upTo(1), between(1, 2), false, true, false, true, upTo(2)], |
34 | #[upTo(1), between(2, 2), false, false, true, true], | 34 | #[upTo(1), between(2, 2), false, false, true, true, upTo(2)], |
35 | #[upTo(1), between(2, 3), false, false, true, true], | 35 | #[upTo(1), between(2, 3), false, false, true, true, upTo(3)], |
36 | #[above(1), upTo(0), false, false, false, false], | 36 | #[above(1), upTo(0), false, false, false, false, UNBOUNDED], |
37 | #[above(1), upTo(1), false, true, false, false], | 37 | #[above(1), upTo(1), false, true, false, false, UNBOUNDED], |
38 | #[above(1), upTo(2), false, true, false, true], | 38 | #[above(1), upTo(2), false, true, false, true, UNBOUNDED], |
39 | #[above(1), above(0), false, true, false, true], | 39 | #[above(1), above(0), false, true, false, true, above(0)], |
40 | #[above(1), above(1), false, true, false, true], | 40 | #[above(1), above(1), false, true, false, true, above(1)], |
41 | #[above(1), above(2), false, true, false, true], | 41 | #[above(1), above(2), false, true, false, true, above(1)], |
42 | #[above(1), between(-1, -1), false, false, false, false], | 42 | #[above(1), between(-1, -1), false, false, false, false, above(-1)], |
43 | #[above(1), between(-1, 0), false, false, false, false], | 43 | #[above(1), between(-1, 0), false, false, false, false, above(-1)], |
44 | #[above(1), between(-1, 1), false, true, false, false], | 44 | #[above(1), between(-1, 1), false, true, false, false, above(-1)], |
45 | #[above(1), between(-1, 2), false, true, false, true], | 45 | #[above(1), between(-1, 2), false, true, false, true, above(-1)], |
46 | #[above(1), between(1, 1), false, true, false, false], | 46 | #[above(1), between(1, 1), false, true, false, false, above(1)], |
47 | #[above(1), between(1, 2), false, true, false, true], | 47 | #[above(1), between(1, 2), false, true, false, true, above(1)], |
48 | #[above(1), between(2, 2), false, true, false, true], | 48 | #[above(1), between(2, 2), false, true, false, true, above(1)], |
49 | #[above(1), between(2, 3), false, true, false, true], | 49 | #[above(1), between(2, 3), false, true, false, true, above(1)], |
50 | #[between(1, 1), upTo(0), false, false, false, false], | 50 | #[between(1, 1), upTo(0), false, false, false, false, upTo(1)], |
51 | #[between(1, 1), upTo(1), false, true, false, false], | 51 | #[between(1, 1), upTo(1), false, true, false, false, upTo(1)], |
52 | #[between(1, 1), upTo(2), false, true, false, true], | 52 | #[between(1, 1), upTo(2), false, true, false, true, upTo(2)], |
53 | #[between(1, 1), above(0), false, true, false, true], | 53 | #[between(1, 1), above(0), false, true, false, true, above(0)], |
54 | #[between(1, 1), above(1), false, true, false, true], | 54 | #[between(1, 1), above(1), false, true, false, true, above(1)], |
55 | #[between(1, 1), above(2), false, false, true, true], | 55 | #[between(1, 1), above(2), false, false, true, true, above(1)], |
56 | #[between(1, 1), between(-1, -1), false, false, false, false], | 56 | #[between(1, 1), between(-1, -1), false, false, false, false, between(-1, 1)], |
57 | #[between(1, 1), between(-1, 0), false, false, false, false], | 57 | #[between(1, 1), between(-1, 0), false, false, false, false, between(-1, 1)], |
58 | #[between(1, 1), between(-1, 1), false, true, false, false], | 58 | #[between(1, 1), between(-1, 1), false, true, false, false, between(-1, 1)], |
59 | #[between(1, 1), between(-1, 2), false, true, false, true], | 59 | #[between(1, 1), between(-1, 2), false, true, false, true, between(-1, 2)], |
60 | #[between(1, 1), between(1, 1), true, true, false, false], | 60 | #[between(1, 1), between(1, 1), true, true, false, false, between(1, 1)], |
61 | #[between(1, 1), between(1, 2), false, true, false, true], | 61 | #[between(1, 1), between(1, 2), false, true, false, true, between(1, 2)], |
62 | #[between(1, 1), between(2, 2), false, false, true, true], | 62 | #[between(1, 1), between(2, 2), false, false, true, true, between(1, 2)], |
63 | #[between(1, 1), between(2, 3), false, false, true, true], | 63 | #[between(1, 1), between(2, 3), false, false, true, true, between(1, 3)], |
64 | #[between(-1, 1), upTo(-2), false, false, false, false], | 64 | #[between(-1, 1), upTo(-2), false, false, false, false, upTo(1)], |
65 | #[between(-1, 1), upTo(-1), false, true, false, false], | 65 | #[between(-1, 1), upTo(-1), false, true, false, false, upTo(1)], |
66 | #[between(-1, 1), upTo(0), false, true, false, true], | 66 | #[between(-1, 1), upTo(0), false, true, false, true, upTo(1)], |
67 | #[between(-1, 1), upTo(1), false, true, false, true], | 67 | #[between(-1, 1), upTo(1), false, true, false, true, upTo(1)], |
68 | #[between(-1, 1), upTo(2), false, true, false, true], | 68 | #[between(-1, 1), upTo(2), false, true, false, true, upTo(2)], |
69 | #[between(-1, 1), above(-2), false, true, false, true], | 69 | #[between(-1, 1), above(-2), false, true, false, true, above(-2)], |
70 | #[between(-1, 1), above(-1), false, true, false, true], | 70 | #[between(-1, 1), above(-1), false, true, false, true, above(-1)], |
71 | #[between(-1, 1), above(0), false, true, false, true], | 71 | #[between(-1, 1), above(0), false, true, false, true, above(-1)], |
72 | #[between(-1, 1), above(1), false, true, false, true], | 72 | #[between(-1, 1), above(1), false, true, false, true, above(-1)], |
73 | #[between(-1, 1), above(2), false, false, true, true], | 73 | #[between(-1, 1), above(2), false, false, true, true, above(-1)], |
74 | #[between(-1, 1), between(-3, -2), false, false, false, false], | 74 | #[between(-1, 1), between(-3, -2), false, false, false, false, between(-3, 1)], |
75 | #[between(-1, 1), between(-2, -2), false, false, false, false], | 75 | #[between(-1, 1), between(-2, -2), false, false, false, false, between(-2, 1)], |
76 | #[between(-1, 1), between(-2, -1), false, true, false, false], | 76 | #[between(-1, 1), between(-2, -1), false, true, false, false, between(-2, 1)], |
77 | #[between(-1, 1), between(-2, 0), false, true, false, true], | 77 | #[between(-1, 1), between(-2, 0), false, true, false, true, between(-2, 1)], |
78 | #[between(-1, 1), between(-2, 1), false, true, false, true], | 78 | #[between(-1, 1), between(-2, 1), false, true, false, true, between(-2, 1)], |
79 | #[between(-1, 1), between(-2, 2), false, true, false, true], | 79 | #[between(-1, 1), between(-2, 2), false, true, false, true, between(-2, 2)], |
80 | #[between(-1, 1), between(-1, -1), false, true, false, false], | 80 | #[between(-1, 1), between(-1, -1), false, true, false, false, between(-1, 1)], |
81 | #[between(-1, 1), between(-1, 0), false, true, false, true], | 81 | #[between(-1, 1), between(-1, 0), false, true, false, true, between(-1, 1)], |
82 | #[between(-1, 1), between(-1, 1), false, true, false, true], | 82 | #[between(-1, 1), between(-1, 1), false, true, false, true, between(-1, 1)], |
83 | #[between(-1, 1), between(-1, 2), false, true, false, true], | 83 | #[between(-1, 1), between(-1, 2), false, true, false, true, between(-1, 2)], |
84 | #[between(-1, 1), between(0, 0), false, true, false, true], | 84 | #[between(-1, 1), between(0, 0), false, true, false, true, between(-1, 1)], |
85 | #[between(-1, 1), between(0, 1), false, true, false, true], | 85 | #[between(-1, 1), between(0, 1), false, true, false, true, between(-1, 1)], |
86 | #[between(-1, 1), between(0, 2), false, true, false, true], | 86 | #[between(-1, 1), between(0, 2), false, true, false, true, between(-1, 2)], |
87 | #[between(-1, 1), between(1, 1), false, true, false, true], | 87 | #[between(-1, 1), between(1, 1), false, true, false, true, between(-1, 1)], |
88 | #[between(-1, 1), between(1, 2), false, true, false, true], | 88 | #[between(-1, 1), between(1, 2), false, true, false, true, between(-1, 2)], |
89 | #[between(-1, 1), between(2, 2), false, false, true, true], | 89 | #[between(-1, 1), between(2, 2), false, false, true, true, between(-1, 2)], |
90 | #[between(-1, 1), between(2, 3), false, false, true, true] | 90 | #[between(-1, 1), between(2, 3), false, false, true, true, between(-1, 3)] |
91 | ] | 91 | ] |
92 | } | 92 | } |
93 | 93 | ||
@@ -97,6 +97,7 @@ class RelationTest { | |||
97 | @Parameter(3) public var boolean mayEqual | 97 | @Parameter(3) public var boolean mayEqual |
98 | @Parameter(4) public var boolean mustBeLessThan | 98 | @Parameter(4) public var boolean mustBeLessThan |
99 | @Parameter(5) public var boolean mayBeLessThan | 99 | @Parameter(5) public var boolean mayBeLessThan |
100 | @Parameter(6) public var Interval join | ||
100 | 101 | ||
101 | @Test | 102 | @Test |
102 | def void mustEqualTest() { | 103 | def void mustEqualTest() { |
@@ -117,4 +118,9 @@ class RelationTest { | |||
117 | def void mayBeLessThanTest() { | 118 | def void mayBeLessThanTest() { |
118 | Assert.assertEquals(mayBeLessThan, a.mayBeLessThan(b)) | 119 | Assert.assertEquals(mayBeLessThan, a.mayBeLessThan(b)) |
119 | } | 120 | } |
121 | |||
122 | @Test | ||
123 | def void joinTest() { | ||
124 | Assert.assertEquals(join, a.join(b)) | ||
125 | } | ||
120 | } | 126 | } |