From 3d21363e4674d44227d23ad1392b8c8fca4b9c86 Mon Sep 17 00:00:00 2001 From: LtWorf Date: Wed, 6 Oct 2010 21:44:13 +0000 Subject: [PATCH] - Added tests git-svn-id: http://galileo.dmi.unict.it/svn/relational/trunk@258 014f5005-505e-4b48-8d0a-63407b615a7c --- test/c_programmers.query | 1 + test/c_programmers.result | 6 ++++++ test/dates_sel.query | 1 + test/dates_sel.result | 3 +++ test/name_age.query | 1 + test/name_age.result | 9 +++++++++ test/older_than_boss.query | 1 + test/older_than_boss.result | 7 +++++++ test/younger.query | 1 + test/younger.result | 2 ++ 10 files changed, 32 insertions(+) create mode 100644 test/c_programmers.query create mode 100644 test/c_programmers.result create mode 100644 test/dates_sel.query create mode 100644 test/dates_sel.result create mode 100644 test/name_age.query create mode 100644 test/name_age.result create mode 100644 test/older_than_boss.query create mode 100644 test/older_than_boss.result create mode 100644 test/younger.query create mode 100644 test/younger.result diff --git a/test/c_programmers.query b/test/c_programmers.query new file mode 100644 index 0000000..7459738 --- /dev/null +++ b/test/c_programmers.query @@ -0,0 +1 @@ +σ skill=='C'(people ᐅᐊ skills) diff --git a/test/c_programmers.result b/test/c_programmers.result new file mode 100644 index 0000000..34d340e --- /dev/null +++ b/test/c_programmers.result @@ -0,0 +1,6 @@ +id,name,chief,age,skill +2,john,1,30,C +7,alia,1,28,C +5,duncan,4,30,C +0,jack,0,22,C +4,eve,0,25,C diff --git a/test/dates_sel.query b/test/dates_sel.query new file mode 100644 index 0000000..f0774d8 --- /dev/null +++ b/test/dates_sel.query @@ -0,0 +1 @@ +σ date.year>2000 and date.day+10<30 (dates) diff --git a/test/dates_sel.result b/test/dates_sel.result new file mode 100644 index 0000000..e6ff89a --- /dev/null +++ b/test/dates_sel.result @@ -0,0 +1,3 @@ +date +2008-12-12 +2007-08-12 diff --git a/test/name_age.query b/test/name_age.query new file mode 100644 index 0000000..42175ae --- /dev/null +++ b/test/name_age.query @@ -0,0 +1 @@ +ρn➡name,a➡age(πn,a(ρid➡i,name➡n,chief➡c,age➡a(people))) diff --git a/test/name_age.result b/test/name_age.result new file mode 100644 index 0000000..c9cc9bf --- /dev/null +++ b/test/name_age.result @@ -0,0 +1,9 @@ +name,age +eve,25 +dean,33 +carl,20 +paul,30 +john,30 +jack,22 +duncan,30 +alia,28 diff --git a/test/older_than_boss.query b/test/older_than_boss.query new file mode 100644 index 0000000..73ae339 --- /dev/null +++ b/test/older_than_boss.query @@ -0,0 +1 @@ +ρn➡chief_name,a➡chief_age(πname,age,n,a(σ i==chief and age>a (π i,c,n,a(ρage➡a,id➡i,chief➡c,name➡n(people))*people))) diff --git a/test/older_than_boss.result b/test/older_than_boss.result new file mode 100644 index 0000000..92af55b --- /dev/null +++ b/test/older_than_boss.result @@ -0,0 +1,7 @@ +name,age,chief_name,chief_age +dean,33,carl,20 +alia,28,carl,20 +paul,30,eve,25 +eve,25,jack,22 +john,30,carl,20 +duncan,30,eve,25 diff --git a/test/younger.query b/test/younger.query new file mode 100644 index 0000000..6640730 --- /dev/null +++ b/test/younger.query @@ -0,0 +1 @@ +people-π id,name,chief,age(σ age>a(π a(ρ id➡i,age➡a(people))*people)) diff --git a/test/younger.result b/test/younger.result new file mode 100644 index 0000000..f41e0cf --- /dev/null +++ b/test/younger.result @@ -0,0 +1,2 @@ +id,age,chief,name +1,20,0,carl