def test_eof(self): try: ast = sync.parse('synch id (a | b) {') assert(1 != 1) except exn.ParseError as err: self.assertFalse(err.coord) self.assertTrue(err.msg == "Syntax error")
def test_cond_datamsg_3(self): try: ast = sync.parse('synch id (a | b) {state int(1) x; start {on: a.(x, y || t){}}}') assert(1 != 1) except exn.DuplicatesError as err: self.assertTrue(err.msg == "'x' was previously declared")
def test_state_type_4(self): try: ast = sync.parse('synch id (a | b) {store ?v.a x; state int(1) x; start {on: a{}}}') assert(1 != 1) except exn.DuplicatesError as err: self.assertTrue(err.msg == "'x' was previously declared")
def test_state_type_1(self): try: ast = sync.parse('synch id (a | b) {state enum(v,b,v) foo; start {on: a{}}}') assert(1 != 1) except exn.DuplicatesError as err: self.assertTrue(err.msg == "'v' was previously declared")
def test_decl_store_2(self): try: ast = sync.parse('synch id (a, b | c) {store ?v.a ma; store ?v.b ma; start {on: a{}}}') assert(1 != 1) except exn.DuplicatesError as err: self.assertTrue(err.msg == "Store variable 'ma' was previously declared")
def test_output(self): try: ast = sync.parse('synch id (a | b, b) {start {on: a{}}}') assert(1 != 1) except exn.DuplicatesError as err: self.assertTrue(err.msg == "Channel 'b' was previously declared")