/*****************************************************************/
/**                                                             **/
/**             (C) Copyright 1992 the Regents of the           **/
/**        University of California.  All Rights Reserved.      **/
/**                                                             **/
/**        This work was produced under the sponsorship of      **/
/**         the U.S. Department of Energy.  The Government      **/
/**                retains certain rights therein.              **/
/**                                                             **/
/**                         Written by                          **/
/**         Distributed Programming Environments Project        **/
/**           Computer Software and Networking Division,        **/
/**                   Livermore Computer Center,                **/
/**            Lawrence Livermore National Laboratory           **/
/**                                                             **/
/*****************************************************************/
 
Interface empty; 

Invoke x 1 Integer(4); 

End; 
 
  
main(argc,argv) 
   int argc; 
   char *argv[]; 
{ 
   Boolean(1) b1; 
   Boolean(2) b2; 
   BitString(14) bs1; 
   OctetString(7) os1; 
   OctetString(9) raw1; 
   ObjectIdentifier(8,3) oid1; 
 
   Boolean_const(b1,False,1); 
   if (b1 != 0) 
      printf("###b1 error\n"); 

   Boolean_const(b2,True,2); 
   if (~b2 != 0) 
      printf("###b2 error\n"); 
 
   BitString_const(bs1,01001011010110,14); 
   if (bs1.val[0] != 0x4B || bs1.val[1] != 0x58 ) 
      printf("###bs1 error\n"); 
 
   BitString_const(bs1,01001011_010110,14); /* Test underscore removal */ 
   if (bs1.val[0] != 0x4B || bs1.val[1] != 0x58 ) 
      printf("###bs1 error\n"); 
 
   OctetString_const(os1,0x44e8773b4944AF,7); 
   if (os1.val[0] != 0x44 || os1.val[1] != 0xe8 || os1.val[2] != 0x77 
    || os1.val[3] != 0x3b || os1.val[4] != 0x49 || os1.val[5] != 0x44 
    || os1.val[6] != 0xAF) 
      printf("###os1 error\n"); 
 
   OctetString_const(raw1,0x44e8773b4944AF,9); 
   if (raw1.val[0] != 0x44 || raw1.val[1] != 0xe8 || raw1.val[2] != 0x77  
    || raw1.val[3] != 0x3b || raw1.val[4] != 0x49 || raw1.val[5] != 0x44 
    || raw1.val[6] != 0xAF || raw1.val[7] != 0x00 || raw1.val[8] != 0x00) 
      printf("###raw1 error\n"); 
 
   OctetString_const(raw1,0xb1_e8_77_3A_49_25_ce_5,9); /* Check Underscore removal */ 
   if (raw1.val[0] != 0xb1 || raw1.val[1] != 0xe8 || raw1.val[2] != 0x77  
    || raw1.val[3] != 0x3A || raw1.val[4] != 0x49 || raw1.val[5] != 0x25 
    || raw1.val[6] != 0xce || raw1.val[7] != 0x50 || raw1.val[8] != 0x00) 
      printf("###raw1 error\n"); 
 
   ObjectIdentifier_const(oid1,1.2.8.655.31655.89.7,8,3); 
   if (oid1.size != 7 || oid1.comp[0] != 1 || oid1.comp[1] != 2 
    || oid1.comp[2] != 8 || oid1.comp[3] != 655 || oid1.comp[4] != 31655 
    || oid1.comp[5] != 89 || oid1.comp[6] != 7) 
      printf("###oid1 error\n"); 
 
   printf("test completed\n");
   return(0); 
} 
  
