+2008-02-28 Jürg Billeter <j@bitron.ch>
+
+ * tests/Makefile.am, tests/delegates.exp, tests/delegates.vala,
+ tests/expressions-lambda.exp, tests/expressions-lambda.vala:
+ combine and rename some tests
+
2008-02-28 Raffaele Sandrini <raffaele@sandrini.ch>
* gobject/valaccodegeneratormethod.vala: fix instance delegate handling
expressions-relational.vala \
expressions-conditional.vala \
expressions-assignments.vala \
+ expressions-lambda.vala \
statements-selection.vala \
statements-jump.vala \
namespaces.vala \
delegates.vala \
exceptions.vala \
\
- test-015.vala \
test-023.vala \
test-025.vala \
test-026.vala \
test-030.vala \
test-031.vala \
test-034.vala \
- test-035.vala \
- test-036.vala \
$(NULL)
EXTRA_DIST = \
expressions-relational.exp \
expressions-conditional.exp \
expressions-assignments.exp \
+ expressions-lambda.exp \
statements-selection.exp \
statements-jump.exp \
namespaces.exp \
delegates.exp \
exceptions.exp \
\
- test-015.exp \
test-023.exp \
test-025.exp \
test-026.exp \
test-030.exp \
test-031.exp \
test-034.exp \
- test-035.exp \
- test-036.exp \
$(NULL)
Delegate Test: 1 2 3 4 5 6 7
+testing function pointers: 1 2 3
instance_cb (42);
}
+ static void test_function_pointers () {
+ stdout.printf ("testing function pointers:");
+ var table = new HashTable<string, Bar>.full (str_hash, str_equal, g_free, Object.unref);
+ stdout.printf (" 1");
+
+ table.insert ("foo", new Bar ());
+ stdout.printf (" 2");
+
+ var bar = table.lookup ("foo");
+ stdout.printf (" 3\n");
+ }
+
static int main (string[] args) {
stdout.printf ("Delegate Test: 1");
stdout.printf (" 7\n");
+ test_function_pointers ();
+
return 0;
}
}
+++ /dev/null
-before switch: Hello World
-within switch: Hello World
-behind switch: Hello World
+++ /dev/null
-using GLib;
-
-class SwitchTest : Object {
- static void main () {
- var foo = "Hello World";
- var bar = 0;
-
- stdout.printf ("before switch: %s\n", foo);
-
- switch (bar) {
- case 0:
- stdout.printf ("within switch: %s\n", foo);
- break;
- }
-
- stdout.printf ("behind switch: %s\n", foo);
- }
-}
+++ /dev/null
-testing function pointers: 1 2 3
+++ /dev/null
-using GLib;
-
-class Maman.Bar : GLib.Object {
- static void main () {
- stdout.printf ("testing function pointers:");
- var table = new HashTable<string, Bar>.full (str_hash, str_equal, g_free, Object.unref);
- stdout.printf (" 1");
-
- table.insert ("foo", new Bar ());
- stdout.printf (" 2");
-
- var bar = table.lookup ("foo");
- stdout.printf (" 3\n");
- }
-}