From 16d8468b0823744390c9d3fc14b050592f598d33 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Tue, 20 Jan 2009 23:50:02 +0000 Subject: [PATCH] Added more channel end tests, involving abbreviations before use --- testcases/automatic/chan-ends.occ.test | 91 ++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) diff --git a/testcases/automatic/chan-ends.occ.test b/testcases/automatic/chan-ends.occ.test index 7902f51..8c3b2f4 100644 --- a/testcases/automatic/chan-ends.occ.test +++ b/testcases/automatic/chan-ends.occ.test @@ -81,5 +81,96 @@ PROC main() %M foo(c!) +%PASS Output body abbrev, with no direction + CHAN INT d IS c: + d ! 3 +%M + foo(c) + +%FAIL Output body abbrev, with input direction + CHAN INT d IS c: + d ! 3 +%M + foo(c?) + +%PASS Output body abbrev, with output direction + CHAN INT d IS c: + d ! 3 +%M + foo(c!) + +%PASS Output body abbrev dir, with no direction + CHAN INT d! IS c: + d ! 3 +%M + foo(c) + +%FAIL Output body abbrev dir, with input direction + CHAN INT d! IS c: + d ! 3 +%M + foo(c?) + +%PASS Output body abbrev dir, with output direction + CHAN INT d! IS c: + d ! 3 +%M + foo(c!) + + +%PASS Output body abbrev array, with no direction + []CHAN INT d IS [c]: + d[0] ! 3 +%M + foo(c) + +%FAIL Output body abbrev array, with input direction + []CHAN INT d IS [c]: + d[0] ! 3 +%M + foo(c?) + +%PASS Output body abbrev array, with output direction + []CHAN INT d IS [c]: + d[0] ! 3 +%M + foo(c!) + +%PASS Output body abbrev array B, with no direction + []CHAN INT d! IS [c]: + d[0] ! 3 +%M + foo(c) + +%FAIL Output body abbrev array B, with input direction + []CHAN INT d! IS [c]: + d[0] ! 3 +%M + foo(c?) + +%PASS Output body abbrev array B, with output direction + []CHAN INT d! IS [c]: + d[0] ! 3 +%M + foo(c!) + +%PASS Output body abbrev array C, with no direction + []CHAN INT d! IS [c!]: + d[0] ! 3 +%M + foo(c) + +%FAIL Output body abbrev array C, with input direction + []CHAN INT d! IS [c!]: + d[0] ! 3 +%M + foo(c?) + +%PASS Output body abbrev array C, with output direction + []CHAN INT d! IS [c!]: + d[0] ! 3 +%M + foo(c!) + %