--- a/src/test/scala/SparqlToSparqlTest.scala Wed Jun 16 12:10:41 2010 -0700
+++ b/src/test/scala/SparqlToSparqlTest.scala Wed Jun 16 14:04:16 2010 -0700
@@ -216,7 +216,7 @@
assert(transformed === expected)
}
- test("reaches") {
+ test("reaches0") {
val graph = Set[(String,String)](
("a", "b"),
("c", "a"),
@@ -226,13 +226,14 @@
("e", "f"))
val r0 = new w3c.sw.util.GraphAnalyzer[String](Map[String, Set[String]]())
val r = graph.foldLeft(r0)((r, pair) => r.pair(pair._1, pair._2))
- println("r: " + r0)
val useful = graph.foldLeft(Set[(String,String)]())((s, pair) => {
if (r.neededFor(Set("a", "f"), pair._1, Set(pair._2)) &&
r.neededFor(Set("a", "f"), pair._2, Set(pair._1))) s + pair
else s
})
- println("of interest: " + useful)
+ val expected = Set[(String,String)](
+ ("e","f"), ("c","a"), ("e","a"), ("c","e"))
+ assert(expected === useful)
}
test("XXX") { // ~/swobjects/tests/healthCare/lists-notBound/hl7.rq short