[opengtl-commits] [169] add the scope test cases

[ Thread Index | Date Index | More lists.tuxfamily.org/opengtl-commits Archives ]


Revision: 169
Author:   cyrille
Date:     2008-05-19 10:37:52 +0200 (Mon, 19 May 2008)

Log Message:
-----------
add the scope test cases

Added Paths:
-----------
    trunk/OpenGTL/OpenCTL/tests/parse/function_out_of_scope.ctl
    trunk/OpenGTL/OpenCTL/tests/parse/function_scope.ctl
    trunk/OpenGTL/OpenCTL/tests/parse/scoped_library.ctl
    trunk/OpenGTL/OpenCTL/tests/parse/variable_scope.ctl


Added: trunk/OpenGTL/OpenCTL/tests/parse/function_out_of_scope.ctl
===================================================================
--- trunk/OpenGTL/OpenCTL/tests/parse/function_out_of_scope.ctl	                        (rev 0)
+++ trunk/OpenGTL/OpenCTL/tests/parse/function_out_of_scope.ctl	2008-05-19 08:37:52 UTC (rev 169)
@@ -0,0 +1,6 @@
+import "scoped_library";
+
+int main()
+{
+  testFunc();
+}

Added: trunk/OpenGTL/OpenCTL/tests/parse/function_scope.ctl
===================================================================
--- trunk/OpenGTL/OpenCTL/tests/parse/function_scope.ctl	                        (rev 0)
+++ trunk/OpenGTL/OpenCTL/tests/parse/function_scope.ctl	2008-05-19 08:37:52 UTC (rev 169)
@@ -0,0 +1,6 @@
+import "scoped_library";
+
+int main()
+{
+  Scoped::testFunc();
+}

Added: trunk/OpenGTL/OpenCTL/tests/parse/scoped_library.ctl
===================================================================
--- trunk/OpenGTL/OpenCTL/tests/parse/scoped_library.ctl	                        (rev 0)
+++ trunk/OpenGTL/OpenCTL/tests/parse/scoped_library.ctl	2008-05-19 08:37:52 UTC (rev 169)
@@ -0,0 +1,9 @@
+namespace Scoped {
+  const int a = 0;
+  void testFunc()
+  {
+    int b = a;
+    int c = Scoped::a;
+  }
+
+}

Added: trunk/OpenGTL/OpenCTL/tests/parse/variable_scope.ctl
===================================================================
--- trunk/OpenGTL/OpenCTL/tests/parse/variable_scope.ctl	                        (rev 0)
+++ trunk/OpenGTL/OpenCTL/tests/parse/variable_scope.ctl	2008-05-19 08:37:52 UTC (rev 169)
@@ -0,0 +1,7 @@
+import "scoped_library";
+
+int main()
+{
+//  int a = Scoped::a;
+//  int b = Scoped::a;
+}


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/