Skip to content

Commit

Permalink
Add tests for AS keyword
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdusovic committed Jun 7, 2016
1 parent f349d26 commit baa6da5
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions bql/planner/planner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,11 +272,21 @@ func TestPlannerQuery(t *testing.T) {
nbs: 3,
nrws: len(strings.Split(testTriples, "\n")) - 1,
},
{
q: `select ?s as ?s1, ?p as ?p1, ?o as ?o1 from ?test where {?s ?p ?o};`,
nbs: 3,
nrws: len(strings.Split(testTriples, "\n")) - 1,
},
{
q: `select ?p, ?o from ?test where {/u<joe> ?p ?o};`,
nbs: 2,
nrws: 2,
},
{
q: `select ?p as ?p1, ?o as ?o1 from ?test where {/u<joe> ?p ?o};`,
nbs: 2,
nrws: 2,
},
{
q: `select ?s, ?p from ?test where {?s ?p /t<car>};`,
nbs: 2,
Expand Down Expand Up @@ -312,6 +322,11 @@ func TestPlannerQuery(t *testing.T) {
nbs: 1,
nrws: 4,
},
{
q: `select ?s as ?s1 from ?test where {?s "is_a"@[] /t<car>};`,
nbs: 1,
nrws: 4,
},
{
q: `select ?o from ?test where {/u<joe> "parent_of"@[] ?o. ?o "parent_of"@[] /u<john>};`,
nbs: 1,
Expand Down

0 comments on commit baa6da5

Please sign in to comment.