From 66d542b6b89338a6155bd47b706a21e36edc023e Mon Sep 17 00:00:00 2001 From: Lev Walkin Date: Mon, 4 Jul 2005 02:03:57 +0000 Subject: [PATCH] more heuristics testing --- ChangeLog | 2 +- tests/42-real-life-OK.asn1.-PR | 14 ++++---------- tests/85-comments-OK.asn1 | 7 +++++-- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 748d602c..3c6a8342 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,7 +4,7 @@ * GeneralizedTime API now supports fractions of seconds. Thanks to Bent Nicolaisen for support. * ASN.1 parser has been tweaked to allow parsing something like - "SEQUENCE--- comment ---", which is ambiguous for many reasons. + "SEQUENCE----comment----", which is ambiguous for many reasons. * XER decoder better handles not-yet-defined future extensions. 0.9.15: 2005-July-02 diff --git a/tests/42-real-life-OK.asn1.-PR b/tests/42-real-life-OK.asn1.-PR index 279e5dc2..09aed561 100644 --- a/tests/42-real-life-OK.asn1.-PR +++ b/tests/42-real-life-OK.asn1.-PR @@ -51,11 +51,8 @@ memb_varsets_1_constraint(asn_TYPE_descriptor_t *td, const void *sptr, return -1; } - { /* Determine the number of elements */ - const A_SEQUENCE_OF(void) *list; - (const void *)list = sptr; - size = list->count; - } + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; if((size >= 1)) { /* Perform validation of the inner elements */ @@ -388,11 +385,8 @@ memb_vset_1_constraint(asn_TYPE_descriptor_t *td, const void *sptr, return -1; } - { /* Determine the number of elements */ - const A_SET_OF(void) *list; - (const void *)list = sptr; - size = list->count; - } + /* Determine the number of elements */ + size = _A_CSET_FROM_VOID(sptr)->count; if((size >= 1)) { /* Perform validation of the inner elements */ diff --git a/tests/85-comments-OK.asn1 b/tests/85-comments-OK.asn1 index 883eadbf..f1f4a8cb 100644 --- a/tests/85-comments-OK.asn1 +++ b/tests/85-comments-OK.asn1 @@ -11,8 +11,11 @@ ModuleTestComments DEFINITIONS ::= BEGIN - T1 ::= SEQUENCE-- This is a comment-- { ... } - T2 ::= SEQUENCE--- This is a comment --- { ... } + T1 ::= SEQUENCE--comment-- { ... } + T2 ::= SEQUENCE-- comment-- { ... } + T3 ::= SEQUENCE--- comment --- { ... } + T4 ::= SEQUENCE----comment---- { ... } + T5 ::= SEQUENCE---- comment ---- { ... } ----- Another ambiguous comment ---