diff --git a/nemo-python/tests/test_blackbox.py b/nemo-python/tests/test_blackbox.py index e2d6a453f..8da51750b 100644 --- a/nemo-python/tests/test_blackbox.py +++ b/nemo-python/tests/test_blackbox.py @@ -3,7 +3,7 @@ import csv import os import math -from os.path import dirname, exists, abspath, isfile +from os.path import dirname, exists, abspath, isfile, isdir from nmo_python import load_file, NemoEngine, NemoOutputManager @@ -18,82 +18,80 @@ def stringify(value): return str(value) -def generate_test(file): +def run_blackbox_test(self, file): + os.chdir(self.path) + + program = load_file(file) program_name = file.removesuffix(".rls") - test_name = "test_" + program_name + engine = NemoEngine(program) + engine.reason() + + for relation in program.output_predicates(): + expected_results_file_name = os.path.join(program_name, f"{relation}.csv") - def run_test(self): - os.chdir(self.path) + if not exists(expected_results_file_name): + continue - program = load_file(file) - engine = NemoEngine(program) - engine.reason() + with tempfile.TemporaryDirectory() as tmp_dir: + output_manager = NemoOutputManager(tmp_dir) + engine.write_result(f"{relation}", output_manager) - for relation in program.output_predicates(): - expected_results_file_name = os.path.join( - program_name, f"{relation}.csv" - ) + with open(os.path.join(tmp_dir, f"{relation}.csv")) as results_file: + results = list(csv.reader(results_file)) - if not exists(expected_results_file_name): - continue + with open(expected_results_file_name) as expected_results_file: + expected = list(csv.reader(expected_results_file)) - with tempfile.TemporaryDirectory() as tmp_dir: - output_manager = NemoOutputManager(tmp_dir) - engine.write_result(f"{relation}", output_manager) + for result in results: + self.assertTrue( + result in expected, + f"unexpected {result} in {relation}", + ) - with open( - os.path.join(tmp_dir, f"{relation}.csv") - ) as results_file: - results = list(csv.reader(results_file)) + expected.remove(result) + + self.assertTrue( + len(expected) == 0, + f"missing results in {relation}: {expected}", + ) - with open( - expected_results_file_name - ) as expected_results_file: - expected = list(csv.reader(expected_results_file)) - for result in results: - self.assertTrue( - result in expected, - f"unexpected {result} in {relation}", - ) +def generate_test(file): + program_name = file.removesuffix(".rls") + test_name = "test_" + program_name - expected.remove(result) + return test_name, classmethod(lambda self: run_blackbox_test(self, file)) - self.assertTrue( - len(expected) == 0, - f"missing results in {relation}: {expected}", - ) - return test_name, classmethod(run_test) +def visit_path(test_path, loader, tests, subgroup_path=[]): + os.chdir(test_path) + dir_entries = os.listdir(test_path) + subgroup_path.append(os.path.basename(test_path)) + for subdir in filter(isdir, dir_entries): + visit_path(os.path.join(test_path, subdir), loader, tests, subgroup_path) + os.chdir(test_path) -def end_to_end_test_case(test_path): - class_name = os.path.basename(test_path) - test_case = type(class_name, (unittest.TestCase,), {"path": test_path}) + rules_files = list(filter(lambda f: isfile(f) and f.endswith(".rls"), dir_entries)) - for file in os.listdir(test_path): - if not isfile(os.path.join(test_path, file)): - continue + if rules_files.count == 0: + return - if not file.endswith(".rls"): - continue + class_name = "_".join(subgroup_path) + test_case = type(class_name, (unittest.TestCase,), {"path": test_path}) + for file in rules_files: name, method = generate_test(file) setattr(test_case, name, method) - return test_case + tests.addTests(loader.loadTestsFromTestCase(test_case)) + subgroup_path.pop() def load_tests(loader, tests, pattern): - test_cases_dir = os.path.join( - dirname(__file__), "..", "..", "resources", "testcases" - ) - - for directory in os.listdir(test_cases_dir): - path = abspath(os.path.join(test_cases_dir, directory)) - test_case = end_to_end_test_case(path) - tests.addTests(loader.loadTestsFromTestCase(test_case)) + test_cases_dir = os.path.join(dirname(__file__), "..", "..", "resources", "testcases") + visit_path(abspath(test_cases_dir), loader, tests) return tests diff --git a/resources/testcases/aggregate_basic/anyCount.rls b/resources/testcases/aggregate/anyCount.rls similarity index 100% rename from resources/testcases/aggregate_basic/anyCount.rls rename to resources/testcases/aggregate/anyCount.rls diff --git a/resources/testcases/aggregate_basic/anyCount/r0.csv b/resources/testcases/aggregate/anyCount/r0.csv similarity index 100% rename from resources/testcases/aggregate_basic/anyCount/r0.csv rename to resources/testcases/aggregate/anyCount/r0.csv diff --git a/resources/testcases/aggregate_basic/firstVariable.rls b/resources/testcases/aggregate/firstVariable.rls similarity index 100% rename from resources/testcases/aggregate_basic/firstVariable.rls rename to resources/testcases/aggregate/firstVariable.rls diff --git a/resources/testcases/aggregate_basic/firstVariable/r0.csv b/resources/testcases/aggregate/firstVariable/r0.csv similarity index 100% rename from resources/testcases/aggregate_basic/firstVariable/r0.csv rename to resources/testcases/aggregate/firstVariable/r0.csv diff --git a/resources/testcases/aggregate_basic/firstVariable/r1.csv b/resources/testcases/aggregate/firstVariable/r1.csv similarity index 100% rename from resources/testcases/aggregate_basic/firstVariable/r1.csv rename to resources/testcases/aggregate/firstVariable/r1.csv diff --git a/resources/testcases/aggregate_basic/firstVariable/r2.csv b/resources/testcases/aggregate/firstVariable/r2.csv similarity index 100% rename from resources/testcases/aggregate_basic/firstVariable/r2.csv rename to resources/testcases/aggregate/firstVariable/r2.csv diff --git a/resources/testcases/aggregate_basic/firstVariable/r3.csv b/resources/testcases/aggregate/firstVariable/r3.csv similarity index 100% rename from resources/testcases/aggregate_basic/firstVariable/r3.csv rename to resources/testcases/aggregate/firstVariable/r3.csv diff --git a/resources/testcases/aggregate_basic/groupBy.rls b/resources/testcases/aggregate/groupBy.rls similarity index 100% rename from resources/testcases/aggregate_basic/groupBy.rls rename to resources/testcases/aggregate/groupBy.rls diff --git a/resources/testcases/aggregate_basic/groupBy/r0.csv b/resources/testcases/aggregate/groupBy/r0.csv similarity index 100% rename from resources/testcases/aggregate_basic/groupBy/r0.csv rename to resources/testcases/aggregate/groupBy/r0.csv diff --git a/resources/testcases/aggregate_basic/groupBy/r1.csv b/resources/testcases/aggregate/groupBy/r1.csv similarity index 100% rename from resources/testcases/aggregate_basic/groupBy/r1.csv rename to resources/testcases/aggregate/groupBy/r1.csv diff --git a/resources/testcases/aggregate_basic/groupBy/r2.csv b/resources/testcases/aggregate/groupBy/r2.csv similarity index 100% rename from resources/testcases/aggregate_basic/groupBy/r2.csv rename to resources/testcases/aggregate/groupBy/r2.csv diff --git a/resources/testcases/aggregate_basic/groupBy/r3.csv b/resources/testcases/aggregate/groupBy/r3.csv similarity index 100% rename from resources/testcases/aggregate_basic/groupBy/r3.csv rename to resources/testcases/aggregate/groupBy/r3.csv diff --git a/resources/testcases/aggregate_basic/groupByIdempotent.rls b/resources/testcases/aggregate/groupByIdempotent.rls similarity index 100% rename from resources/testcases/aggregate_basic/groupByIdempotent.rls rename to resources/testcases/aggregate/groupByIdempotent.rls diff --git a/resources/testcases/aggregate_basic/groupByIdempotent/r0.csv b/resources/testcases/aggregate/groupByIdempotent/r0.csv similarity index 100% rename from resources/testcases/aggregate_basic/groupByIdempotent/r0.csv rename to resources/testcases/aggregate/groupByIdempotent/r0.csv diff --git a/resources/testcases/aggregate_basic/groupByIdempotent/r1.csv b/resources/testcases/aggregate/groupByIdempotent/r1.csv similarity index 100% rename from resources/testcases/aggregate_basic/groupByIdempotent/r1.csv rename to resources/testcases/aggregate/groupByIdempotent/r1.csv diff --git a/resources/testcases/aggregate_basic/lastVariable.rls b/resources/testcases/aggregate/lastVariable.rls similarity index 100% rename from resources/testcases/aggregate_basic/lastVariable.rls rename to resources/testcases/aggregate/lastVariable.rls diff --git a/resources/testcases/aggregate_basic/lastVariable/r0.csv b/resources/testcases/aggregate/lastVariable/r0.csv similarity index 100% rename from resources/testcases/aggregate_basic/lastVariable/r0.csv rename to resources/testcases/aggregate/lastVariable/r0.csv diff --git a/resources/testcases/aggregate_basic/lastVariable/r1.csv b/resources/testcases/aggregate/lastVariable/r1.csv similarity index 100% rename from resources/testcases/aggregate_basic/lastVariable/r1.csv rename to resources/testcases/aggregate/lastVariable/r1.csv diff --git a/resources/testcases/aggregate_basic/sources/dataA.csv b/resources/testcases/aggregate/sources/dataA.csv similarity index 100% rename from resources/testcases/aggregate_basic/sources/dataA.csv rename to resources/testcases/aggregate/sources/dataA.csv diff --git a/resources/testcases/aggregate_basic/stratification.rls b/resources/testcases/aggregate/stratification.rls similarity index 100% rename from resources/testcases/aggregate_basic/stratification.rls rename to resources/testcases/aggregate/stratification.rls diff --git a/resources/testcases/aggregate_basic/stratification/r1.csv b/resources/testcases/aggregate/stratification/r1.csv similarity index 100% rename from resources/testcases/aggregate_basic/stratification/r1.csv rename to resources/testcases/aggregate/stratification/r1.csv diff --git a/resources/testcases/aggregate_basic/stratification/r2.csv b/resources/testcases/aggregate/stratification/r2.csv similarity index 100% rename from resources/testcases/aggregate_basic/stratification/r2.csv rename to resources/testcases/aggregate/stratification/r2.csv diff --git a/resources/testcases/aggregate_basic/stratification/r3.csv b/resources/testcases/aggregate/stratification/r3.csv similarity index 100% rename from resources/testcases/aggregate_basic/stratification/r3.csv rename to resources/testcases/aggregate/stratification/r3.csv diff --git a/resources/testcases/comparison/run.rls b/resources/testcases/arithmetic/comparison.rls similarity index 100% rename from resources/testcases/comparison/run.rls rename to resources/testcases/arithmetic/comparison.rls diff --git a/resources/testcases/comparison/run/complex.csv b/resources/testcases/arithmetic/comparison/complex.csv similarity index 100% rename from resources/testcases/comparison/run/complex.csv rename to resources/testcases/arithmetic/comparison/complex.csv diff --git a/resources/testcases/comparison/run/x_greater_than_five.csv b/resources/testcases/arithmetic/comparison/x_greater_than_five.csv similarity index 100% rename from resources/testcases/comparison/run/x_greater_than_five.csv rename to resources/testcases/arithmetic/comparison/x_greater_than_five.csv diff --git a/resources/testcases/comparison/run/x_less_than_three.csv b/resources/testcases/arithmetic/comparison/x_less_than_three.csv similarity index 100% rename from resources/testcases/comparison/run/x_less_than_three.csv rename to resources/testcases/arithmetic/comparison/x_less_than_three.csv diff --git a/resources/testcases/comparison/run/x_unequals_three.csv b/resources/testcases/arithmetic/comparison/x_unequals_three.csv similarity index 100% rename from resources/testcases/comparison/run/x_unequals_three.csv rename to resources/testcases/arithmetic/comparison/x_unequals_three.csv diff --git a/resources/testcases/comparison/run/y_equals_nine.csv b/resources/testcases/arithmetic/comparison/y_equals_nine.csv similarity index 100% rename from resources/testcases/comparison/run/y_equals_nine.csv rename to resources/testcases/arithmetic/comparison/y_equals_nine.csv diff --git a/resources/testcases/comparison/run/y_greater_than_eq_seven.csv b/resources/testcases/arithmetic/comparison/y_greater_than_eq_seven.csv similarity index 100% rename from resources/testcases/comparison/run/y_greater_than_eq_seven.csv rename to resources/testcases/arithmetic/comparison/y_greater_than_eq_seven.csv diff --git a/resources/testcases/comparison/run/y_less_than_eq_five.csv b/resources/testcases/arithmetic/comparison/y_less_than_eq_five.csv similarity index 100% rename from resources/testcases/comparison/run/y_less_than_eq_five.csv rename to resources/testcases/arithmetic/comparison/y_less_than_eq_five.csv diff --git a/resources/testcases/comparison/run/y_unequals_five.csv b/resources/testcases/arithmetic/comparison/y_unequals_five.csv similarity index 100% rename from resources/testcases/comparison/run/y_unequals_five.csv rename to resources/testcases/arithmetic/comparison/y_unequals_five.csv diff --git a/resources/testcases/comparison/sources/data.csv b/resources/testcases/arithmetic/sources/data.csv similarity index 100% rename from resources/testcases/comparison/sources/data.csv rename to resources/testcases/arithmetic/sources/data.csv diff --git a/resources/testcases/basic/README.md b/resources/testcases/basic/README.md new file mode 100644 index 000000000..8af7e2719 --- /dev/null +++ b/resources/testcases/basic/README.md @@ -0,0 +1,8 @@ += testcases/basic + +Tests / documents all basic functionalities of the rule syntax: +- join +- negation +- projection +- union +- assignment diff --git a/resources/testcases/assignment/run.rls b/resources/testcases/basic/assignment.rls similarity index 100% rename from resources/testcases/assignment/run.rls rename to resources/testcases/basic/assignment.rls diff --git a/resources/testcases/assignment/run/r.csv b/resources/testcases/basic/assignment/r.csv similarity index 100% rename from resources/testcases/assignment/run/r.csv rename to resources/testcases/basic/assignment/r.csv diff --git a/resources/testcases/basic_join/run.rls b/resources/testcases/basic/join.rls similarity index 94% rename from resources/testcases/basic_join/run.rls rename to resources/testcases/basic/join.rls index b75b48410..4bc4d3504 100644 --- a/resources/testcases/basic_join/run.rls +++ b/resources/testcases/basic/join.rls @@ -4,4 +4,4 @@ J1(?X, ?Y, ?Z) :- sourceA(?X, ?Z, ?Y), sourceB(?X, ?Y, ?T) . J2(?X, ?Y, ?Z) :- sourceA(?Z, ?Y, ?X), sourceC(?X, ?Y, ?T) . -J3(?X, ?Y, ?W) :- sourceA(?T, ?Y, ?X), sourceB(?T, ?Y, ?X), sourceC(?X, ?Y, ?W) . \ No newline at end of file +J3(?X, ?Y, ?W) :- sourceA(?T, ?Y, ?X), sourceB(?T, ?Y, ?X), sourceC(?X, ?Y, ?W) . diff --git a/resources/testcases/basic_join/run/J1.csv b/resources/testcases/basic/join/J1.csv similarity index 100% rename from resources/testcases/basic_join/run/J1.csv rename to resources/testcases/basic/join/J1.csv diff --git a/resources/testcases/basic_join/output/J2.csv b/resources/testcases/basic/join/J2.csv similarity index 100% rename from resources/testcases/basic_join/output/J2.csv rename to resources/testcases/basic/join/J2.csv diff --git a/resources/testcases/basic_join/output/J3.csv b/resources/testcases/basic/join/J3.csv similarity index 100% rename from resources/testcases/basic_join/output/J3.csv rename to resources/testcases/basic/join/J3.csv diff --git a/resources/testcases/basic_negation/run.rls b/resources/testcases/basic/negation.rls similarity index 100% rename from resources/testcases/basic_negation/run.rls rename to resources/testcases/basic/negation.rls diff --git a/resources/testcases/basic_negation/run/filteredX.csv b/resources/testcases/basic/negation/filteredX.csv similarity index 100% rename from resources/testcases/basic_negation/run/filteredX.csv rename to resources/testcases/basic/negation/filteredX.csv diff --git a/resources/testcases/basic_negation/run/filteredY.csv b/resources/testcases/basic/negation/filteredY.csv similarity index 100% rename from resources/testcases/basic_negation/run/filteredY.csv rename to resources/testcases/basic/negation/filteredY.csv diff --git a/resources/testcases/basic_negation/run/filteredZ.csv b/resources/testcases/basic/negation/filteredZ.csv similarity index 100% rename from resources/testcases/basic_negation/run/filteredZ.csv rename to resources/testcases/basic/negation/filteredZ.csv diff --git a/resources/testcases/basic_negation/run/multiple.csv b/resources/testcases/basic/negation/multiple.csv similarity index 100% rename from resources/testcases/basic_negation/run/multiple.csv rename to resources/testcases/basic/negation/multiple.csv diff --git a/resources/testcases/basic_negation/run/projectedX.csv b/resources/testcases/basic/negation/projectedX.csv similarity index 100% rename from resources/testcases/basic_negation/run/projectedX.csv rename to resources/testcases/basic/negation/projectedX.csv diff --git a/resources/testcases/basic_negation/run/projectedXY.csv b/resources/testcases/basic/negation/projectedXY.csv similarity index 100% rename from resources/testcases/basic_negation/run/projectedXY.csv rename to resources/testcases/basic/negation/projectedXY.csv diff --git a/resources/testcases/basic_negation/run/projectedXZ.csv b/resources/testcases/basic/negation/projectedXZ.csv similarity index 100% rename from resources/testcases/basic_negation/run/projectedXZ.csv rename to resources/testcases/basic/negation/projectedXZ.csv diff --git a/resources/testcases/basic_negation/run/projectedY.csv b/resources/testcases/basic/negation/projectedY.csv similarity index 100% rename from resources/testcases/basic_negation/run/projectedY.csv rename to resources/testcases/basic/negation/projectedY.csv diff --git a/resources/testcases/basic_negation/run/projectedYZ.csv b/resources/testcases/basic/negation/projectedYZ.csv similarity index 100% rename from resources/testcases/basic_negation/run/projectedYZ.csv rename to resources/testcases/basic/negation/projectedYZ.csv diff --git a/resources/testcases/basic_negation/run/projectedZ.csv b/resources/testcases/basic/negation/projectedZ.csv similarity index 100% rename from resources/testcases/basic_negation/run/projectedZ.csv rename to resources/testcases/basic/negation/projectedZ.csv diff --git a/resources/testcases/basic_negation/run/reordered.csv b/resources/testcases/basic/negation/reordered.csv similarity index 100% rename from resources/testcases/basic_negation/run/reordered.csv rename to resources/testcases/basic/negation/reordered.csv diff --git a/resources/testcases/basic_negation/run/singlePositionX.csv b/resources/testcases/basic/negation/singlePositionX.csv similarity index 100% rename from resources/testcases/basic_negation/run/singlePositionX.csv rename to resources/testcases/basic/negation/singlePositionX.csv diff --git a/resources/testcases/basic_negation/run/singlePositionY.csv b/resources/testcases/basic/negation/singlePositionY.csv similarity index 100% rename from resources/testcases/basic_negation/run/singlePositionY.csv rename to resources/testcases/basic/negation/singlePositionY.csv diff --git a/resources/testcases/basic_negation/run/singlePositionZ.csv b/resources/testcases/basic/negation/singlePositionZ.csv similarity index 100% rename from resources/testcases/basic_negation/run/singlePositionZ.csv rename to resources/testcases/basic/negation/singlePositionZ.csv diff --git a/resources/testcases/basic_projection/run.rls b/resources/testcases/basic/projection.rls similarity index 100% rename from resources/testcases/basic_projection/run.rls rename to resources/testcases/basic/projection.rls diff --git a/resources/testcases/basic_projection/run/A.csv b/resources/testcases/basic/projection/A.csv similarity index 100% rename from resources/testcases/basic_projection/run/A.csv rename to resources/testcases/basic/projection/A.csv diff --git a/resources/testcases/basic_projection/run/B.csv b/resources/testcases/basic/projection/B.csv similarity index 100% rename from resources/testcases/basic_projection/run/B.csv rename to resources/testcases/basic/projection/B.csv diff --git a/resources/testcases/basic_projection/run/C.csv b/resources/testcases/basic/projection/C.csv similarity index 100% rename from resources/testcases/basic_projection/run/C.csv rename to resources/testcases/basic/projection/C.csv diff --git a/resources/testcases/basic_projection/run/D.csv b/resources/testcases/basic/projection/D.csv similarity index 100% rename from resources/testcases/basic_projection/run/D.csv rename to resources/testcases/basic/projection/D.csv diff --git a/resources/testcases/basic_projection/run/E.csv b/resources/testcases/basic/projection/E.csv similarity index 100% rename from resources/testcases/basic_projection/run/E.csv rename to resources/testcases/basic/projection/E.csv diff --git a/resources/testcases/basic_negation/sources/S1.csv b/resources/testcases/basic/sources/S1.csv similarity index 100% rename from resources/testcases/basic_negation/sources/S1.csv rename to resources/testcases/basic/sources/S1.csv diff --git a/resources/testcases/basic_negation/sources/S2.csv b/resources/testcases/basic/sources/S2.csv similarity index 100% rename from resources/testcases/basic_negation/sources/S2.csv rename to resources/testcases/basic/sources/S2.csv diff --git a/resources/testcases/basic_negation/sources/S3.csv b/resources/testcases/basic/sources/S3.csv similarity index 100% rename from resources/testcases/basic_negation/sources/S3.csv rename to resources/testcases/basic/sources/S3.csv diff --git a/resources/testcases/basic_projection/sources/data.csv b/resources/testcases/basic/sources/data.csv similarity index 100% rename from resources/testcases/basic_projection/sources/data.csv rename to resources/testcases/basic/sources/data.csv diff --git a/resources/testcases/basic_join/sources/dataA.csv b/resources/testcases/basic/sources/dataA.csv similarity index 100% rename from resources/testcases/basic_join/sources/dataA.csv rename to resources/testcases/basic/sources/dataA.csv diff --git a/resources/testcases/basic_join/sources/dataB.csv b/resources/testcases/basic/sources/dataB.csv similarity index 100% rename from resources/testcases/basic_join/sources/dataB.csv rename to resources/testcases/basic/sources/dataB.csv diff --git a/resources/testcases/basic_join/sources/dataC.csv b/resources/testcases/basic/sources/dataC.csv similarity index 100% rename from resources/testcases/basic_join/sources/dataC.csv rename to resources/testcases/basic/sources/dataC.csv diff --git a/resources/testcases/basic_negation/sources/main.csv b/resources/testcases/basic/sources/main.csv similarity index 100% rename from resources/testcases/basic_negation/sources/main.csv rename to resources/testcases/basic/sources/main.csv diff --git a/resources/testcases/basic_union/run.rls b/resources/testcases/basic/union.rls similarity index 100% rename from resources/testcases/basic_union/run.rls rename to resources/testcases/basic/union.rls diff --git a/resources/testcases/basic_union/run/AB.csv b/resources/testcases/basic/union/AB.csv similarity index 87% rename from resources/testcases/basic_union/run/AB.csv rename to resources/testcases/basic/union/AB.csv index f5684ab51..c94687538 100644 --- a/resources/testcases/basic_union/run/AB.csv +++ b/resources/testcases/basic/union/AB.csv @@ -3,5 +3,6 @@ A,C,F A,E,F A,G,Q B,B,D +B,D,A C,D,D Q,Q,A diff --git a/resources/testcases/basic_union/run/ABC.csv b/resources/testcases/basic/union/ABC.csv similarity index 61% rename from resources/testcases/basic_union/run/ABC.csv rename to resources/testcases/basic/union/ABC.csv index 961513618..aa221b2a4 100644 --- a/resources/testcases/basic_union/run/ABC.csv +++ b/resources/testcases/basic/union/ABC.csv @@ -3,6 +3,11 @@ A,C,F A,E,F A,G,Q B,B,D +B,D,A C,D,D +D,B,Q +D,B,Z +D,B,F +F,E,D Q,Q,A Z,Z,Z diff --git a/resources/testcases/basic_join/output.rls b/resources/testcases/basic_join/output.rls deleted file mode 100644 index 6e4c56ec2..000000000 --- a/resources/testcases/basic_join/output.rls +++ /dev/null @@ -1,10 +0,0 @@ -@source sourceA[3]: load-csv("sources/dataA.csv"). -@source sourceB[3]: load-csv("sources/dataB.csv"). -@source sourceC[3]: load-csv("sources/dataC.csv"). - -J1(?X, ?Y, ?Z) :- sourceA(?X, ?Z, ?Y), sourceB(?X, ?Y, ?T) . -J2(?X, ?Y, ?Z) :- sourceA(?Z, ?Y, ?X), sourceC(?X, ?Y, ?T) . -J3(?X, ?Y, ?W) :- sourceA(?T, ?Y, ?X), sourceB(?T, ?Y, ?X), sourceC(?X, ?Y, ?W) . - -@output J2 . -@output J3[3] . \ No newline at end of file diff --git a/resources/testcases/basic_join/run/J2.csv b/resources/testcases/basic_join/run/J2.csv deleted file mode 100644 index 0b7d87f52..000000000 --- a/resources/testcases/basic_join/run/J2.csv +++ /dev/null @@ -1,2 +0,0 @@ -D,B,B -F,E,A diff --git a/resources/testcases/basic_join/run/J3.csv b/resources/testcases/basic_join/run/J3.csv deleted file mode 100644 index b3ed53784..000000000 --- a/resources/testcases/basic_join/run/J3.csv +++ /dev/null @@ -1,3 +0,0 @@ -D,B,F -D,B,Q -D,B,Z diff --git a/resources/testcases/basic_union/sources/dataB.csv b/resources/testcases/basic_union/sources/dataB.csv deleted file mode 100644 index a1a5f42ab..000000000 --- a/resources/testcases/basic_union/sources/dataB.csv +++ /dev/null @@ -1,5 +0,0 @@ -B,B,D -A,C,F -A,G,Q -Q,Q,A -C,D,D \ No newline at end of file diff --git a/resources/testcases/basic_union/sources/dataC.csv b/resources/testcases/basic_union/sources/dataC.csv deleted file mode 100644 index ff07c224e..000000000 --- a/resources/testcases/basic_union/sources/dataC.csv +++ /dev/null @@ -1,2 +0,0 @@ -Q,Q,A -Z,Z,Z \ No newline at end of file diff --git a/resources/testcases/rdf/ntriples-example2.rls b/resources/testcases/data-formats/rdf/ntriples-example2.rls similarity index 100% rename from resources/testcases/rdf/ntriples-example2.rls rename to resources/testcases/data-formats/rdf/ntriples-example2.rls diff --git a/resources/testcases/rdf/ntriples-example2/goal.csv b/resources/testcases/data-formats/rdf/ntriples-example2/goal.csv similarity index 100% rename from resources/testcases/rdf/ntriples-example2/goal.csv rename to resources/testcases/data-formats/rdf/ntriples-example2/goal.csv diff --git a/resources/testcases/rdf/ntriples-example3.rls b/resources/testcases/data-formats/rdf/ntriples-example3.rls similarity index 100% rename from resources/testcases/rdf/ntriples-example3.rls rename to resources/testcases/data-formats/rdf/ntriples-example3.rls diff --git a/resources/testcases/rdf/ntriples-example3/atoms.csv b/resources/testcases/data-formats/rdf/ntriples-example3/atoms.csv similarity index 100% rename from resources/testcases/rdf/ntriples-example3/atoms.csv rename to resources/testcases/data-formats/rdf/ntriples-example3/atoms.csv diff --git a/resources/testcases/rdf/ntriples-example3/labels.csv b/resources/testcases/data-formats/rdf/ntriples-example3/labels.csv similarity index 100% rename from resources/testcases/rdf/ntriples-example3/labels.csv rename to resources/testcases/data-formats/rdf/ntriples-example3/labels.csv diff --git a/resources/testcases/rdf/rdfxml-example7.rls b/resources/testcases/data-formats/rdf/rdfxml-example7.rls similarity index 100% rename from resources/testcases/rdf/rdfxml-example7.rls rename to resources/testcases/data-formats/rdf/rdfxml-example7.rls diff --git a/resources/testcases/rdf/rdfxml-example7/goal.csv b/resources/testcases/data-formats/rdf/rdfxml-example7/goal.csv similarity index 100% rename from resources/testcases/rdf/rdfxml-example7/goal.csv rename to resources/testcases/data-formats/rdf/rdfxml-example7/goal.csv diff --git a/resources/testcases/rdf/sources/example2.nt b/resources/testcases/data-formats/rdf/sources/example2.nt similarity index 100% rename from resources/testcases/rdf/sources/example2.nt rename to resources/testcases/data-formats/rdf/sources/example2.nt diff --git a/resources/testcases/rdf/sources/example2.ttl b/resources/testcases/data-formats/rdf/sources/example2.ttl similarity index 100% rename from resources/testcases/rdf/sources/example2.ttl rename to resources/testcases/data-formats/rdf/sources/example2.ttl diff --git a/resources/testcases/rdf/sources/example3.nt b/resources/testcases/data-formats/rdf/sources/example3.nt similarity index 100% rename from resources/testcases/rdf/sources/example3.nt rename to resources/testcases/data-formats/rdf/sources/example3.nt diff --git a/resources/testcases/rdf/sources/example7.rdf b/resources/testcases/data-formats/rdf/sources/example7.rdf similarity index 100% rename from resources/testcases/rdf/sources/example7.rdf rename to resources/testcases/data-formats/rdf/sources/example7.rdf diff --git a/resources/testcases/rdf/turtle-example2.rls b/resources/testcases/data-formats/rdf/turtle-example2.rls similarity index 100% rename from resources/testcases/rdf/turtle-example2.rls rename to resources/testcases/data-formats/rdf/turtle-example2.rls diff --git a/resources/testcases/rdf/turtle-example2/goal.csv b/resources/testcases/data-formats/rdf/turtle-example2/goal.csv similarity index 100% rename from resources/testcases/rdf/turtle-example2/goal.csv rename to resources/testcases/data-formats/rdf/turtle-example2/goal.csv diff --git a/resources/testcases/load_empty/run.rls b/resources/testcases/load_empty/run.rls deleted file mode 100644 index 2a30fa860..000000000 --- a/resources/testcases/load_empty/run.rls +++ /dev/null @@ -1,3 +0,0 @@ -@source source[3]: load-csv("sources/empty.csv"). - -out(?X, ?Y, ?Z) :- source(?X, ?Y, ?Z) . \ No newline at end of file diff --git a/resources/testcases/regression/datalog_constants/regression.yaml b/resources/testcases/regression/datalog_constants/regression.yaml new file mode 100644 index 000000000..88d5664ef --- /dev/null +++ b/resources/testcases/regression/datalog_constants/regression.yaml @@ -0,0 +1,4 @@ +issue: 392 +title: Panic when filtering for non-existing constant +tracker: https://github.com/knowsys/nemo/issues/392 +type: bugfix diff --git a/resources/testcases/datalog_constants/run.rls b/resources/testcases/regression/datalog_constants/run.rls similarity index 100% rename from resources/testcases/datalog_constants/run.rls rename to resources/testcases/regression/datalog_constants/run.rls diff --git a/resources/testcases/datalog_constants/run/ConstantBodyHead.csv b/resources/testcases/regression/datalog_constants/run/ConstantBodyHead.csv similarity index 100% rename from resources/testcases/datalog_constants/run/ConstantBodyHead.csv rename to resources/testcases/regression/datalog_constants/run/ConstantBodyHead.csv diff --git a/resources/testcases/datalog_constants/run/ConstantBodyX.csv b/resources/testcases/regression/datalog_constants/run/ConstantBodyX.csv similarity index 100% rename from resources/testcases/datalog_constants/run/ConstantBodyX.csv rename to resources/testcases/regression/datalog_constants/run/ConstantBodyX.csv diff --git a/resources/testcases/datalog_constants/run/ConstantBodyXY.csv b/resources/testcases/regression/datalog_constants/run/ConstantBodyXY.csv similarity index 100% rename from resources/testcases/datalog_constants/run/ConstantBodyXY.csv rename to resources/testcases/regression/datalog_constants/run/ConstantBodyXY.csv diff --git a/resources/testcases/datalog_constants/run/ConstantBodyXZ.csv b/resources/testcases/regression/datalog_constants/run/ConstantBodyXZ.csv similarity index 100% rename from resources/testcases/datalog_constants/run/ConstantBodyXZ.csv rename to resources/testcases/regression/datalog_constants/run/ConstantBodyXZ.csv diff --git a/resources/testcases/datalog_constants/run/ConstantBodyY.csv b/resources/testcases/regression/datalog_constants/run/ConstantBodyY.csv similarity index 100% rename from resources/testcases/datalog_constants/run/ConstantBodyY.csv rename to resources/testcases/regression/datalog_constants/run/ConstantBodyY.csv diff --git a/resources/testcases/datalog_constants/run/ConstantBodyYZ.csv b/resources/testcases/regression/datalog_constants/run/ConstantBodyYZ.csv similarity index 100% rename from resources/testcases/datalog_constants/run/ConstantBodyYZ.csv rename to resources/testcases/regression/datalog_constants/run/ConstantBodyYZ.csv diff --git a/resources/testcases/datalog_constants/run/ConstantBodyZ.csv b/resources/testcases/regression/datalog_constants/run/ConstantBodyZ.csv similarity index 100% rename from resources/testcases/datalog_constants/run/ConstantBodyZ.csv rename to resources/testcases/regression/datalog_constants/run/ConstantBodyZ.csv diff --git a/resources/testcases/datalog_constants/run/ConstantHeadAfter.csv b/resources/testcases/regression/datalog_constants/run/ConstantHeadAfter.csv similarity index 100% rename from resources/testcases/datalog_constants/run/ConstantHeadAfter.csv rename to resources/testcases/regression/datalog_constants/run/ConstantHeadAfter.csv diff --git a/resources/testcases/datalog_constants/run/ConstantHeadBefore.csv b/resources/testcases/regression/datalog_constants/run/ConstantHeadBefore.csv similarity index 100% rename from resources/testcases/datalog_constants/run/ConstantHeadBefore.csv rename to resources/testcases/regression/datalog_constants/run/ConstantHeadBefore.csv diff --git a/resources/testcases/datalog_constants/run/ConstantHeadEverywhere.csv b/resources/testcases/regression/datalog_constants/run/ConstantHeadEverywhere.csv similarity index 100% rename from resources/testcases/datalog_constants/run/ConstantHeadEverywhere.csv rename to resources/testcases/regression/datalog_constants/run/ConstantHeadEverywhere.csv diff --git a/resources/testcases/datalog_constants/run/Exist.csv b/resources/testcases/regression/datalog_constants/run/Exist.csv similarity index 100% rename from resources/testcases/datalog_constants/run/Exist.csv rename to resources/testcases/regression/datalog_constants/run/Exist.csv diff --git a/resources/testcases/datalog_constants/run/NotExist.csv b/resources/testcases/regression/datalog_constants/run/NotExist.csv similarity index 100% rename from resources/testcases/datalog_constants/run/NotExist.csv rename to resources/testcases/regression/datalog_constants/run/NotExist.csv diff --git a/resources/testcases/datalog_constants/run/OnlyNewConstants.csv b/resources/testcases/regression/datalog_constants/run/OnlyNewConstants.csv similarity index 100% rename from resources/testcases/datalog_constants/run/OnlyNewConstants.csv rename to resources/testcases/regression/datalog_constants/run/OnlyNewConstants.csv diff --git a/resources/testcases/datalog_constants/run/OnlyNewConstantsEmpty.csv b/resources/testcases/regression/datalog_constants/run/OnlyNewConstantsEmpty.csv similarity index 100% rename from resources/testcases/datalog_constants/run/OnlyNewConstantsEmpty.csv rename to resources/testcases/regression/datalog_constants/run/OnlyNewConstantsEmpty.csv diff --git a/resources/testcases/datalog_constants/run/Unknown.csv b/resources/testcases/regression/datalog_constants/run/Unknown.csv similarity index 100% rename from resources/testcases/datalog_constants/run/Unknown.csv rename to resources/testcases/regression/datalog_constants/run/Unknown.csv diff --git a/resources/testcases/datalog_constants/sources/dataA.csv b/resources/testcases/regression/datalog_constants/sources/dataA.csv similarity index 100% rename from resources/testcases/datalog_constants/sources/dataA.csv rename to resources/testcases/regression/datalog_constants/sources/dataA.csv diff --git a/resources/testcases/datalog_constants/sources/dataB.csv b/resources/testcases/regression/datalog_constants/sources/dataB.csv similarity index 100% rename from resources/testcases/datalog_constants/sources/dataB.csv rename to resources/testcases/regression/datalog_constants/sources/dataB.csv diff --git a/resources/testcases/datatype_declarations/run.rls b/resources/testcases/regression/datatypes/declarations/run.rls similarity index 65% rename from resources/testcases/datatype_declarations/run.rls rename to resources/testcases/regression/datatypes/declarations/run.rls index 596b7f3b4..2741536d5 100644 --- a/resources/testcases/datatype_declarations/run.rls +++ b/resources/testcases/regression/datatypes/declarations/run.rls @@ -2,8 +2,8 @@ @declare c(integer) . @declare numeric(integer, float64) . -@source c[1]: load-csv("sources/c.csv") . -@source numeric[2]: load-csv("sources/numeric.csv") . +@source c[1]: load-csv("../sources/c.csv") . +@source numeric[2]: load-csv("../sources/numeric.csv") . a(Hello, ?X) :- c(?X) . b(?Y, ?X) :- a(?X, ?Y) . diff --git a/resources/testcases/datatype_declarations/run/a.csv b/resources/testcases/regression/datatypes/declarations/run/a.csv similarity index 100% rename from resources/testcases/datatype_declarations/run/a.csv rename to resources/testcases/regression/datatypes/declarations/run/a.csv diff --git a/resources/testcases/datatype_declarations/run/b.csv b/resources/testcases/regression/datatypes/declarations/run/b.csv similarity index 100% rename from resources/testcases/datatype_declarations/run/b.csv rename to resources/testcases/regression/datatypes/declarations/run/b.csv diff --git a/resources/testcases/datatype_declarations/run/r.csv b/resources/testcases/regression/datatypes/declarations/run/r.csv similarity index 100% rename from resources/testcases/datatype_declarations/run/r.csv rename to resources/testcases/regression/datatypes/declarations/run/r.csv diff --git a/resources/testcases/datatype_inference_consistency/no-source.rls b/resources/testcases/regression/datatypes/inference/no-source.rls similarity index 100% rename from resources/testcases/datatype_inference_consistency/no-source.rls rename to resources/testcases/regression/datatypes/inference/no-source.rls diff --git a/resources/testcases/datatype_inference_consistency/no-source/p.csv b/resources/testcases/regression/datatypes/inference/no-source/p.csv similarity index 100% rename from resources/testcases/datatype_inference_consistency/no-source/p.csv rename to resources/testcases/regression/datatypes/inference/no-source/p.csv diff --git a/resources/testcases/datatype_inference_consistency/with-source.rls b/resources/testcases/regression/datatypes/inference/with-source.rls similarity index 60% rename from resources/testcases/datatype_inference_consistency/with-source.rls rename to resources/testcases/regression/datatypes/inference/with-source.rls index a441f0557..37696fb67 100644 --- a/resources/testcases/datatype_inference_consistency/with-source.rls +++ b/resources/testcases/regression/datatypes/inference/with-source.rls @@ -1,6 +1,6 @@ @declare a(integer) . -@source a[1]: load-csv("sources/a.csv") . +@source a[1]: load-csv("../sources/a.csv") . c(?X, ?Y) :- b(?X, ?Y) . b(?X, ?X) :- a(?X) . diff --git a/resources/testcases/datatype_inference_consistency/with-source/b.csv b/resources/testcases/regression/datatypes/inference/with-source/b.csv similarity index 100% rename from resources/testcases/datatype_inference_consistency/with-source/b.csv rename to resources/testcases/regression/datatypes/inference/with-source/b.csv diff --git a/resources/testcases/datatype_inference_consistency/with-source/c.csv b/resources/testcases/regression/datatypes/inference/with-source/c.csv similarity index 100% rename from resources/testcases/datatype_inference_consistency/with-source/c.csv rename to resources/testcases/regression/datatypes/inference/with-source/c.csv diff --git a/resources/testcases/datatype_normalization/run.rls b/resources/testcases/regression/datatypes/normalization/run.rls similarity index 90% rename from resources/testcases/datatype_normalization/run.rls rename to resources/testcases/regression/datatypes/normalization/run.rls index 9327764ed..0aa4d05ed 100644 --- a/resources/testcases/datatype_normalization/run.rls +++ b/resources/testcases/regression/datatypes/normalization/run.rls @@ -4,7 +4,7 @@ @declare b(any) . @declare c(any) . -@source b[any]: load-csv("sources/b.csv") . +@source b[any]: load-csv("../sources/b.csv") . a(Some Constant With Spaces). a(). diff --git a/resources/testcases/datatype_normalization/run/c.csv b/resources/testcases/regression/datatypes/normalization/run/c.csv similarity index 100% rename from resources/testcases/datatype_normalization/run/c.csv rename to resources/testcases/regression/datatypes/normalization/run/c.csv diff --git a/resources/testcases/datatype_inference_consistency/sources/a.csv b/resources/testcases/regression/datatypes/sources/a.csv similarity index 100% rename from resources/testcases/datatype_inference_consistency/sources/a.csv rename to resources/testcases/regression/datatypes/sources/a.csv diff --git a/resources/testcases/datatype_normalization/sources/b.csv b/resources/testcases/regression/datatypes/sources/b.csv similarity index 100% rename from resources/testcases/datatype_normalization/sources/b.csv rename to resources/testcases/regression/datatypes/sources/b.csv diff --git a/resources/testcases/datatype_declarations/sources/c.csv b/resources/testcases/regression/datatypes/sources/c.csv similarity index 100% rename from resources/testcases/datatype_declarations/sources/c.csv rename to resources/testcases/regression/datatypes/sources/c.csv diff --git a/resources/testcases/datatype_declarations/sources/numeric.csv b/resources/testcases/regression/datatypes/sources/numeric.csv similarity index 100% rename from resources/testcases/datatype_declarations/sources/numeric.csv rename to resources/testcases/regression/datatypes/sources/numeric.csv diff --git a/resources/testcases/join_by_eq_constraint/integer.rls b/resources/testcases/regression/join_by_eq_constraint/integer.rls similarity index 100% rename from resources/testcases/join_by_eq_constraint/integer.rls rename to resources/testcases/regression/join_by_eq_constraint/integer.rls diff --git a/resources/testcases/join_by_eq_constraint/integer/intInBody.csv b/resources/testcases/regression/join_by_eq_constraint/integer/intInBody.csv similarity index 100% rename from resources/testcases/join_by_eq_constraint/integer/intInBody.csv rename to resources/testcases/regression/join_by_eq_constraint/integer/intInBody.csv diff --git a/resources/testcases/regression/join_by_eq_constraint/regression.yaml b/resources/testcases/regression/join_by_eq_constraint/regression.yaml new file mode 100644 index 000000000..e713f58d5 --- /dev/null +++ b/resources/testcases/regression/join_by_eq_constraint/regression.yaml @@ -0,0 +1,4 @@ +issue: 355 +title: Support equality of two integer variables +tracker: https://github.com/knowsys/nemo/issues/355 +type: bugfix diff --git a/resources/testcases/join_by_eq_constraint/string.rls b/resources/testcases/regression/join_by_eq_constraint/string.rls similarity index 100% rename from resources/testcases/join_by_eq_constraint/string.rls rename to resources/testcases/regression/join_by_eq_constraint/string.rls diff --git a/resources/testcases/join_by_eq_constraint/string/literalInBody.csv b/resources/testcases/regression/join_by_eq_constraint/string/literalInBody.csv similarity index 100% rename from resources/testcases/join_by_eq_constraint/string/literalInBody.csv rename to resources/testcases/regression/join_by_eq_constraint/string/literalInBody.csv diff --git a/resources/testcases/regression/load/empty/regression.yaml b/resources/testcases/regression/load/empty/regression.yaml new file mode 100644 index 000000000..35ad48856 --- /dev/null +++ b/resources/testcases/regression/load/empty/regression.yaml @@ -0,0 +1,4 @@ +issue: 341 +title: invariant violation when reading empty file +tracker: https://github.com/knowsys/nemo/issues/308 +type: bugfix diff --git a/resources/testcases/regression/load/empty/run.rls b/resources/testcases/regression/load/empty/run.rls new file mode 100644 index 000000000..ba8b9b32c --- /dev/null +++ b/resources/testcases/regression/load/empty/run.rls @@ -0,0 +1,3 @@ +@source source[3]: load-csv("../sources/empty.csv"). + +out(?X, ?Y, ?Z) :- source(?X, ?Y, ?Z) . \ No newline at end of file diff --git a/resources/testcases/load_empty/run/out.csv b/resources/testcases/regression/load/empty/run/out.csv similarity index 100% rename from resources/testcases/load_empty/run/out.csv rename to resources/testcases/regression/load/empty/run/out.csv diff --git a/resources/testcases/load_multiple/run.rls b/resources/testcases/regression/load/multiple/run.rls similarity index 55% rename from resources/testcases/load_multiple/run.rls rename to resources/testcases/regression/load/multiple/run.rls index 0a459903f..bc2578d73 100644 --- a/resources/testcases/load_multiple/run.rls +++ b/resources/testcases/regression/load/multiple/run.rls @@ -1,6 +1,6 @@ -@source source[3]: load-csv("sources/dataA.csv"). -@source source[3]: load-csv("sources/dataB.csv"). -@source source[3]: load-csv("sources/dataC.csv"). +@source source[3]: load-csv("../sources/dataA.csv"). +@source source[3]: load-csv("../sources/dataB.csv"). +@source source[3]: load-csv("../sources/dataC.csv"). source("A", "B", "C") . source("B", "C", "D") . diff --git a/resources/testcases/load_multiple/run/combined.csv b/resources/testcases/regression/load/multiple/run/combined.csv similarity index 100% rename from resources/testcases/load_multiple/run/combined.csv rename to resources/testcases/regression/load/multiple/run/combined.csv diff --git a/resources/testcases/load_multiple/run/constant.csv b/resources/testcases/regression/load/multiple/run/constant.csv similarity index 100% rename from resources/testcases/load_multiple/run/constant.csv rename to resources/testcases/regression/load/multiple/run/constant.csv diff --git a/resources/testcases/load_multiple/sources/dataA.csv b/resources/testcases/regression/load/sources/dataA.csv similarity index 100% rename from resources/testcases/load_multiple/sources/dataA.csv rename to resources/testcases/regression/load/sources/dataA.csv diff --git a/resources/testcases/load_multiple/sources/dataB.csv b/resources/testcases/regression/load/sources/dataB.csv similarity index 100% rename from resources/testcases/load_multiple/sources/dataB.csv rename to resources/testcases/regression/load/sources/dataB.csv diff --git a/resources/testcases/load_multiple/sources/dataC.csv b/resources/testcases/regression/load/sources/dataC.csv similarity index 100% rename from resources/testcases/load_multiple/sources/dataC.csv rename to resources/testcases/regression/load/sources/dataC.csv diff --git a/resources/testcases/load_empty/sources/empty.csv b/resources/testcases/regression/load/sources/empty.csv similarity index 100% rename from resources/testcases/load_empty/sources/empty.csv rename to resources/testcases/regression/load/sources/empty.csv diff --git a/resources/testcases/repeated_variables/run.rls b/resources/testcases/regression/repeated_variables/run.rls similarity index 100% rename from resources/testcases/repeated_variables/run.rls rename to resources/testcases/regression/repeated_variables/run.rls diff --git a/resources/testcases/repeated_variables/run/RepeatAll.csv b/resources/testcases/regression/repeated_variables/run/RepeatAll.csv similarity index 100% rename from resources/testcases/repeated_variables/run/RepeatAll.csv rename to resources/testcases/regression/repeated_variables/run/RepeatAll.csv diff --git a/resources/testcases/repeated_variables/run/RepeatAlternative.csv b/resources/testcases/regression/repeated_variables/run/RepeatAlternative.csv similarity index 100% rename from resources/testcases/repeated_variables/run/RepeatAlternative.csv rename to resources/testcases/regression/repeated_variables/run/RepeatAlternative.csv diff --git a/resources/testcases/repeated_variables/run/RepeatBody.csv b/resources/testcases/regression/repeated_variables/run/RepeatBody.csv similarity index 100% rename from resources/testcases/repeated_variables/run/RepeatBody.csv rename to resources/testcases/regression/repeated_variables/run/RepeatBody.csv diff --git a/resources/testcases/repeated_variables/run/RepeatHead.csv b/resources/testcases/regression/repeated_variables/run/RepeatHead.csv similarity index 100% rename from resources/testcases/repeated_variables/run/RepeatHead.csv rename to resources/testcases/regression/repeated_variables/run/RepeatHead.csv diff --git a/resources/testcases/basic_union/sources/dataA.csv b/resources/testcases/regression/repeated_variables/sources/dataA.csv similarity index 100% rename from resources/testcases/basic_union/sources/dataA.csv rename to resources/testcases/regression/repeated_variables/sources/dataA.csv diff --git a/resources/testcases/repeated_variables/sources/dataB.csv b/resources/testcases/regression/repeated_variables/sources/dataB.csv similarity index 71% rename from resources/testcases/repeated_variables/sources/dataB.csv rename to resources/testcases/regression/repeated_variables/sources/dataB.csv index 09baa375a..1cb943320 100644 --- a/resources/testcases/repeated_variables/sources/dataB.csv +++ b/resources/testcases/regression/repeated_variables/sources/dataB.csv @@ -3,4 +3,5 @@ B,D,A A,C,F A,G,Q A,Q,Q -C,D,D \ No newline at end of file +C,D,D +C,D,A diff --git a/resources/testcases/repeated_variables/sources/dataC.csv b/resources/testcases/regression/repeated_variables/sources/dataC.csv similarity index 100% rename from resources/testcases/repeated_variables/sources/dataC.csv rename to resources/testcases/regression/repeated_variables/sources/dataC.csv diff --git a/resources/testcases/restricted_block/run.rls b/resources/testcases/regression/restricted_chase/block.rls similarity index 100% rename from resources/testcases/restricted_block/run.rls rename to resources/testcases/regression/restricted_chase/block.rls diff --git a/resources/testcases/restricted_block/run/result.csv b/resources/testcases/regression/restricted_chase/block/result.csv similarity index 100% rename from resources/testcases/restricted_block/run/result.csv rename to resources/testcases/regression/restricted_chase/block/result.csv diff --git a/resources/testcases/restricted_datalog_head/run.rls b/resources/testcases/regression/restricted_chase/datalog_head.rls similarity index 100% rename from resources/testcases/restricted_datalog_head/run.rls rename to resources/testcases/regression/restricted_chase/datalog_head.rls diff --git a/resources/testcases/restricted_datalog_head/run/datalog.csv b/resources/testcases/regression/restricted_chase/datalog_head/datalog.csv similarity index 100% rename from resources/testcases/restricted_datalog_head/run/datalog.csv rename to resources/testcases/regression/restricted_chase/datalog_head/datalog.csv diff --git a/resources/testcases/restricted_datalog_head/run/result.csv b/resources/testcases/regression/restricted_chase/datalog_head/result.csv similarity index 100% rename from resources/testcases/restricted_datalog_head/run/result.csv rename to resources/testcases/regression/restricted_chase/datalog_head/result.csv diff --git a/resources/testcases/restricted_doctors/run.rls b/resources/testcases/regression/restricted_chase/doctors.rls similarity index 100% rename from resources/testcases/restricted_doctors/run.rls rename to resources/testcases/regression/restricted_chase/doctors.rls diff --git a/resources/testcases/restricted_doctors/run/prescription.csv b/resources/testcases/regression/restricted_chase/doctors/prescription.csv similarity index 100% rename from resources/testcases/restricted_doctors/run/prescription.csv rename to resources/testcases/regression/restricted_chase/doctors/prescription.csv diff --git a/resources/testcases/restricted_head_constant/run.rls b/resources/testcases/regression/restricted_chase/head_constant.rls similarity index 100% rename from resources/testcases/restricted_head_constant/run.rls rename to resources/testcases/regression/restricted_chase/head_constant.rls diff --git a/resources/testcases/restricted_head_constant/run/result.csv b/resources/testcases/regression/restricted_chase/head_constant/result.csv similarity index 100% rename from resources/testcases/restricted_head_constant/run/result.csv rename to resources/testcases/regression/restricted_chase/head_constant/result.csv diff --git a/resources/testcases/restricted_multihead/run.rls b/resources/testcases/regression/restricted_chase/multihead.rls similarity index 100% rename from resources/testcases/restricted_multihead/run.rls rename to resources/testcases/regression/restricted_chase/multihead.rls diff --git a/resources/testcases/restricted_multihead/run/null.csv b/resources/testcases/regression/restricted_chase/multihead/null.csv similarity index 100% rename from resources/testcases/restricted_multihead/run/null.csv rename to resources/testcases/regression/restricted_chase/multihead/null.csv diff --git a/resources/testcases/restricted_multihead/run/result.csv b/resources/testcases/regression/restricted_chase/multihead/result.csv similarity index 100% rename from resources/testcases/restricted_multihead/run/result.csv rename to resources/testcases/regression/restricted_chase/multihead/result.csv diff --git a/resources/testcases/restricted_multinulls/run.rls b/resources/testcases/regression/restricted_chase/multinulls.rls similarity index 100% rename from resources/testcases/restricted_multinulls/run.rls rename to resources/testcases/regression/restricted_chase/multinulls.rls diff --git a/resources/testcases/restricted_multinulls/run/test.csv b/resources/testcases/regression/restricted_chase/multinulls/test.csv similarity index 100% rename from resources/testcases/restricted_multinulls/run/test.csv rename to resources/testcases/regression/restricted_chase/multinulls/test.csv diff --git a/resources/testcases/restricted_multipieces/run.rls b/resources/testcases/regression/restricted_chase/multipieces.rls similarity index 100% rename from resources/testcases/restricted_multipieces/run.rls rename to resources/testcases/regression/restricted_chase/multipieces.rls diff --git a/resources/testcases/restricted_multipieces/run/test.csv b/resources/testcases/regression/restricted_chase/multipieces/test.csv similarity index 100% rename from resources/testcases/restricted_multipieces/run/test.csv rename to resources/testcases/regression/restricted_chase/multipieces/test.csv diff --git a/resources/testcases/restricted_only_nulls/run.rls b/resources/testcases/regression/restricted_chase/only_nulls.rls similarity index 100% rename from resources/testcases/restricted_only_nulls/run.rls rename to resources/testcases/regression/restricted_chase/only_nulls.rls diff --git a/resources/testcases/restricted_only_nulls/run/result.csv b/resources/testcases/regression/restricted_chase/only_nulls/result.csv similarity index 100% rename from resources/testcases/restricted_only_nulls/run/result.csv rename to resources/testcases/regression/restricted_chase/only_nulls/result.csv diff --git a/resources/testcases/restricted_recursive/run.rls b/resources/testcases/regression/restricted_chase/recursive/run.rls similarity index 100% rename from resources/testcases/restricted_recursive/run.rls rename to resources/testcases/regression/restricted_chase/recursive/run.rls diff --git a/resources/testcases/restricted_recursive/run/resultA.csv b/resources/testcases/regression/restricted_chase/recursive/run/resultA.csv similarity index 100% rename from resources/testcases/restricted_recursive/run/resultA.csv rename to resources/testcases/regression/restricted_chase/recursive/run/resultA.csv diff --git a/resources/testcases/restricted_recursive/run/resultB.csv b/resources/testcases/regression/restricted_chase/recursive/run/resultB.csv similarity index 100% rename from resources/testcases/restricted_recursive/run/resultB.csv rename to resources/testcases/regression/restricted_chase/recursive/run/resultB.csv diff --git a/resources/testcases/regression/restricted_chase/recursive/sources/dataA.csv b/resources/testcases/regression/restricted_chase/recursive/sources/dataA.csv new file mode 100644 index 000000000..3167910c9 --- /dev/null +++ b/resources/testcases/regression/restricted_chase/recursive/sources/dataA.csv @@ -0,0 +1 @@ +, diff --git a/resources/testcases/regression/restricted_chase/recursive/sources/dataB.csv b/resources/testcases/regression/restricted_chase/recursive/sources/dataB.csv new file mode 100644 index 000000000..c63eb3396 --- /dev/null +++ b/resources/testcases/regression/restricted_chase/recursive/sources/dataB.csv @@ -0,0 +1 @@ +, diff --git a/resources/testcases/restricted_simple/run.rls b/resources/testcases/regression/restricted_chase/simple.rls similarity index 100% rename from resources/testcases/restricted_simple/run.rls rename to resources/testcases/regression/restricted_chase/simple.rls diff --git a/resources/testcases/regression/restricted_chase/simple/result.csv b/resources/testcases/regression/restricted_chase/simple/result.csv new file mode 100644 index 000000000..759aab0eb --- /dev/null +++ b/resources/testcases/regression/restricted_chase/simple/result.csv @@ -0,0 +1,3 @@ +,<__Null#9223372036854775809> +,<__Null#9223372036854775810> +,<__Null#9223372036854775811> diff --git a/resources/testcases/restricted_block/sources/data.csv b/resources/testcases/regression/restricted_chase/sources/data.csv similarity index 100% rename from resources/testcases/restricted_block/sources/data.csv rename to resources/testcases/regression/restricted_chase/sources/data.csv diff --git a/resources/testcases/restricted_only_nulls/sources/empty.csv b/resources/testcases/regression/restricted_chase/sources/empty.csv similarity index 100% rename from resources/testcases/restricted_only_nulls/sources/empty.csv rename to resources/testcases/regression/restricted_chase/sources/empty.csv diff --git a/resources/testcases/stratified_negation/run.rls b/resources/testcases/regression/stratification/binary_negated.rls similarity index 100% rename from resources/testcases/stratified_negation/run.rls rename to resources/testcases/regression/stratification/binary_negated.rls diff --git a/resources/testcases/stratified_negation/run/result.csv b/resources/testcases/regression/stratification/binary_negated/result.csv similarity index 100% rename from resources/testcases/stratified_negation/run/result.csv rename to resources/testcases/regression/stratification/binary_negated/result.csv diff --git a/resources/testcases/regression/stratification/regression.yaml b/resources/testcases/regression/stratification/regression.yaml new file mode 100644 index 000000000..ace8bbe97 --- /dev/null +++ b/resources/testcases/regression/stratification/regression.yaml @@ -0,0 +1,4 @@ +pr: 220 +title: Stratified Negation +tracker: https://github.com/knowsys/nemo/pull/220 +type: feature diff --git a/resources/testcases/stratified_negation/sources/data.csv b/resources/testcases/regression/stratification/sources/data.csv similarity index 100% rename from resources/testcases/stratified_negation/sources/data.csv rename to resources/testcases/regression/stratification/sources/data.csv diff --git a/resources/testcases/stratified_negation/sources/equal.csv b/resources/testcases/regression/stratification/sources/equal.csv similarity index 100% rename from resources/testcases/stratified_negation/sources/equal.csv rename to resources/testcases/regression/stratification/sources/equal.csv diff --git a/resources/testcases/stratified_negation_2/run.rls b/resources/testcases/regression/stratification/unary_negated.rls similarity index 100% rename from resources/testcases/stratified_negation_2/run.rls rename to resources/testcases/regression/stratification/unary_negated.rls diff --git a/resources/testcases/stratified_negation_2/run/q.csv b/resources/testcases/regression/stratification/unary_negated/q.csv similarity index 100% rename from resources/testcases/stratified_negation_2/run/q.csv rename to resources/testcases/regression/stratification/unary_negated/q.csv diff --git a/resources/testcases/stratified_negation_2/run/q1.csv b/resources/testcases/regression/stratification/unary_negated/q1.csv similarity index 100% rename from resources/testcases/stratified_negation_2/run/q1.csv rename to resources/testcases/regression/stratification/unary_negated/q1.csv diff --git a/resources/testcases/stratified_negation_2/run/q2.csv b/resources/testcases/regression/stratification/unary_negated/q2.csv similarity index 100% rename from resources/testcases/stratified_negation_2/run/q2.csv rename to resources/testcases/regression/stratification/unary_negated/q2.csv diff --git a/resources/testcases/stratified_negation_2/run/r.csv b/resources/testcases/regression/stratification/unary_negated/r.csv similarity index 100% rename from resources/testcases/stratified_negation_2/run/r.csv rename to resources/testcases/regression/stratification/unary_negated/r.csv diff --git a/resources/testcases/symmetric_transitive_closure/city.csv b/resources/testcases/regression/symmetric_transitive_closure/city.csv similarity index 100% rename from resources/testcases/symmetric_transitive_closure/city.csv rename to resources/testcases/regression/symmetric_transitive_closure/city.csv diff --git a/resources/testcases/symmetric_transitive_closure/conn.csv b/resources/testcases/regression/symmetric_transitive_closure/conn.csv similarity index 100% rename from resources/testcases/symmetric_transitive_closure/conn.csv rename to resources/testcases/regression/symmetric_transitive_closure/conn.csv diff --git a/resources/testcases/symmetric_transitive_closure/run.rls b/resources/testcases/regression/symmetric_transitive_closure/run.rls similarity index 100% rename from resources/testcases/symmetric_transitive_closure/run.rls rename to resources/testcases/regression/symmetric_transitive_closure/run.rls diff --git a/resources/testcases/symmetric_transitive_closure/run/connected.csv b/resources/testcases/regression/symmetric_transitive_closure/run/connected.csv similarity index 100% rename from resources/testcases/symmetric_transitive_closure/run/connected.csv rename to resources/testcases/regression/symmetric_transitive_closure/run/connected.csv diff --git a/resources/testcases/variable_comparisons/run.rls b/resources/testcases/regression/variable_comparisons/run.rls similarity index 100% rename from resources/testcases/variable_comparisons/run.rls rename to resources/testcases/regression/variable_comparisons/run.rls diff --git a/resources/testcases/variable_comparisons/run/combine.csv b/resources/testcases/regression/variable_comparisons/run/combine.csv similarity index 100% rename from resources/testcases/variable_comparisons/run/combine.csv rename to resources/testcases/regression/variable_comparisons/run/combine.csv diff --git a/resources/testcases/variable_comparisons/run/contra.csv b/resources/testcases/regression/variable_comparisons/run/contra.csv similarity index 100% rename from resources/testcases/variable_comparisons/run/contra.csv rename to resources/testcases/regression/variable_comparisons/run/contra.csv diff --git a/resources/testcases/variable_comparisons/run/equal.csv b/resources/testcases/regression/variable_comparisons/run/equal.csv similarity index 100% rename from resources/testcases/variable_comparisons/run/equal.csv rename to resources/testcases/regression/variable_comparisons/run/equal.csv diff --git a/resources/testcases/variable_comparisons/run/g_eq.csv b/resources/testcases/regression/variable_comparisons/run/g_eq.csv similarity index 100% rename from resources/testcases/variable_comparisons/run/g_eq.csv rename to resources/testcases/regression/variable_comparisons/run/g_eq.csv diff --git a/resources/testcases/variable_comparisons/run/g_un.csv b/resources/testcases/regression/variable_comparisons/run/g_un.csv similarity index 100% rename from resources/testcases/variable_comparisons/run/g_un.csv rename to resources/testcases/regression/variable_comparisons/run/g_un.csv diff --git a/resources/testcases/variable_comparisons/run/l_eq.csv b/resources/testcases/regression/variable_comparisons/run/l_eq.csv similarity index 100% rename from resources/testcases/variable_comparisons/run/l_eq.csv rename to resources/testcases/regression/variable_comparisons/run/l_eq.csv diff --git a/resources/testcases/variable_comparisons/run/l_un.csv b/resources/testcases/regression/variable_comparisons/run/l_un.csv similarity index 100% rename from resources/testcases/variable_comparisons/run/l_un.csv rename to resources/testcases/regression/variable_comparisons/run/l_un.csv diff --git a/resources/testcases/variable_comparisons/run/multi.csv b/resources/testcases/regression/variable_comparisons/run/multi.csv similarity index 100% rename from resources/testcases/variable_comparisons/run/multi.csv rename to resources/testcases/regression/variable_comparisons/run/multi.csv diff --git a/resources/testcases/variable_comparisons/run/r_xy.csv b/resources/testcases/regression/variable_comparisons/run/r_xy.csv similarity index 100% rename from resources/testcases/variable_comparisons/run/r_xy.csv rename to resources/testcases/regression/variable_comparisons/run/r_xy.csv diff --git a/resources/testcases/variable_comparisons/run/r_yx.csv b/resources/testcases/regression/variable_comparisons/run/r_yx.csv similarity index 100% rename from resources/testcases/variable_comparisons/run/r_yx.csv rename to resources/testcases/regression/variable_comparisons/run/r_yx.csv diff --git a/resources/testcases/variable_comparisons/run/uneq.csv b/resources/testcases/regression/variable_comparisons/run/uneq.csv similarity index 100% rename from resources/testcases/variable_comparisons/run/uneq.csv rename to resources/testcases/regression/variable_comparisons/run/uneq.csv diff --git a/resources/testcases/repeated_variables/sources/dataA.csv b/resources/testcases/repeated_variables/sources/dataA.csv deleted file mode 100644 index b392d4e11..000000000 --- a/resources/testcases/repeated_variables/sources/dataA.csv +++ /dev/null @@ -1,4 +0,0 @@ -A,B,C -B,B,D -A,E,F -C,D,D \ No newline at end of file diff --git a/resources/testcases/restricted_datalog_head/sources/data.csv b/resources/testcases/restricted_datalog_head/sources/data.csv deleted file mode 100644 index 8e75edb62..000000000 --- a/resources/testcases/restricted_datalog_head/sources/data.csv +++ /dev/null @@ -1,3 +0,0 @@ -, -, -, \ No newline at end of file diff --git a/resources/testcases/restricted_head_constant/sources/data.csv b/resources/testcases/restricted_head_constant/sources/data.csv deleted file mode 100644 index 8e75edb62..000000000 --- a/resources/testcases/restricted_head_constant/sources/data.csv +++ /dev/null @@ -1,3 +0,0 @@ -, -, -, \ No newline at end of file diff --git a/resources/testcases/restricted_multihead/sources/data.csv b/resources/testcases/restricted_multihead/sources/data.csv deleted file mode 100644 index 8e75edb62..000000000 --- a/resources/testcases/restricted_multihead/sources/data.csv +++ /dev/null @@ -1,3 +0,0 @@ -, -, -, \ No newline at end of file diff --git a/resources/testcases/restricted_multinulls/sources/data.csv b/resources/testcases/restricted_multinulls/sources/data.csv deleted file mode 100644 index 8e75edb62..000000000 --- a/resources/testcases/restricted_multinulls/sources/data.csv +++ /dev/null @@ -1,3 +0,0 @@ -, -, -, \ No newline at end of file diff --git a/resources/testcases/restricted_multipieces/sources/data.csv b/resources/testcases/restricted_multipieces/sources/data.csv deleted file mode 100644 index 8e75edb62..000000000 --- a/resources/testcases/restricted_multipieces/sources/data.csv +++ /dev/null @@ -1,3 +0,0 @@ -, -, -, \ No newline at end of file diff --git a/resources/testcases/restricted_only_nulls/sources/data.csv b/resources/testcases/restricted_only_nulls/sources/data.csv deleted file mode 100644 index 8e75edb62..000000000 --- a/resources/testcases/restricted_only_nulls/sources/data.csv +++ /dev/null @@ -1,3 +0,0 @@ -, -, -, \ No newline at end of file diff --git a/resources/testcases/restricted_recursive/sources/dataA.csv b/resources/testcases/restricted_recursive/sources/dataA.csv deleted file mode 100644 index cf0929143..000000000 --- a/resources/testcases/restricted_recursive/sources/dataA.csv +++ /dev/null @@ -1 +0,0 @@ -, \ No newline at end of file diff --git a/resources/testcases/restricted_recursive/sources/dataB.csv b/resources/testcases/restricted_recursive/sources/dataB.csv deleted file mode 100644 index 3bc54418b..000000000 --- a/resources/testcases/restricted_recursive/sources/dataB.csv +++ /dev/null @@ -1 +0,0 @@ -, \ No newline at end of file diff --git a/resources/testcases/restricted_simple/run/result.csv b/resources/testcases/restricted_simple/run/result.csv deleted file mode 100644 index aed43a8c4..000000000 --- a/resources/testcases/restricted_simple/run/result.csv +++ /dev/null @@ -1,3 +0,0 @@ -A,<__Null#9223372036854775809> -B,<__Null#9223372036854775810> -C,<__Null#9223372036854775811> diff --git a/resources/testcases/restricted_simple/sources/data.csv b/resources/testcases/restricted_simple/sources/data.csv deleted file mode 100644 index c3eced12b..000000000 --- a/resources/testcases/restricted_simple/sources/data.csv +++ /dev/null @@ -1,3 +0,0 @@ -A,A -B,C -C,D