diff options
author | Oliver Kellogg <okellogg@users.sourceforge.net> | 2018-01-17 22:01:45 +0100 |
---|---|---|
committer | Oliver Kellogg <okellogg@users.sourceforge.net> | 2018-01-17 22:01:45 +0100 |
commit | 383454e6ee7d814cbfa3e1758f506a90f96b7d13 (patch) | |
tree | 2b29229bce9881567e9eae7e2fe36bf44c1b9c94 | |
parent | 3f751cb31255f9916a5b5ec31f572f4aa1758c96 (diff) | |
download | ATCD-383454e6ee7d814cbfa3e1758f506a90f96b7d13.tar.gz |
* TAO/tests/Bug_3940_Regression :
New test verifies that tao_idl tolerates IDL4 annotations.
-rw-r--r-- | TAO/tests/Bug_3940_Regression/Bug_3940_Regression.mpc | 8 | ||||
-rw-r--r-- | TAO/tests/Bug_3940_Regression/README | 16 | ||||
-rwxr-xr-x | TAO/tests/Bug_3940_Regression/run_test.pl | 21 | ||||
-rw-r--r-- | TAO/tests/Bug_3940_Regression/test.cpp | 6 | ||||
-rw-r--r-- | TAO/tests/Bug_3940_Regression/test.idl | 16 |
5 files changed, 67 insertions, 0 deletions
diff --git a/TAO/tests/Bug_3940_Regression/Bug_3940_Regression.mpc b/TAO/tests/Bug_3940_Regression/Bug_3940_Regression.mpc new file mode 100644 index 00000000000..270fd380329 --- /dev/null +++ b/TAO/tests/Bug_3940_Regression/Bug_3940_Regression.mpc @@ -0,0 +1,8 @@ +// -*- MPC -*- +project(*Test) : taoserver { + exename = test3940 + + Source_Files { + test.cpp + } +} diff --git a/TAO/tests/Bug_3940_Regression/README b/TAO/tests/Bug_3940_Regression/README new file mode 100644 index 00000000000..0f8198c1b8f --- /dev/null +++ b/TAO/tests/Bug_3940_Regression/README @@ -0,0 +1,16 @@ + + +This is a compile only test. If it compiles, it's passed. + +tao_idl choked on the annotation syntax of IDL4 (and DDS-XTypes) +because that syntax was unknown to its IDL grammar: + + tao_idl -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -I../.. -Sa -St test.idl + syntax error + Error - tao_idl: "test.idl", line 3: Illegal syntax following module '{' opener + make[1]: *** [testC.h] Error 1 + +The first patch for this bug adds a rule in the lexer to ignore the annotations +by consuming them without action. +Actual processing of annotations is still to be done. + diff --git a/TAO/tests/Bug_3940_Regression/run_test.pl b/TAO/tests/Bug_3940_Regression/run_test.pl new file mode 100755 index 00000000000..f79da31fcc7 --- /dev/null +++ b/TAO/tests/Bug_3940_Regression/run_test.pl @@ -0,0 +1,21 @@ +eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' + & eval 'exec perl -S $0 $argv:q' + if 0; + +# -*- perl -*- + +use lib "$ENV{ACE_ROOT}/bin"; +use PerlACE::TestTarget; + +my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n"; + +$SV = $server->CreateProcess ("test3940"); + +$test = $SV->SpawnWaitKill ($server->ProcessStartWaitInterval()); + +if ($test != 0) { + print STDERR "ERROR: test returned $test\n"; + exit 1; +} + +exit 0; diff --git a/TAO/tests/Bug_3940_Regression/test.cpp b/TAO/tests/Bug_3940_Regression/test.cpp new file mode 100644 index 00000000000..8b471079b63 --- /dev/null +++ b/TAO/tests/Bug_3940_Regression/test.cpp @@ -0,0 +1,6 @@ +#include "testS.h" + +int ACE_TMAIN (int, ACE_TCHAR *[]) +{ + return 0; +} diff --git a/TAO/tests/Bug_3940_Regression/test.idl b/TAO/tests/Bug_3940_Regression/test.idl new file mode 100644 index 00000000000..d63dfff726a --- /dev/null +++ b/TAO/tests/Bug_3940_Regression/test.idl @@ -0,0 +1,16 @@ +module test { + + @unit("deg") + @range(min=0.0, max=360.0) + typedef float angle_t; + + @unit("degC") @min(-60) @max(100) typedef short temperature_t; + + struct structure { + @key unsigned long key; + angle_t degrees; + temperature_t celsius; + }; + +}; + |