From 4573cd055279a90693c4cbf5f98ef65ff0983a9c Mon Sep 17 00:00:00 2001
From: "benjamin.franksen" <benjamin.franksen@helmholtz-berlin.de>
Date: Fri, 4 Oct 2013 00:58:17 +0000
Subject: [PATCH] test: adapted to deprecation of foreign declarations

---
 test/compiler/snc_test.plt    | 2 +-
 test/compiler/subscript.st    | 2 +-
 test/validate/assign.st       | 2 --
 test/validate/decl.st         | 8 +-------
 test/validate/foreignTypes.st | 2 --
 test/validate/pvGet.st        | 2 --
 test/validate/raceCommon.st   | 2 --
 test/validate/reassign.st     | 2 --
 8 files changed, 3 insertions(+), 19 deletions(-)

diff --git a/test/compiler/snc_test.plt b/test/compiler/snc_test.plt
index 141b78c5..b148d052 100644
--- a/test/compiler/snc_test.plt
+++ b/test/compiler/snc_test.plt
@@ -7,7 +7,6 @@ use Test::More;
 my $success = {
   cast => 0,
   exOpt_DuplOpt => 0,
-  foreignTypes => 0,
   include_windows_h => 0,
   member => 0,
   namingConflict => 0,
@@ -19,6 +18,7 @@ my $success = {
 
 my $warning = {
   exOpt_UnrecOpt => 1,
+  foreignTypes => 1,
   state_not_reachable => 3,
   syncq_no_size => 1,
 };
diff --git a/test/compiler/subscript.st b/test/compiler/subscript.st
index 0f56f53c..93b102ff 100644
--- a/test/compiler/subscript.st
+++ b/test/compiler/subscript.st
@@ -20,7 +20,7 @@ monitor multiple2;              /* should all have monitored flag */
 ss test {
     state test {
         when (FALSE) {
-            %%multiple2[0] = 0;
+            multiple2[0] = 0;
         } state test
     }
 }
diff --git a/test/validate/assign.st b/test/validate/assign.st
index 76cb0b91..02d32f3e 100644
--- a/test/validate/assign.st
+++ b/test/validate/assign.st
@@ -13,8 +13,6 @@ option +r;
 int x = 0;
 assign x;
 
-foreign pvStatERROR;
-
 #define NTESTS 3
 
 entry {
diff --git a/test/validate/decl.st b/test/validate/decl.st
index 2ceeff3c..f72d55a6 100644
--- a/test/validate/decl.st
+++ b/test/validate/decl.st
@@ -10,8 +10,6 @@ program declTest
 
 option +s;
 
-foreign MAX_STRING_SIZE;
-
 int *(*(*complicated)[2][3])[1] = 0;
 
 evflag ef;
@@ -19,11 +17,7 @@ evflag ef;
 /* struct member access */
 %%struct r { int x; } rv;
 
-/* declare the variable and the tag to avoid warnings */
-foreign rv, x;
-
-%%TS_STAMP ts;
-foreign ts;
+typename TS_STAMP ts;
 
 int var;
 assign var;
diff --git a/test/validate/foreignTypes.st b/test/validate/foreignTypes.st
index 807dfc99..c5e8488b 100644
--- a/test/validate/foreignTypes.st
+++ b/test/validate/foreignTypes.st
@@ -9,8 +9,6 @@ program foreignTypesTest
 %%enum enum_t { zero, one, two };
 %%typedef short typedef_t;
 
-foreign zero, one, two;
-
 struct struct_t s = {1, {0.1}};
 union union_t u = {13};
 enum enum_t e = one;
diff --git a/test/validate/pvGet.st b/test/validate/pvGet.st
index cafa3f82..876e150c 100644
--- a/test/validate/pvGet.st
+++ b/test/validate/pvGet.st
@@ -14,8 +14,6 @@ option +s;
 %%int shared = 0;
 %%epicsMutexId mutex;
 
-foreign shared, mutex;
-
 int anon;
 assign anon;
 
diff --git a/test/validate/raceCommon.st b/test/validate/raceCommon.st
index 6b3bdbfb..03e5f899 100644
--- a/test/validate/raceCommon.st
+++ b/test/validate/raceCommon.st
@@ -16,8 +16,6 @@ assign y to "";
 evflag efx;
 sync x to efx;
 
-foreign MAX_STRING_SIZE;
-
 #define MAX_TESTS 10
 
 entry {
diff --git a/test/validate/reassign.st b/test/validate/reassign.st
index fa9a9413..c0bc8e43 100644
--- a/test/validate/reassign.st
+++ b/test/validate/reassign.st
@@ -15,8 +15,6 @@ assign x to "pv1";
 assign y to "";
 assign z to "pv1";
 
-foreign pvStatOK;
-
 #define NTESTS 30
 
 entry {
-- 
GitLab