3839404142434445464748
@Test public void match_01() { StatsMatcher matcher = matcher("((:x :p ANY) 5)") ; Triple t = triple("(:x :p ?v)") ; double d = matcher.match(t) ; assertEquals(5.0, d, 0) ; } @Test public void match_02() {
4647484950515253545556
@Test public void match_02() { StatsMatcher matcher = matcher("((:x :p ANY) 5)") ; Triple t = triple("(:x :q ?v)") ; // No match double d = matcher.match(t) ; assertEquals(-1, d, 0) ; } @Test public void match_03() {
5455565758596061626364
@Test public void match_03() { StatsMatcher matcher = matcher("((:x :p VAR) 5)") ; Triple t = triple("(:x :p ?v)") ; double d = matcher.match(t) ; assertEquals(5, d, 0) ; } @Test public void match_04() {
6263646566676869707172
@Test public void match_04() { StatsMatcher matcher = matcher("((TERM :p VAR) 5)") ; Triple t = triple("(:x :p ?v)") ; double d = matcher.match(t) ; assertEquals(5, d, 0) ; } @Test public void match_05() {
7071727374757677787980
@Test public void match_05() { StatsMatcher matcher = matcher("((URI :p VAR) 5)") ; Triple t = triple("(:x :p ?v)") ; double d = matcher.match(t) ; assertEquals(5, d, 0) ; } @Test public void match_06() {
7879808182838485868788
@Test public void match_06() { StatsMatcher matcher = matcher("((LITERAL :p VAR) 5)") ; Triple t = triple("(:x :p ?v)") ; // No match double d = matcher.match(t) ; assertEquals(-1, d, 0) ; } @Test public void match_07() {
8687888990919293949596
@Test public void match_07() { StatsMatcher matcher = matcher("((BNODE :p VAR) 5)") ; Triple t = triple("(_:a :p ?v)") ; double d = matcher.match(t) ; assertEquals(5, d, 0) ; } @Test public void match_08() {
949596979899100101102103104
@Test public void match_08() { StatsMatcher matcher = matcher("((VAR :p LITERAL) 5)") ; Triple t = triple("(?x :p ?v)") ; // No match double d = matcher.match(t) ; assertEquals(-1, d, 0) ; } @Test public void match_09() {
102103104105106107108109110111112
@Test public void match_09() { StatsMatcher matcher = matcher("((VAR :p LITERAL) 5)") ; Triple t = triple("(?x :p 1913)") ; double d = matcher.match(t) ; assertEquals(5, d, 0) ; } // Test first match wins. @Test public void match_10()
111112113114115116117118119120121
// Test first match wins. @Test public void match_10() { StatsMatcher matcher = matcher("((VAR :p LITERAL) 5) ((VAR :p ANY) 10)") ; Triple t = triple("(?x :p 1913)") ; double d = matcher.match(t) ; assertEquals(5, d, 0) ; } @Test public void match_11() {