summaryrefslogtreecommitdiff
path: root/TAO/tests/IDL_Test
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2007-08-20 15:58:51 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2007-08-20 15:58:51 +0000
commit28f98dbeceb3e384a5e11f833c75044865d10512 (patch)
tree75f7ac0a50766a1ccc7c232a3315d89a31eea03f /TAO/tests/IDL_Test
parent2569ef63e0e5ba7c5ab2311bc5109efb6f97abcd (diff)
downloadATCD-28f98dbeceb3e384a5e11f833c75044865d10512.tar.gz
ChangeLogTag: Mon Aug 20 15:57:00 UTC 2007 Jeff Parsons <j.parsons@vanderbilt.edu>
Diffstat (limited to 'TAO/tests/IDL_Test')
-rw-r--r--TAO/tests/IDL_Test/dif2.idl89
-rw-r--r--TAO/tests/IDL_Test/inherit.idl52
-rw-r--r--TAO/tests/IDL_Test/module.idl20
-rw-r--r--TAO/tests/IDL_Test/old_array.idl62
-rw-r--r--TAO/tests/IDL_Test/old_constants.idl57
-rw-r--r--TAO/tests/IDL_Test/old_sequence.idl27
-rw-r--r--TAO/tests/IDL_Test/old_struct.idl57
-rw-r--r--TAO/tests/IDL_Test/old_union.idl62
-rw-r--r--TAO/tests/IDL_Test/old_union2.idl32
-rw-r--r--TAO/tests/IDL_Test/primtypes.idl52
-rw-r--r--TAO/tests/IDL_Test/simple.idl39
-rw-r--r--TAO/tests/IDL_Test/simple2.idl44
12 files changed, 461 insertions, 132 deletions
diff --git a/TAO/tests/IDL_Test/dif2.idl b/TAO/tests/IDL_Test/dif2.idl
index 4aa20b0a751..5f605c3b16d 100644
--- a/TAO/tests/IDL_Test/dif2.idl
+++ b/TAO/tests/IDL_Test/dif2.idl
@@ -1,52 +1,103 @@
// $Id$
-/* A test interface for DIF1 */
+// ============================================================================
+//
+// = LIBRARY
+// TAO/tests/IDL_Test
+//
+// = FILENAME
+// dif2.idl
+//
+// = DESCRIPTION
+// Tests of interface operations and attributes in IDL constructs
+//
+// = AUTHORS
+// Andy Gokhale <gokhale@dre.vanderbilt.edu>
+//
+// ============================================================================
module OldDif2
{
interface ex1
{
- void op0();
- float op1(in float f, out double d, inout long l);
- double op2(in double d, out long l, inout short s);
- long op3(in long l, out short s, inout unsigned long ul);
- short op4(in short s, out unsigned long ul, inout unsigned short us);
- unsigned long op5(inout unsigned long ul, in unsigned short us, out char c, in boolean b);
- unsigned short op6(out unsigned short us, inout char c);
+ void op0 ();
+
+ float op1 (in float f,
+ out double d,
+ inout long l);
+
+ double op2 (in double d,
+ out long l,
+ inout short s);
+
+ long op3 (in long l,
+ out short s,
+ inout unsigned long ul);
+
+ short op4 (in short s,
+ out unsigned long ul,
+ inout unsigned short us);
+
+ unsigned long op5 (inout unsigned long ul,
+ in unsigned short us,
+ out char c,
+ in boolean b);
+
+ unsigned short op6 (out unsigned short us,
+ inout char c);
};
- //interface ex3;
-
interface ex2 : ex1
{
- // operations continued from ex1
- char op7(in char c, out boolean b, inout octet o);
- boolean op8(out boolean b, in octet o);
- octet op9(inout octet o, out string s, in string <10> ls, inout long l);
- string op10(in string s, out string <10> ls);
- string <10> op11(inout string <10> ls, out long l);
- long op12(in long l);
- // ex3 op13(Environment *ev);
+ // Operations continued from ex1.
+ char op7 (in char c,
+ out boolean b,
+ inout octet o);
+
+ boolean op8 (out boolean b,
+ in octet o);
+
+ octet op9 (inout octet o,
+ out string s,
+ in string <10> ls,
+ inout long l);
+
+ string op10 (in string s,
+ out string <10> ls);
+
+ string <10> op11 (inout string <10> ls,
+ out long l);
+
+ long op12 (in long l);
};
interface ex3 : ex1
{
- // attributes
readonly attribute float float_attribute;
+
attribute double double_attribute;
+
readonly attribute long long_attribute;
+
attribute short short_attribute;
+
readonly attribute unsigned long unsigned_long_attribute;
};
interface ex4 : ex2, ex3
{
attribute unsigned short unsigned_short_attribute;
+
readonly attribute char char_attribute;
+
attribute boolean boolean_attribute;
+
readonly attribute octet octet_attribute;
+
attribute string string_attribute;
+
readonly attribute string <10> limited_string_attribute;
+
readonly attribute ex4 an_object_attribute;
};
};
diff --git a/TAO/tests/IDL_Test/inherit.idl b/TAO/tests/IDL_Test/inherit.idl
index 390f8d7e98e..ea6d952f47a 100644
--- a/TAO/tests/IDL_Test/inherit.idl
+++ b/TAO/tests/IDL_Test/inherit.idl
@@ -1,19 +1,43 @@
// $Id$
-interface one {
- void op_one();
-};
-interface two : one {
- void op_two();
-};
-interface three : one {
- void op_three();
-};
-interface four : two, three {
- void op_four();
-};
+// ============================================================================
+//
+// = LIBRARY
+// TAO/tests/IDL_Test
+//
+// = FILENAME
+// inherit.idl
+//
+// = DESCRIPTION
+// Tests of interface inheritance in IDL constructs
+//
+// = AUTHORS
+// Andy Gokhale <gokhale@dre.vanderbilt.edu>
+//
+// ============================================================================
+
+module OldInherit
+{
+ interface one
+ {
+ void op_one ();
+ };
+ interface two : one
+ {
+ void op_two ();
+ };
+ interface three : one
+ {
+ void op_three ();
+ };
+ interface four : two, three
+ {
+ void op_four ();
+ };
-interface five : four, three, two {
- void op_five();
+ interface five : four, three, two
+ {
+ void op_five ();
+ };
};
diff --git a/TAO/tests/IDL_Test/module.idl b/TAO/tests/IDL_Test/module.idl
index 49840e61c29..bf4d84b5185 100644
--- a/TAO/tests/IDL_Test/module.idl
+++ b/TAO/tests/IDL_Test/module.idl
@@ -1,5 +1,21 @@
// $Id$
+// ============================================================================
+//
+// = LIBRARY
+// TAO/tests/IDL_Test
+//
+// = FILENAME
+// module.idl
+//
+// = DESCRIPTION
+// Tests of module IDL constructs
+//
+// = AUTHORS
+// Andy Gokhale <gokhale@dre.vanderbilt.edu>
+//
+// ============================================================================
+
module mod1
{
module mod2
@@ -9,14 +25,14 @@ module mod1
attribute long l1;
readonly attribute long l2;
- long m1(in long a);
+ long m1 (in long a);
};
interface ex2 : ex1
{
attribute long l3;
- long m2(in long a, out long b);
+ long m2 (in long a, out long b);
};
};
};
diff --git a/TAO/tests/IDL_Test/old_array.idl b/TAO/tests/IDL_Test/old_array.idl
index 1c5b64c3b4a..fdd9b264bf7 100644
--- a/TAO/tests/IDL_Test/old_array.idl
+++ b/TAO/tests/IDL_Test/old_array.idl
@@ -1,5 +1,21 @@
// $Id$
+// ============================================================================
+//
+// = LIBRARY
+// TAO/tests/IDL_Test
+//
+// = FILENAME
+// old_array.idl
+//
+// = DESCRIPTION
+// Tests of array IDL constructs
+//
+// = AUTHORS
+// Andy Gokhale <gokhale@dre.vanderbilt.edu>
+//
+// ============================================================================
+
#include "simple.idl"
module OldArray
@@ -8,21 +24,23 @@ module OldArray
typedef boolean boolarray[3][40];
- struct A {
- long a1;
- char a2[17];
- char a3[10][2];
- // vec10 a3;
+ struct A
+ {
+ long a1;
+ char a2[17];
+ char a3[10][2];
};
- struct B {
- long b1;
- A b2;
+ struct B
+ {
+ long b1;
+ A b2;
};
- struct C {
- long c1;
- long c2;
+ struct C
+ {
+ long c1;
+ long c2;
};
typedef A A_matrix[2][3][4];
@@ -31,13 +49,21 @@ module OldArray
typedef A_matrix A_rmatrix[2][3][4][5];
- interface A_i {
- A op(in A a1, inout A a2, out A a3);
- str22 op2(in str22 a1, inout str22 a2, out str22 a3);
- // str22 op3(in short a1[3][4], inout short a2[3][4], out short a3[4][4]);
- A_matrix op4(in A a1, inout A a2, out A a3);
- attribute str22 attribute_array;
- // void foo(in any x[3], out any y[4], inout any z[3]);
+ interface A_i
+ {
+ A op (in A a1,
+ inout A a2,
+ out A a3);
+
+ str22 op2 (in str22 a1,
+ inout str22 a2,
+ out str22 a3);
+
+ A_matrix op4 (in A a1,
+ inout A a2,
+ out A a3);
+
+ attribute str22 attribute_array;
};
};
diff --git a/TAO/tests/IDL_Test/old_constants.idl b/TAO/tests/IDL_Test/old_constants.idl
index 712e31ae176..6c8a8cc8301 100644
--- a/TAO/tests/IDL_Test/old_constants.idl
+++ b/TAO/tests/IDL_Test/old_constants.idl
@@ -1,34 +1,73 @@
// $Id$
+// ============================================================================
+//
+// = LIBRARY
+// TAO/tests/IDL_Test
+//
+// = FILENAME
+// old_constants.idl
+//
+// = DESCRIPTION
+// Tests of const IDL constructs
+//
+// = AUTHORS
+// Andy Gokhale <gokhale@dre.vanderbilt.edu>
+//
+// ============================================================================
+
module OldConstants
{
const short l = 4;
- enum N { zero, un , deux, trois };
+ enum N
+ {
+ zero,
+ un,
+ deux,
+ trois
+ };
- exception E {
+ exception E
+ {
short cause ;
};
- module M {
+ module M
+ {
const short l = 4;
- enum N { zero, un , deux, trois };
+ enum N
+ {
+ zero,
+ un,
+ deux,
+ trois
+ };
- exception E {
+ exception E
+ {
short cause ;
};
- interface A {
+ interface A
+ {
const short l = 4;
- enum N { zero, un , deux, trois };
+ enum N
+ {
+ zero,
+ un,
+ deux,
+ trois
+ };
- exception E {
+ exception E
+ {
short cause ;
};
- N foo(in N x, out N y, inout N z);
+ N foo (in N x, out N y, inout N z);
};
};
};
diff --git a/TAO/tests/IDL_Test/old_sequence.idl b/TAO/tests/IDL_Test/old_sequence.idl
index d9f8b3e900e..a1380a49249 100644
--- a/TAO/tests/IDL_Test/old_sequence.idl
+++ b/TAO/tests/IDL_Test/old_sequence.idl
@@ -1,18 +1,37 @@
// $Id$
+// ============================================================================
+//
+// = LIBRARY
+// TAO/tests/IDL_Test
+//
+// = FILENAME
+// old_struct.idl
+//
+// = DESCRIPTION
+// Tests of sequence IDL constructs
+//
+// = AUTHORS
+// Andy Gokhale <gokhale@dre.vanderbilt.edu>
+//
+// ============================================================================
+
#include "simple.idl"
typedef sequence<char,20> c20;
typedef sequence<c20,23> cc23;
typedef sequence<char,24> c24;
typedef sequence< sequence<long,10>, 10> c30;
-struct TProgram {
+
+struct TProgram
+{
string path;
sequence<string> argv;
sequence<string> envp;
};
-struct sfoo {
+struct sfoo
+{
long f1;
char f2;
};
@@ -21,8 +40,8 @@ typedef sfoo sfoo_ar[20];
typedef sequence<sfoo> f_unbounded;
typedef sequence<sfoo_ar> f_ar_unbounded;
-interface TestSeq {
+interface TestSeq
+{
attribute f_unbounded fattr;
typedef sequence<long,10> also_vec10;
-// vec10 op(in also_vec10 a, out vec10 b, inout sequence <long,10> c);
};
diff --git a/TAO/tests/IDL_Test/old_struct.idl b/TAO/tests/IDL_Test/old_struct.idl
index 924dee5c783..424c5e5b958 100644
--- a/TAO/tests/IDL_Test/old_struct.idl
+++ b/TAO/tests/IDL_Test/old_struct.idl
@@ -1,23 +1,43 @@
// $Id$
-struct bar1 {
+// ============================================================================
+//
+// = LIBRARY
+// TAO/tests/IDL_Test
+//
+// = FILENAME
+// old_struct.idl
+//
+// = DESCRIPTION
+// Tests of struct IDL constructs
+//
+// = AUTHORS
+// Andy Gokhale <gokhale@dre.vanderbilt.edu>
+//
+// ============================================================================
+
+struct bar1
+{
long b1;
long b2;
string<20> b3;
};
-struct bar2 {
+struct bar2
+{
long b3;
bar1 b4;
};
-struct bar3 {
- long b1;
- long b2;
- long b3;
+struct bar3
+{
+ long b1;
+ long b2;
+ long b3;
};
-struct bar4 {
+struct bar4
+{
long b1;
bar2 b2;
long b3;
@@ -26,28 +46,35 @@ struct bar4 {
};
-interface foo1 {
- long op(in bar1 a, out bar2 b);
+interface foo1
+{
+ long op (in bar1 a, out bar2 b);
};
-interface foo2 : foo1 {
- bar1 op2(in bar2 a);
- long op3(in long a, out char b);
+
+interface foo2 : foo1
+{
+ bar1 op2 (in bar2 a);
+
+ long op3 (in long a, out char b);
};
typedef unsigned short Coord;
-struct CellPos {
+struct CellPos
+{
Coord row;
Coord col;
};
-struct CellPos2 {
+struct CellPos2
+{
unsigned short row;
unsigned short col;
};
-struct CellPos3 {
+struct CellPos3
+{
Coord row;
Coord col;
unsigned short col2;
diff --git a/TAO/tests/IDL_Test/old_union.idl b/TAO/tests/IDL_Test/old_union.idl
index a076b915b80..163d3db67ee 100644
--- a/TAO/tests/IDL_Test/old_union.idl
+++ b/TAO/tests/IDL_Test/old_union.idl
@@ -1,29 +1,53 @@
// $Id$
-struct Bar {
- long b1;
- char b2;
-};
+// ============================================================================
+//
+// = LIBRARY
+// TAO/tests/IDL_Test
+//
+// = FILENAME
+// old_union.idl
+//
+// = DESCRIPTION
+// Tests of union IDL constructs
+//
+// = AUTHORS
+// Andy Gokhale <gokhale@dre.vanderbilt.edu>
+//
+// ============================================================================
-union Foo switch (long) {
- case 1: long x;
- case 2: Bar y;
- default: char z;
-};
+module OldUnion
+{
+ struct Bar
+ {
+ long b1;
+ char b2;
+ };
+ union Foo switch (long)
+ {
+ case 1: long x;
+ case 2: Bar y;
+ default: char z;
+ };
-union Foo2 switch (char) {
- case 'a': long x;
- case 'b': Foo y;
-};
-interface a {
- struct astruct {
- Foo2 a1;
- Foo a2;
- Bar a3;
+ union Foo2 switch (char)
+ {
+ case 'a': long x;
+ case 'b': Foo y;
};
- Foo2 opA(in astruct b);
+ interface a
+ {
+ struct astruct
+ {
+ Foo2 a1;
+ Foo a2;
+ Bar a3;
+ };
+
+ Foo2 opA (in astruct b);
+ };
};
diff --git a/TAO/tests/IDL_Test/old_union2.idl b/TAO/tests/IDL_Test/old_union2.idl
index d538e82441c..9fd2dd2c645 100644
--- a/TAO/tests/IDL_Test/old_union2.idl
+++ b/TAO/tests/IDL_Test/old_union2.idl
@@ -1,25 +1,45 @@
// $Id$
+// ============================================================================
+//
+// = LIBRARY
+// TAO/tests/IDL_Test
+//
+// = FILENAME
+// old_union2.idl
+//
+// = DESCRIPTION
+// Further tests of union IDL constructs
+//
+// = AUTHORS
+// Andy Gokhale <gokhale@dre.vanderbilt.edu>
+//
+// ============================================================================
+
module OldUnion2
{
- enum FooDisc {
+ enum FooDisc
+ {
FOO1,
FOO2
};
- union Foo switch (FooDisc) {
+ union Foo switch (FooDisc)
+ {
case FOO1: long x;
case FOO2: string y;
- // default: char z;
};
- struct Bar {
- enum BarDisc {
+ struct Bar
+ {
+ enum BarDisc
+ {
BAR1,
BAR2
} kind;
- union Foo switch (BarDisc) {
+ union Foo switch (BarDisc)
+ {
case BAR1: long x;
case BAR2: long y;
} addr;
diff --git a/TAO/tests/IDL_Test/primtypes.idl b/TAO/tests/IDL_Test/primtypes.idl
index 38027f5d790..12b2a2c2324 100644
--- a/TAO/tests/IDL_Test/primtypes.idl
+++ b/TAO/tests/IDL_Test/primtypes.idl
@@ -1,25 +1,57 @@
// $Id$
+// ============================================================================
+//
+// = LIBRARY
+// TAO/tests/IDL_Test
+//
+// = FILENAME
+// primtypes.idl
+//
+// = DESCRIPTION
+// Tests of primitive types in IDL
+//
+// = AUTHORS
+// Andy Gokhale <gokhale@dre.vanderbilt.edu>
+//
+// ============================================================================
+
module OldPrimTypes
{
interface ex1
{
attribute long l1;
- long m1(in long a);
- ex1 mtypes(in long a1, inout long a2, out long a3,
- in unsigned long b1, inout unsigned long b2, out unsigned long b3,
- in short c1,inout short c2, out short c3,
- in unsigned short d1, inout unsigned short d2, out unsigned short d3,
- in float e1, inout float e2, out float e3,
- in double f1, inout double f2, out double f3,
- in char g1, inout char g2, out char g3);
+
+ long m1 (in long a);
+
+ ex1 mtypes (in long a1,
+ inout long a2,
+ out long a3,
+ in unsigned long b1,
+ inout unsigned long b2,
+ out unsigned long b3,
+ in short c1,
+ inout short c2,
+ out short c3,
+ in unsigned short d1,
+ inout unsigned short d2,
+ out unsigned short d3,
+ in float e1,
+ inout float e2,
+ out float e3,
+ in double f1,
+ inout double f2,
+ out double f3,
+ in char g1,
+ inout char g2,
+ out char g3);
};
interface ex2 : ex1
{
readonly attribute long l2;
- long m2(in long a, out long b);
- void mv();
+ long m2 (in long a, out long b);
+ void mv ();
};
};
diff --git a/TAO/tests/IDL_Test/simple.idl b/TAO/tests/IDL_Test/simple.idl
index 136961cb06c..f12b4c92458 100644
--- a/TAO/tests/IDL_Test/simple.idl
+++ b/TAO/tests/IDL_Test/simple.idl
@@ -1,18 +1,45 @@
// $Id$
+// ============================================================================
+//
+// = LIBRARY
+// TAO/tests/IDL_Test
+//
+// = FILENAME
+// simple.idl
+//
+// = DESCRIPTION
+// Tests of simple IDL
+//
+// = AUTHORS
+// Andy Gokhale <gokhale@dre.vanderbilt.edu>
+//
+// ============================================================================
+
typedef sequence<long,10> vec10;
-exception simple_error {
+exception simple_error
+{
long reason;
};
-interface simple {
- long op(in long a, out simple b, inout long c) raises (simple_error);
+interface simple
+{
+ long op (in long a,
+ out simple b,
+ inout long c)
+ raises (simple_error);
};
-interface simple2 : simple {
- exception simple2_error {
+interface simple2 : simple
+{
+ exception simple2_error
+ {
long reason2;
};
- long op2(in long a, in simple b, out simple2 c) raises (simple2_error);
+
+ long op2 (in long a,
+ in simple b,
+ out simple2 c)
+ raises (simple2_error);
};
diff --git a/TAO/tests/IDL_Test/simple2.idl b/TAO/tests/IDL_Test/simple2.idl
index 1a986ddd321..afad6e2e0e1 100644
--- a/TAO/tests/IDL_Test/simple2.idl
+++ b/TAO/tests/IDL_Test/simple2.idl
@@ -1,31 +1,55 @@
// $Id$
-#include "simple.idl"
+// ============================================================================
+//
+// = LIBRARY
+// TAO/tests/IDL_Test
+//
+// = FILENAME
+// simple2.idl
+//
+// = DESCRIPTION
+// Further tests of simple IDL
+//
+// = AUTHORS
+// Andy Gokhale <gokhale@dre.vanderbilt.edu>
+//
+// ============================================================================
+#include "simple.idl"
-interface simple3 : simple2 {
- exception OverFlow {
+interface simple3 : simple2
+{
+ exception OverFlow
+ {
long a;
string msg;
};
- exception UnderFlow {
+ exception UnderFlow
+ {
long b;
string msg;
};
- exception BadNum {
+ exception BadNum
+ {
vec10 c;
};
- exception UserError {
+ exception UserError
+ {
any reason;
};
- long op3(in long a, out simple3 b, out simple2 c, out simple d)
+ long op3 (in long a,
+ out simple3 b,
+ out simple2 c,
+ out simple d)
raises (OverFlow, UnderFlow, BadNum);
- any op4(in any x, inout any y, out any z) raises(UnderFlow);
-
-// oneway void op5() raises(USERERROR);
+ any op4 (in any x,
+ inout any y,
+ out any z)
+ raises (UnderFlow);
};