]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Rearrange test cases
authorJürg Billeter <j@bitron.ch>
Fri, 14 Nov 2008 08:51:25 +0000 (08:51 +0000)
committerJürg Billeter <juergbi@src.gnome.org>
Fri, 14 Nov 2008 08:51:25 +0000 (08:51 +0000)
2008-11-14  Jürg Billeter  <j@bitron.ch>

* tests/:

Rearrange test cases

svn path=/trunk/; revision=2014

47 files changed:
ChangeLog
tests/Makefile.am
tests/basic-types/expressions-assignments.exp [moved from tests/expressions-assignments.exp with 100% similarity]
tests/basic-types/expressions-assignments.vala [moved from tests/expressions-assignments.vala with 100% similarity]
tests/basic-types/expressions-relational.exp [moved from tests/expressions-relational.exp with 100% similarity]
tests/basic-types/expressions-relational.vala [moved from tests/expressions-relational.vala with 100% similarity]
tests/basic-types/strings.exp [moved from tests/strings.exp with 100% similarity]
tests/basic-types/strings.vala [moved from tests/strings.vala with 100% similarity]
tests/basic-types/test-027.exp [moved from tests/test-027.exp with 100% similarity]
tests/basic-types/test-027.vala [moved from tests/test-027.vala with 100% similarity]
tests/basic-types/test-030.exp [moved from tests/test-030.exp with 100% similarity]
tests/basic-types/test-030.vala [moved from tests/test-030.vala with 100% similarity]
tests/basic-types/test-031.exp [moved from tests/test-031.exp with 100% similarity]
tests/basic-types/test-031.vala [moved from tests/test-031.vala with 100% similarity]
tests/control-flow/break.exp [moved from tests/statements-jump.exp with 100% similarity]
tests/control-flow/break.vala [moved from tests/statements-jump.vala with 100% similarity]
tests/control-flow/expressions-conditional.exp [moved from tests/expressions-conditional.exp with 100% similarity]
tests/control-flow/expressions-conditional.vala [moved from tests/expressions-conditional.vala with 100% similarity]
tests/control-flow/for.exp [moved from tests/statements-iteration.exp with 100% similarity]
tests/control-flow/for.vala [moved from tests/statements-iteration.vala with 100% similarity]
tests/control-flow/switch.exp [moved from tests/statements-selection.exp with 100% similarity]
tests/control-flow/switch.vala [moved from tests/statements-selection.vala with 100% similarity]
tests/interfaces-properties.exp [deleted file]
tests/interfaces-properties.vala [deleted file]
tests/methods/lambda.exp [moved from tests/expressions-lambda.exp with 100% similarity]
tests/methods/lambda.vala [moved from tests/expressions-lambda.vala with 100% similarity]
tests/objects/classes.exp [moved from tests/classes.exp with 100% similarity]
tests/objects/classes.vala [moved from tests/classes.vala with 100% similarity]
tests/objects/fields.exp [moved from tests/classes-fields.exp with 100% similarity]
tests/objects/fields.vala [moved from tests/classes-fields.vala with 100% similarity]
tests/objects/interfaces.exp [moved from tests/interfaces.exp with 100% similarity]
tests/objects/interfaces.vala [moved from tests/interfaces.vala with 100% similarity]
tests/objects/methods.exp [moved from tests/classes-methods.exp with 100% similarity]
tests/objects/methods.vala [moved from tests/classes-methods.vala with 100% similarity]
tests/objects/properties.exp [moved from tests/classes-properties.exp with 82% similarity]
tests/objects/properties.vala [moved from tests/classes-properties.vala with 83% similarity]
tests/objects/signals.exp [moved from tests/classes-signals.exp with 100% similarity]
tests/objects/signals.vala [moved from tests/classes-signals.vala with 100% similarity]
tests/objects/test-025.exp [moved from tests/test-025.exp with 100% similarity]
tests/objects/test-025.vala [moved from tests/test-025.vala with 100% similarity]
tests/objects/test-026.exp [moved from tests/test-026.exp with 100% similarity]
tests/objects/test-026.vala [moved from tests/test-026.vala with 100% similarity]
tests/objects/test-029.exp [moved from tests/test-029.exp with 100% similarity]
tests/objects/test-029.vala [moved from tests/test-029.vala with 100% similarity]
tests/objects/test-034.exp [moved from tests/test-034.exp with 100% similarity]
tests/objects/test-034.vala [moved from tests/test-034.vala with 100% similarity]
tests/testrunner.sh

index 885af2840fea616d53fd653d664fd29cf9ed827d..80824ea410755d97c78487fba703e9f86fda3b13 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-11-14  Jürg Billeter  <j@bitron.ch>
+
+       * tests/:
+
+       Rearrange test cases
+
 2008-11-13  Jürg Billeter  <j@bitron.ch>
 
        * vala/valacodecontext.vala:
index caa962578f41b504d8ca2127e851a1d2d7cef5e3..1a81e19301e8f4d0776561d3b46a368153dbe58f 100644 (file)
@@ -16,37 +16,35 @@ TESTS_ENVIRONMENT = EXEEXT=$(EXEEXT) $(srcdir)/testrunner.sh
 
 TESTS = \
        hello.vala \
-       strings.vala \
-       expressions-relational.vala \
-       expressions-conditional.vala \
-       expressions-assignments.vala \
-       expressions-lambda.vala \
-       statements-selection.vala \
-       statements-iteration.vala \
-       statements-jump.vala \
+       basic-types/expressions-assignments.vala \
+       basic-types/expressions-relational.vala \
+       basic-types/strings.vala \
+       basic-types/test-027.vala \
+       basic-types/test-030.vala \
+       basic-types/test-031.vala \
        namespaces.vala \
-       classes.vala \
-       classes-fields.vala \
-       classes-methods.vala \
-       classes-properties.vala \
-       classes-signals.vala \
-       structs.vala \
-       interfaces.vala \
-       interfaces-properties.vala \
-       enums.vala \
+       methods/lambda.vala \
+       control-flow/break.vala \
+       control-flow/expressions-conditional.vala \
+       control-flow/for.vala \
+       control-flow/switch.vala \
        arrays.vala \
-       pointers.vala \
+       enums.vala \
+       structs.vala \
        delegates.vala \
+       objects/classes.vala \
+       objects/fields.vala \
+       objects/interfaces.vala \
+       objects/methods.vala \
+       objects/properties.vala \
+       objects/signals.vala \
+       objects/test-025.vala \
+       objects/test-026.vala \
+       objects/test-029.vala \
+       objects/test-034.vala \
        exceptions.vala \
-       \
+       pointers.vala \
        test-023.vala \
-       test-025.vala \
-       test-026.vala \
-       test-027.vala \
-       test-029.vala \
-       test-030.vala \
-       test-031.vala \
-       test-034.vala \
        $(NULL)
 
 EXTRA_DIST = \
@@ -54,36 +52,34 @@ EXTRA_DIST = \
        $(TESTS) \
        \
        hello.exp \
-       strings.exp \
-       expressions-relational.exp \
-       expressions-conditional.exp \
-       expressions-assignments.exp \
-       expressions-lambda.exp \
-       statements-selection.exp \
-       statements-iteration.exp \
-       statements-jump.exp \
+       basic-types/expressions-assignments.exp \
+       basic-types/expressions-relational.exp \
+       basic-types/strings.exp \
+       basic-types/test-027.exp \
+       basic-types/test-030.exp \
+       basic-types/test-031.exp \
        namespaces.exp \
-       classes.exp \
-       classes-fields.exp \
-       classes-methods.exp \
-       classes-properties.exp \
-       classes-signals.exp \
-       structs.exp \
-       interfaces.exp \
-       interfaces-properties.exp \
-       enums.exp \
+       methods/lambda.exp \
+       control-flow/break.exp \
+       control-flow/expressions-conditional.exp \
+       control-flow/for.exp \
+       control-flow/switch.exp \
        arrays.exp \
-       pointers.exp \
+       enums.exp \
+       structs.exp \
        delegates.exp \
+       objects/classes.exp \
+       objects/fields.exp \
+       objects/interfaces.exp \
+       objects/methods.exp \
+       objects/properties.exp \
+       objects/signals.exp \
+       objects/test-025.exp \
+       objects/test-026.exp \
+       objects/test-029.exp \
+       objects/test-034.exp \
        exceptions.exp \
-       \
+       pointers.exp \
        test-023.exp \
-       test-025.exp \
-       test-026.exp \
-       test-027.exp \
-       test-029.exp \
-       test-030.exp \
-       test-031.exp \
-       test-034.exp \
        $(NULL)
 
diff --git a/tests/interfaces-properties.exp b/tests/interfaces-properties.exp
deleted file mode 100644 (file)
index d5d0c6d..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Interface Properties Test: 1 2 3
diff --git a/tests/interfaces-properties.vala b/tests/interfaces-properties.vala
deleted file mode 100644 (file)
index b65fc5f..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-using GLib;
-
-interface Maman.Ibaz : Object {
-       public abstract int number { get; }
-
-       public void simple_method () {
-               int n = number;
-               stdout.printf (" %d", n);
-       }
-}
-
-class Maman.Baz : Object, Ibaz {
-       public int number {
-               get { return 2; }
-       }
-}
-
-class Maman.SubBaz : Baz {
-       static int main (string[] args) {
-               stdout.printf ("Interface Properties Test: 1");
-
-               Ibaz ibaz = new Baz ();
-               ibaz.simple_method ();
-       
-               stdout.printf (" 3\n");
-
-               return 0;
-       }
-}
similarity index 100%
rename from tests/classes.exp
rename to tests/objects/classes.exp
similarity index 82%
rename from tests/classes-properties.exp
rename to tests/objects/properties.exp
index 33fd11340f7182a87631f8238893ff40a3d995db..ee2398dd05b39dc753388d6e757acdbde21aa7eb 100644 (file)
@@ -4,3 +4,4 @@ name: TheNewName
 read_only: InitialReadOnly
 automatic: TheNewAutomatic
 Property Test: 1 2 3 4 5 6 7
+Interface Properties Test: 1 2 3
similarity index 83%
rename from tests/classes-properties.vala
rename to tests/objects/properties.vala
index 6fec5375b80fbb09d76423743580d6b3e775081a..e3571d089754dc544b665155e0eed9fda436445d 100644 (file)
@@ -49,6 +49,13 @@ public class Sample : Object {
 
                Maman.Bar.run ();
 
+               stdout.printf ("Interface Properties Test: 1");
+
+               Maman.Ibaz ibaz = new Maman.Baz ();
+               ibaz.simple_method ();
+       
+               stdout.printf (" 3\n");
+
                return 0;
        }
 }
@@ -91,3 +98,17 @@ class Maman.Bar : Foo {
        }
 }
 
+interface Maman.Ibaz : Object {
+       public abstract int number { get; }
+
+       public void simple_method () {
+               int n = number;
+               stdout.printf (" %d", n);
+       }
+}
+
+class Maman.Baz : Object, Ibaz {
+       public int number {
+               get { return 2; }
+       }
+}
index 99026bfe9a8aa32a894523988f6b3ae920658742..96a92092f4ac29b4ba06f0bc8ccc80df66bf7905 100755 (executable)
@@ -42,27 +42,26 @@ CODE=0
 for testcasesource in "$@"
 do
        testsrc=${testcasesource/.vala/}
-       testbuild=`basename "$testsrc"`
-       if ! $VALAC -C --vapidir "$vapidir" --basedir $topsrcdir -d $topbuilddir $testsrc.vala > $testbuild.err 2>&1
+       if ! $VALAC -C --vapidir "$vapidir" --basedir $topsrcdir -d $topbuilddir $testsrc.vala > $testsrc.err 2>&1
        then
                echo "ERROR: Compiling" $testcasesource 
-               cat $testbuild.err
+               cat $testsrc.err
                CODE=1
                continue
        fi
-       if ! $CC $CFLAGS $testbuild.c $(pkg-config --cflags --libs gobject-2.0) -o $testbuild $LDLIBS > $testbuild.err 2>&1
+       if ! $CC $CFLAGS $testsrc.c $(pkg-config --cflags --libs gobject-2.0) -o $testsrc $LDLIBS > $testsrc.err 2>&1
        then
-               echo "ERROR: Compiling" $testbuild.c
-               cat $testbuild.err
+               echo "ERROR: Compiling" $testsrc.c
+               cat $testsrc.err
                CODE=1
                continue
        fi
-       if ./$testbuild 2>&1 | tee $testbuild.err | cmp -s $testsrc.exp
+       if ./$testsrc 2>&1 | tee $testsrc.err | cmp -s $testsrc.exp
        then
-               rm $testbuild.c $testbuild.h $testbuild$exe $testbuild.err
+               rm $testsrc.c $testsrc.h $testsrc$exe $testsrc.err
        else
-               echo "ERROR: test failed. This is the difference between" $testbuild.exp "and" $testbuild.err
-               diff -u $testbuild.exp $testbuild.err
+               echo "ERROR: test failed. This is the difference between" $testsrc.exp "and" $testsrc.err
+               diff -u $testsrc.exp $testsrc.err
                CODE=1
        fi
 done