vala r1061 - in trunk: . tests



Author: juergbi
Date: Thu Feb 28 21:32:18 2008
New Revision: 1061
URL: http://svn.gnome.org/viewvc/vala?rev=1061&view=rev

Log:
2008-02-28  Juerg 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


Added:
   trunk/tests/expressions-lambda.exp
      - copied unchanged from r1060, /trunk/tests/test-015.exp
   trunk/tests/expressions-lambda.vala
      - copied unchanged from r1060, /trunk/tests/test-015.vala
Removed:
   trunk/tests/test-015.exp
   trunk/tests/test-015.vala
   trunk/tests/test-035.exp
   trunk/tests/test-035.vala
   trunk/tests/test-036.exp
   trunk/tests/test-036.vala
Modified:
   trunk/ChangeLog
   trunk/tests/Makefile.am
   trunk/tests/delegates.exp
   trunk/tests/delegates.vala

Modified: trunk/tests/Makefile.am
==============================================================================
--- trunk/tests/Makefile.am	(original)
+++ trunk/tests/Makefile.am	Thu Feb 28 21:32:18 2008
@@ -20,6 +20,7 @@
 	expressions-relational.vala \
 	expressions-conditional.vala \
 	expressions-assignments.vala \
+	expressions-lambda.vala \
 	statements-selection.vala \
 	statements-jump.vala \
 	namespaces.vala \
@@ -37,7 +38,6 @@
 	delegates.vala \
 	exceptions.vala \
 	\
-	test-015.vala \
 	test-023.vala \
 	test-025.vala \
 	test-026.vala \
@@ -46,8 +46,6 @@
 	test-030.vala \
 	test-031.vala \
 	test-034.vala \
-	test-035.vala \
-	test-036.vala \
 	$(NULL)
 
 EXTRA_DIST = \
@@ -59,6 +57,7 @@
 	expressions-relational.exp \
 	expressions-conditional.exp \
 	expressions-assignments.exp \
+	expressions-lambda.exp \
 	statements-selection.exp \
 	statements-jump.exp \
 	namespaces.exp \
@@ -76,7 +75,6 @@
 	delegates.exp \
 	exceptions.exp \
 	\
-	test-015.exp \
 	test-023.exp \
 	test-025.exp \
 	test-026.exp \
@@ -85,7 +83,5 @@
 	test-030.exp \
 	test-031.exp \
 	test-034.exp \
-	test-035.exp \
-	test-036.exp \
 	$(NULL)
 

Modified: trunk/tests/delegates.exp
==============================================================================
--- trunk/tests/delegates.exp	(original)
+++ trunk/tests/delegates.exp	Thu Feb 28 21:32:18 2008
@@ -1 +1,2 @@
 Delegate Test: 1 2 3 4 5 6 7
+testing function pointers: 1 2 3

Modified: trunk/tests/delegates.vala
==============================================================================
--- trunk/tests/delegates.vala	(original)
+++ trunk/tests/delegates.vala	Thu Feb 28 21:32:18 2008
@@ -28,6 +28,18 @@
 		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");
 		
@@ -50,6 +62,8 @@
 
 		stdout.printf (" 7\n");
 
+		test_function_pointers ();
+
 		return 0;
 	}
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]