//
// $Id: Test.idl 83731 2008-11-13 21:54:42Z fields_t $
//

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);
  };
};
