Skip to content
Snippets Groups Projects
Commit 39586f96 authored by Geurtjens,D. (Douwe Geurtjens)'s avatar Geurtjens,D. (Douwe Geurtjens)
Browse files

Half tests fixed

parent 60cbd81f
No related branches found
No related tags found
1 merge request!1Big merge
......@@ -125,14 +125,14 @@ func TestTwoEntitiesNoFilter(t *testing.T) {
FOR r0 IN member_of
FILTER r0._from == e_0._id AND r0._to == e_1._id
FILTER length(e_1) != 0 AND length(r0) != 0
RETURN {"nodes":union_distinct([e_1], []), "rel": union_distinct([r0], [])}
RETURN {"nodes":union_distinct([e_1], []), "rel": union_distinct([r0], []), "mod": union_distinct([], [])}
)
FILTER length(e1) != 0 AND length(e_0) != 0
RETURN {"nodes":union_distinct(flatten(e1[**].nodes), [e_0]), "rel": union_distinct(flatten(e1[**].rel), [])}
RETURN {"nodes":union_distinct(flatten(e1[**].nodes), [e_0]), "rel": union_distinct(flatten(e1[**].rel), []), "mod": union_distinct(flatten(e1[**].mod), [])}
)
let nodes = union_distinct(flatten(result[**].nodes),[])
let edges = union_distinct(flatten(result[**].rel),[])
return {"vertices":nodes,"edges":edges}`)
LET nodes = union_distinct(flatten(result[**].nodes),[])
LET edges = union_distinct(flatten(result[**].rel),[])
RETURN {"vertices":nodes,"edges":edges}`)
regExCleaner := regexp.MustCompile(`\s+`)
correctCleanedResult := regExCleaner.ReplaceAllString(string(correctConvertedResult), " ")
convertedCleanedResult := regExCleaner.ReplaceAllString(*convertedResult, " ")
......@@ -218,14 +218,14 @@ func TestTwoEntitiesOneEntityFilter(t *testing.T) {
FILTER e_1.seats < 10
FILTER r0._from == e_0._id AND r0._to == e_1._id
FILTER length(e_1) != 0 AND length(r0) != 0
RETURN {"nodes":union_distinct([e_1], []), "rel": union_distinct([r0], [])}
RETURN {"nodes":union_distinct([e_1], []), "rel": union_distinct([r0], []), "mod": union_distinct([], [])}
)
FILTER length(e1) != 0 AND length(e_0) != 0
RETURN {"nodes":union_distinct(flatten(e1[**].nodes), [e_0]), "rel": union_distinct(flatten(e1[**].rel), [])}
RETURN {"nodes":union_distinct(flatten(e1[**].nodes), [e_0]), "rel": union_distinct(flatten(e1[**].rel), []), "mod": union_distinct(flatten(e1[**].mod), [])}
)
let nodes = union_distinct(flatten(result[**].nodes),[])
let edges = union_distinct(flatten(result[**].rel),[])
return {"vertices":nodes,"edges":edges}`)
LET nodes = union_distinct(flatten(result[**].nodes),[])
LET edges = union_distinct(flatten(result[**].rel),[])
RETURN {"vertices":nodes,"edges":edges}`)
regExCleaner := regexp.MustCompile(`\s+`)
correctCleanedResult := regExCleaner.ReplaceAllString(string(correctConvertedResult), " ")
convertedCleanedResult := regExCleaner.ReplaceAllString(*convertedResult, " ")
......@@ -318,14 +318,14 @@ func TestTwoEntitiesTwoEntityFilters(t *testing.T) {
FILTER e_1.seats < 10
FILTER r0._from == e_0._id AND r0._to == e_1._id
FILTER length(e_1) != 0 AND length(r0) != 0
RETURN {"nodes":union_distinct([e_1], []), "rel": union_distinct([r0], [])}
RETURN {"nodes":union_distinct([e_1], []), "rel": union_distinct([r0], []), "mod": union_distinct([], [])}
)
FILTER length(e1) != 0 AND length(e_0) != 0
RETURN {"nodes":union_distinct(flatten(e1[**].nodes), [e_0]), "rel": union_distinct(flatten(e1[**].rel), [])}
RETURN {"nodes":union_distinct(flatten(e1[**].nodes), [e_0]), "rel": union_distinct(flatten(e1[**].rel), []), "mod": union_distinct(flatten(e1[**].mod), [])}
)
let nodes = union_distinct(flatten(result[**].nodes),[])
let edges = union_distinct(flatten(result[**].rel),[])
return {"vertices":nodes,"edges":edges}`)
LET nodes = union_distinct(flatten(result[**].nodes),[])
LET edges = union_distinct(flatten(result[**].rel),[])
RETURN {"vertices":nodes,"edges":edges}`)
regExCleaner := regexp.MustCompile(`\s+`)
correctCleanedResult := regExCleaner.ReplaceAllString(string(correctConvertedResult), " ")
convertedCleanedResult := regExCleaner.ReplaceAllString(*convertedResult, " ")
......@@ -426,17 +426,17 @@ func TestThreeEntitiesNoFilter(t *testing.T) {
FOR r1 IN submits
FILTER r1._from == e_0._id AND r1._to == e_2._id
FILTER length(e_2) != 0 AND length(r1) != 0
RETURN {"nodes":union_distinct([e_2], []), "rel": union_distinct([r1], [])}
RETURN {"nodes":union_distinct([e_2], []), "rel": union_distinct([r1], []), "mod": union_distinct([], [])}
)
FILTER length(e2) != 0 AND length(e_0) != 0 AND length(r0) != 0
RETURN {"nodes":union_distinct(flatten(e2[**].nodes), [e_0]), "rel": union_distinct(flatten(e2[**].rel), [r0])}
RETURN {"nodes":union_distinct(flatten(e2[**].nodes), [e_0]), "rel": union_distinct(flatten(e2[**].rel), [r0]), "mod": union_distinct(flatten(e2[**].mod), [])}
)
FILTER length(e0) != 0 AND length(e_1) != 0
RETURN {"nodes":union_distinct(flatten(e0[**].nodes), [e_1]), "rel": union_distinct(flatten(e0[**].rel), [])}
RETURN {"nodes":union_distinct(flatten(e0[**].nodes), [e_1]), "rel": union_distinct(flatten(e0[**].rel), []), "mod": union_distinct(flatten(e0[**].mod), [])}
)
let nodes = union_distinct(flatten(result[**].nodes),[])
let edges = union_distinct(flatten(result[**].rel),[])
return {"vertices":nodes,"edges":edges}`)
LET nodes = union_distinct(flatten(result[**].nodes),[])
LET edges = union_distinct(flatten(result[**].rel),[])
RETURN {"vertices":nodes,"edges":edges}`)
regExCleaner := regexp.MustCompile(`\s+`)
correctCleanedResult := regExCleaner.ReplaceAllString(string(correctConvertedResult), " ")
convertedCleanedResult := regExCleaner.ReplaceAllString(*convertedResult, " ")
......@@ -545,17 +545,17 @@ func TestThreeEntitiesOneEntityFilter(t *testing.T) {
FOR r1 IN submits
FILTER r1._from == e_0._id AND r1._to == e_2._id
FILTER length(e_2) != 0 AND length(r1) != 0
RETURN {"nodes":union_distinct([e_2], []), "rel": union_distinct([r1], [])}
RETURN {"nodes":union_distinct([e_2], []), "rel": union_distinct([r1], []), "mod": union_distinct([], [])}
)
FILTER length(e2) != 0 AND length(e_0) != 0 AND length(r0) != 0
RETURN {"nodes":union_distinct(flatten(e2[**].nodes), [e_0]), "rel": union_distinct(flatten(e2[**].rel), [r0])}
RETURN {"nodes":union_distinct(flatten(e2[**].nodes), [e_0]), "rel": union_distinct(flatten(e2[**].rel), [r0]), "mod": union_distinct(flatten(e2[**].mod), [])}
)
FILTER length(e0) != 0 AND length(e_1) != 0
RETURN {"nodes":union_distinct(flatten(e0[**].nodes), [e_1]), "rel": union_distinct(flatten(e0[**].rel), [])}
RETURN {"nodes":union_distinct(flatten(e0[**].nodes), [e_1]), "rel": union_distinct(flatten(e0[**].rel), []), "mod": union_distinct(flatten(e0[**].mod), [])}
)
let nodes = union_distinct(flatten(result[**].nodes),[])
let edges = union_distinct(flatten(result[**].rel),[])
return {"vertices":nodes,"edges":edges}`)
LET nodes = union_distinct(flatten(result[**].nodes),[])
LET edges = union_distinct(flatten(result[**].rel),[])
RETURN {"vertices":nodes,"edges":edges}`)
regExCleaner := regexp.MustCompile(`\s+`)
correctCleanedResult := regExCleaner.ReplaceAllString(string(correctConvertedResult), " ")
convertedCleanedResult := regExCleaner.ReplaceAllString(*convertedResult, " ")
......@@ -672,17 +672,17 @@ func TestThreeEntitiesTwoEntityFilters(t *testing.T) {
FILTER e_2.date LIKE "%mei%"
FILTER r1._from == e_0._id AND r1._to == e_2._id
FILTER length(e_2) != 0 AND length(r1) != 0
RETURN {"nodes":union_distinct([e_2], []), "rel": union_distinct([r1], [])}
RETURN {"nodes":union_distinct([e_2], []), "rel": union_distinct([r1], []), "mod": union_distinct([], [])}
)
FILTER length(e2) != 0 AND length(e_0) != 0 AND length(r0) != 0
RETURN {"nodes":union_distinct(flatten(e2[**].nodes), [e_0]), "rel": union_distinct(flatten(e2[**].rel), [r0])}
RETURN {"nodes":union_distinct(flatten(e2[**].nodes), [e_0]), "rel": union_distinct(flatten(e2[**].rel), [r0]), "mod": union_distinct(flatten(e2[**].mod), [])}
)
FILTER length(e0) != 0 AND length(e_1) != 0
RETURN {"nodes":union_distinct(flatten(e0[**].nodes), [e_1]), "rel": union_distinct(flatten(e0[**].rel), [])}
RETURN {"nodes":union_distinct(flatten(e0[**].nodes), [e_1]), "rel": union_distinct(flatten(e0[**].rel), []), "mod": union_distinct(flatten(e0[**].mod), [])}
)
let nodes = union_distinct(flatten(result[**].nodes),[])
let edges = union_distinct(flatten(result[**].rel),[])
return {"vertices":nodes,"edges":edges}`)
LET nodes = union_distinct(flatten(result[**].nodes),[])
LET edges = union_distinct(flatten(result[**].rel),[])
RETURN {"vertices":nodes,"edges":edges}`)
regExCleaner := regexp.MustCompile(`\s+`)
correctCleanedResult := regExCleaner.ReplaceAllString(string(correctConvertedResult), " ")
convertedCleanedResult := regExCleaner.ReplaceAllString(*convertedResult, " ")
......@@ -908,23 +908,23 @@ func TestFiveEntitiesFourEntityFilters(t *testing.T) {
FILTER e_4.name == "Volkspartij voor Vrijheid en Democratie"
FILTER r3._from == e_3._id AND r3._to == e_4._id
FILTER length(e_4) != 0 AND length(r3) != 0
RETURN {"nodes":union_distinct([e_4], []), "rel": union_distinct([r3], [])}
RETURN {"nodes":union_distinct([e_4], []), "rel": union_distinct([r3], []), "mod": union_distinct([], [])}
)
FILTER length(e4) != 0 AND length(e_3) != 0 AND length(r2) != 0
RETURN {"nodes":union_distinct(flatten(e4[**].nodes), [e_3]), "rel": union_distinct(flatten(e4[**].rel), [r2])}
RETURN {"nodes":union_distinct(flatten(e4[**].nodes), [e_3]), "rel": union_distinct(flatten(e4[**].rel), [r2]), "mod": union_distinct(flatten(e4[**].mod), [])}
)
FILTER length(e3) != 0 AND length(e_2) != 0 AND length(r1) != 0
RETURN {"nodes":union_distinct(flatten(e3[**].nodes), [e_2]), "rel": union_distinct(flatten(e3[**].rel), [r1])}
RETURN {"nodes":union_distinct(flatten(e3[**].nodes), [e_2]), "rel": union_distinct(flatten(e3[**].rel), [r1]), "mod": union_distinct(flatten(e3[**].mod), [])}
)
FILTER length(e2) != 0 AND length(e_0) != 0 AND length(r0) != 0
RETURN {"nodes":union_distinct(flatten(e2[**].nodes), [e_0]), "rel": union_distinct(flatten(e2[**].rel), [r0])}
RETURN {"nodes":union_distinct(flatten(e2[**].nodes), [e_0]), "rel": union_distinct(flatten(e2[**].rel), [r0]), "mod": union_distinct(flatten(e2[**].mod), [])}
)
FILTER length(e0) != 0 AND length(e_1) != 0
RETURN {"nodes":union_distinct(flatten(e0[**].nodes), [e_1]), "rel": union_distinct(flatten(e0[**].rel), [])}
RETURN {"nodes":union_distinct(flatten(e0[**].nodes), [e_1]), "rel": union_distinct(flatten(e0[**].rel), []), "mod": union_distinct(flatten(e0[**].mod), [])}
)
let nodes = union_distinct(flatten(result[**].nodes),[])
let edges = union_distinct(flatten(result[**].rel),[])
return {"vertices":nodes,"edges":edges}`)
LET nodes = union_distinct(flatten(result[**].nodes),[])
LET edges = union_distinct(flatten(result[**].rel),[])
RETURN {"vertices":nodes,"edges":edges}`)
regExCleaner := regexp.MustCompile(`\s+`)
correctCleanedResult := regExCleaner.ReplaceAllString(string(correctConvertedResult), " ")
convertedCleanedResult := regExCleaner.ReplaceAllString(*convertedResult, " ")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment