//
// $Id: Test.idl 91816 2010-09-17 08:35:56Z johnnyw $
//

module Test {
  typedef long ErrorType;

  const ErrorType ErrorOne = 0;
  const ErrorType ErrorTwo = 10;
  const ErrorType ErrorThree = 100;

  struct structOne
  {
    boolean first;
    union ErrorInfo switch (ErrorType)
    {
      case ErrorOne: string errorstring;
      case ErrorTwo: long errornumber;
    } second;
  };

  struct structTwo
  {
    union ErrorInfo switch (ErrorType)
    {
      case ErrorThree: string failstring;
    } thisonly;
  };

  exception exceptionOne
  {
    union ExceptionUnion switch (ErrorType)
    {
      case ErrorThree: string failstring;
    } exceptiononly;
  };

  interface interfaceOne {
    void getstruct (out structOne tester) raises(exceptionOne);
  };
};
