changeset 1276:f9ab0f24979d

Adapted unit test for synchronize.
author Marcel Keller <mkeller@cs.au.dk>
date Fri, 09 Oct 2009 16:32:12 +0200
parents b01d3537960d
children 26f7a133172a
files viff/test/test_basic_runtime.py
diffstat 1 files changed, 6 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/viff/test/test_basic_runtime.py	Fri Oct 09 16:27:59 2009 +0200
+++ b/viff/test/test_basic_runtime.py	Fri Oct 09 16:32:12 2009 +0200
@@ -28,17 +28,16 @@
         self.assertEquals(runtime.program_counter, [0])
 
     @protocol
-    def test_simple_operation(self, runtime):
-        """Test an operation which makes no further calls.
+    def test_synchronize(self, runtime):
+        """Test whether synchronize increases the program counter.
 
-        No callbacks are scheduled, and so the program counter is not
-        increased.
-        """
+        Every synchronize operation should have its unique program
+        counter."""
         self.assertEquals(runtime.program_counter, [0])
         runtime.synchronize()
-        self.assertEquals(runtime.program_counter, [0])
+        self.assertEquals(runtime.program_counter, [1])
         runtime.synchronize()
-        self.assertEquals(runtime.program_counter, [0])
+        self.assertEquals(runtime.program_counter, [2])
 
     @protocol
     def test_callback(self, runtime):