viff

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 diff
     1.1 --- a/viff/test/test_basic_runtime.py	Fri Oct 09 16:27:59 2009 +0200
     1.2 +++ b/viff/test/test_basic_runtime.py	Fri Oct 09 16:32:12 2009 +0200
     1.3 @@ -28,17 +28,16 @@
     1.4          self.assertEquals(runtime.program_counter, [0])
     1.5  
     1.6      @protocol
     1.7 -    def test_simple_operation(self, runtime):
     1.8 -        """Test an operation which makes no further calls.
     1.9 +    def test_synchronize(self, runtime):
    1.10 +        """Test whether synchronize increases the program counter.
    1.11  
    1.12 -        No callbacks are scheduled, and so the program counter is not
    1.13 -        increased.
    1.14 -        """
    1.15 +        Every synchronize operation should have its unique program
    1.16 +        counter."""
    1.17          self.assertEquals(runtime.program_counter, [0])
    1.18          runtime.synchronize()
    1.19 -        self.assertEquals(runtime.program_counter, [0])
    1.20 +        self.assertEquals(runtime.program_counter, [1])
    1.21          runtime.synchronize()
    1.22 -        self.assertEquals(runtime.program_counter, [0])
    1.23 +        self.assertEquals(runtime.program_counter, [2])
    1.24  
    1.25      @protocol
    1.26      def test_callback(self, runtime):