diff options
| author | Federico Igne <federico.igne@cs.ox.ac.uk> | 2020-12-02 18:47:49 +0000 |
|---|---|---|
| committer | Federico Igne <federico.igne@cs.ox.ac.uk> | 2020-12-02 18:47:49 +0000 |
| commit | 91de03f187f298004d90708c5815e86134b10eae (patch) | |
| tree | 6b027414dba598859c5f27740e7a30799308b38e /src/test/scala/uk/ac/ox/cs | |
| parent | bb2fe6440ea4f7e7aeca037c4a4351a28aac3a9f (diff) | |
| download | RSAComb-91de03f187f298004d90708c5815e86134b10eae.tar.gz RSAComb-91de03f187f298004d90708c5815e86134b10eae.zip | |
Make filtering program generate/load facts as facts
Diffstat (limited to 'src/test/scala/uk/ac/ox/cs')
| -rw-r--r-- | src/test/scala/uk/ac/ox/cs/rsacomb/FilteringProgramSpecs.scala | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/test/scala/uk/ac/ox/cs/rsacomb/FilteringProgramSpecs.scala b/src/test/scala/uk/ac/ox/cs/rsacomb/FilteringProgramSpecs.scala index 71c9a99..86e0253 100644 --- a/src/test/scala/uk/ac/ox/cs/rsacomb/FilteringProgramSpecs.scala +++ b/src/test/scala/uk/ac/ox/cs/rsacomb/FilteringProgramSpecs.scala | |||
| @@ -65,24 +65,32 @@ class FilteringProgramSpec extends AnyFlatSpec with Matchers { | |||
| 65 | 65 | ||
| 66 | import FilteringProgramSpec._ | 66 | import FilteringProgramSpec._ |
| 67 | 67 | ||
| 68 | "CQ 0" should "generate 30 rules" in { | 68 | "CQ 0" should "generate 27 rules and 3 facts" in { |
| 69 | val cq = ConjunctiveQuery(cq0).get | 69 | val cq = ConjunctiveQuery(cq0).get |
| 70 | FilteringProgram(cq, constants).rules should have length 30 | 70 | val filter = FilteringProgram(cq, constants) |
| 71 | filter.facts should have length 3 | ||
| 72 | filter.rules should have length 27 | ||
| 71 | } | 73 | } |
| 72 | 74 | ||
| 73 | "CQ 1" should "generate 15 rules" in { | 75 | "CQ 1" should "generate 15 rules" in { |
| 74 | val cq = ConjunctiveQuery(cq1).get | 76 | val cq = ConjunctiveQuery(cq1).get |
| 75 | FilteringProgram(cq, List()).rules should have length 15 | 77 | val filter = FilteringProgram(cq, List()) |
| 78 | filter.facts shouldBe empty | ||
| 79 | filter.rules should have length 15 | ||
| 76 | } | 80 | } |
| 77 | 81 | ||
| 78 | "CQ 2" should "generate 51 rules" in { | 82 | "CQ 2" should "generate 51 rules" in { |
| 79 | val cq = ConjunctiveQuery(cq2).get | 83 | val cq = ConjunctiveQuery(cq2).get |
| 80 | FilteringProgram(cq, List()).rules should have length 51 | 84 | val filter = FilteringProgram(cq, List()) |
| 85 | filter.facts shouldBe empty | ||
| 86 | filter.rules should have length 51 | ||
| 81 | } | 87 | } |
| 82 | 88 | ||
| 83 | "BCQ 0" should "generate 46 rules" in { | 89 | "BCQ 0" should "generate 46 rules" in { |
| 84 | val cq = ConjunctiveQuery(bcq0).get | 90 | val cq = ConjunctiveQuery(bcq0).get |
| 85 | FilteringProgram(cq, constants).rules should have length 46 | 91 | val filter = FilteringProgram(cq, constants) |
| 92 | filter.facts should have length 3 | ||
| 93 | filter.rules should have length 43 | ||
| 86 | } | 94 | } |
| 87 | 95 | ||
| 88 | } | 96 | } |
