 }
 
 extension QueryEvaluationTests {
+    var testQuads: [Quad] {
+        let parser = NTriplesParser(reader: "")
+        
+        guard let b1 = parser.parseQuad(line: "<http://example.org/Berlin> <http://xmlns.com/foaf/0.1/name> \"Berlin\"", graph: self.graph) else { fatalError() }
+        guard let b2 = parser.parseQuad(line: "<http://example.org/Berlin> <http://xmlns.com/foaf/0.1/homepage> <http://www.berlin.de/en/>", graph: self.graph) else { fatalError() }
+        guard let s = parser.parseQuad(line: "_:a <http://purl.org/dc/elements/1.1/title> \"Santa Monica\"", graph: self.graph) else { fatalError() }
+        
+        let numbers = Term(value: "http://example.org/numbers", type: .iri)
+        guard let n0 = parser.parseQuad(line: "_:n1 <http://xmlns.com/foaf/0.1/name> \"a number\"", graph: numbers) else { fatalError() }
+        guard let n1 = parser.parseQuad(line: "_:n1 <http://example.org/value> \"32.7\"^^<http://www.w3.org/2001/XMLSchema#float>", graph: numbers) else { fatalError() }
+        guard let n2 = parser.parseQuad(line: "_:n2 <http://example.org/value> \"-118\"^^<http://www.w3.org/2001/XMLSchema#integer>", graph: numbers) else { fatalError() }
+        
+        let other = Term(value: "http://example.org/other", type: .iri)
+        guard let x1 = parser.parseQuad(line: "_:x <http://example.org/p> \"hello\"@en", graph: other) else { fatalError() }
+        
+        let quads = [b1, b2, s, n0, n1, n2, x1]
+        return quads
+    }
+
     func parse(query: String) -> Algebra? {
         let qp      = QueryParser(reader: query)
         do {

        """.data(using: .utf8)!
        guard var p = SPARQLParser(data: data) else { fatalError("Failed to construct SPARQL parser") }
        let results = try Array(eval(query: p.parseQuery()))
        for r in results {
            print(r)
        }
        XCTAssertEqual(results.count, 7)
        
        let avgs = results.map { $0["movingAverage"] }.compactMap { $0?.numericValue }

        """.data(using: .utf8)!
        guard var p = SPARQLParser(data: data) else { fatalError("Failed to construct SPARQL parser") }
        let results = try Array(eval(query: p.parseQuery()))
        XCTAssertEqual(results.count, 7)
        
        let avgs = results.map { $0["movingAverage"] }.compactMap { $0?.numericValue }
