[opengtl-commits] [227] * add the missing "while.ctl" test...

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


Revision: 227
Author:   cyrille
Date:     2008-06-24 21:35:21 +0200 (Tue, 24 Jun 2008)

Log Message:
-----------
* add the missing "while.ctl" test... (which was failing...)
* add a few tests for the various bug fixes of the day

Modified Paths:
--------------
    trunk/OpenGTL/OpenCTL/tests/arithmetic/modulo.ctl
    trunk/OpenGTL/OpenCTL/tests/parse/CMakeLists.txt
    trunk/OpenGTL/OpenCTL/tests/statements/CMakeLists.txt

Added Paths:
-----------
    trunk/OpenGTL/OpenCTL/tests/parse/function_for_empty_statement.ctl
    trunk/OpenGTL/OpenCTL/tests/parse/function_while_complex_statement.ctl
    trunk/OpenGTL/OpenCTL/tests/parse/function_while_test_statement.ctl


Modified: trunk/OpenGTL/OpenCTL/tests/arithmetic/modulo.ctl
===================================================================
--- trunk/OpenGTL/OpenCTL/tests/arithmetic/modulo.ctl	2008-06-24 19:34:34 UTC (rev 226)
+++ trunk/OpenGTL/OpenCTL/tests/arithmetic/modulo.ctl	2008-06-24 19:35:21 UTC (rev 227)
@@ -6,6 +6,8 @@
   Test::check( 2 % 3 == 2, errorcount);
   Test::check( 3 % 2 == 1, errorcount);
   Test::check( 2 % 2 == 0, errorcount);
+  int v = 5;
+  Test::check( v % 3 == 2, errorcount);
   return errorcount;
 
 }

Modified: trunk/OpenGTL/OpenCTL/tests/parse/CMakeLists.txt
===================================================================
--- trunk/OpenGTL/OpenCTL/tests/parse/CMakeLists.txt	2008-06-24 19:34:34 UTC (rev 226)
+++ trunk/OpenGTL/OpenCTL/tests/parse/CMakeLists.txt	2008-06-24 19:35:21 UTC (rev 227)
@@ -24,10 +24,12 @@
   function_compound_statement.ctl
   function_call_function.ctl
   function_for_statement.ctl
+  function_for_empty_statement.ctl
   function_if_statement.ctl
   function_print_statement.ctl
   function_return_statement.ctl
   function_while_statement.ctl
+  function_while_complex_statement.ctl
   function_output_variable.ctl
   function_use_global_constant.ctl
   unaryoperator_tilde_integer.ctl

Added: trunk/OpenGTL/OpenCTL/tests/parse/function_for_empty_statement.ctl
===================================================================
--- trunk/OpenGTL/OpenCTL/tests/parse/function_for_empty_statement.ctl	                        (rev 0)
+++ trunk/OpenGTL/OpenCTL/tests/parse/function_for_empty_statement.ctl	2008-06-24 19:35:21 UTC (rev 227)
@@ -0,0 +1,6 @@
+void variableDefinition()
+{
+  for(; true; )
+  {
+  }
+}

Added: trunk/OpenGTL/OpenCTL/tests/parse/function_while_complex_statement.ctl
===================================================================
--- trunk/OpenGTL/OpenCTL/tests/parse/function_while_complex_statement.ctl	                        (rev 0)
+++ trunk/OpenGTL/OpenCTL/tests/parse/function_while_complex_statement.ctl	2008-06-24 19:35:21 UTC (rev 227)
@@ -0,0 +1,18 @@
+void variableDefinition()
+{
+  float x = 200;
+  float y =  300;
+  while( x ) { }
+  while( x + y <= 2 )
+  {
+  }
+  while( x + y * y <= 2 )
+  {
+  }
+  while( 2 <= y * y + x )
+  {
+  }
+  while( x*x + y*y <= 2 )
+  {
+  }
+}

Added: trunk/OpenGTL/OpenCTL/tests/parse/function_while_test_statement.ctl
===================================================================
--- trunk/OpenGTL/OpenCTL/tests/parse/function_while_test_statement.ctl	                        (rev 0)
+++ trunk/OpenGTL/OpenCTL/tests/parse/function_while_test_statement.ctl	2008-06-24 19:35:21 UTC (rev 227)
@@ -0,0 +1,18 @@
+void variableDefinition()
+{
+  float x = 200;
+  float y =  300;
+  while( x ) { }
+  while( x + y <= 2 )
+  {
+  }
+  while( x + y * y <= 2 )
+  {
+  }
+  while( 2 <= y * y + x )
+  {
+  }
+  while( x*x + y*y <= 2 )
+  {
+  }
+}

Modified: trunk/OpenGTL/OpenCTL/tests/statements/CMakeLists.txt
===================================================================
--- trunk/OpenGTL/OpenCTL/tests/statements/CMakeLists.txt	2008-06-24 19:34:34 UTC (rev 226)
+++ trunk/OpenGTL/OpenCTL/tests/statements/CMakeLists.txt	2008-06-24 19:35:21 UTC (rev 227)
@@ -6,6 +6,7 @@
   return.ctl
   defaultparameter.ctl
   initialiserlist.ctl
+  while.ctl
   )
 
 FOREACH( TEST_FILE ${TESTS_FILES} )


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