www.pudn.com > cryptix-asn1-0.1.11.zip > test.asn


-- $Id: test.asn,v 1.6 2001/06/02 02:46:40 raif Exp $ 
-- 
-- Copyright (C) 1997-2001 The Cryptix Foundation Limited. 
-- All rights reserved. 
-- 
-- Use, modification, copying and distribution of this software is subject to 
-- the terms and conditions of the Cryptix General Licence. You should have 
-- received a copy of the Cryptix General Licence along with this library; if 
-- not, you can download a copy from http://www.cryptix.org/ 
-- 
 
TestDefinitions 
DEFINITIONS ::= 
BEGIN 
 
------------------------------------------------------------------------------- 
-- bug #425201: wrong OID encoding 
------------------------------------------------------------------------------- 
 
   oidTypeA OBJECT IDENTIFIER ::= { 2 100 3 } 
   oidTypeB OBJECT IDENTIFIER ::= { 1 3 14 3 2 26 } 
 
------------------------------------------------------------------------------- 
-- bug #422601: wrong tag for sequence and set 
------------------------------------------------------------------------------- 
 
   SeqType ::= SEQUENCE { 
      a  INTEGER, 
      b  INTEGER 
   } 
 
   SetType ::= SET { 
      a  INTEGER, 
      b  INTEGER 
   } 
 
   SeqOfType ::= SEQUENCE OF SeqType 
 
   SetOfType ::= SET OF SetType 
 
------------------------------------------------------------------------------- 
-- bug #425895: encoding OPTIONAL CHOICE throws BlankElementException 
------------------------------------------------------------------------------- 
 
   SeqTypeA ::= SEQUENCE { 
      x  INTEGER, 
      y  ChoiceType OPTIONAL 
   } 
 
   ChoiceType ::= CHOICE { 
      a  INTEGER, 
      b  BOOLEAN 
   } 
 
------------------------------------------------------------------------------- 
-- bug #424488: encode/decode OPTIONAL types 
------------------------------------------------------------------------------- 
 
   SeqTypeB ::= SEQUENCE { 
      a  INTEGER OPTIONAL, 
      b  BOOLEAN 
   } 
 
   SeqTypeC ::= SEQUENCE { 
      s  SeqTypeB OPTIONAL, 
      c  INTEGER 
   } 
 
   SetTypeA ::= SET { 
      x  BOOLEAN, 
      y  INTEGER OPTIONAL, 
      z  BIT STRING 
   } 
 
   SeqTypeD ::= SEQUENCE { 
      d  BOOLEAN, 
      e  SetTypeA OPTIONAL, 
      f  INTEGER 
   } 
 
   SeqTypeE ::= SEQUENCE { 
      g  BOOLEAN, 
      h  INTEGER OPTIONAL 
   } 
 
------------------------------------------------------------------------------- 
-- bug #428617: DEFAULT values are not set/used properly 
------------------------------------------------------------------------------- 
 
   Version ::= INTEGER { 
      v1(0), 
      v2(1), 
      v3(2) 
   } 
 
   SeqTypeF ::= SEQUENCE { 
      v  Version DEFAULT v3, 
      x  BOOLEAN, 
      b  BOOLEAN DEFAULT TRUE 
   } 
 
END