Commit d3faf7fc authored by Denis Filatov's avatar Denis Filatov Committed by v0-e

WITH DESCENDANTS support; tests for WITH SUCCESSORS

parent 781af821
......@@ -114,10 +114,11 @@ int
asn1p_oid_compare_opt(const asn1p_oid_t *a, const asn1p_oid_t *b, int oid_options) {
int r = asn1p_oid_compare(a, b);
if(oid_options == OID_WITH_SUCCESSORS) {
if(r == b->arcs_count) /* positive and last arc */
if(r == a->arcs_count && r == b->arcs_count) /* positive and last arc */
r = 0;
} else if(oid_options == OID_WITH_DESCENDANTS) {
/* not supported yet */
if(a->arcs_count == (0 - r))
r = 0;
}
return r;
}
......
-- OK: Everything is fine
-- iso.org.dod.internet.private.enterprise (1.3.6.1.4.1)
-- .spelio.software.asn1c.test (9363.1.5.1)
-- .121
ModuleIMPORTS
{ iso org(3) dod(6) internet (1) private(4) enterprise(1)
spelio(9363) software(1) asn1c(5) test(1) 161 }
DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
IMPORTS ImportedType
FROM ImportedModule1
{ iso org(3) dod(6) internet (1) private(4) enterprise(1)
spelio(9363) software(1) asn1c(5) test(1) 161 minor-version-1(1) }
WITH SUCCESSORS
;
Type ::= ImportedType
END
ImportedModule1
{ iso org(3) dod(6) internet (1) private(4) enterprise(1)
spelio(9363) software(1) asn1c(5) test(1) 161 minor-version-5(5)}
DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
IMPORTS -- nothing --;
ImportedType ::= INTEGER
END
-- OK: Everything is fine
-- iso.org.dod.internet.private.enterprise (1.3.6.1.4.1)
-- .spelio.software.asn1c.test (9363.1.5.1)
-- .121
ModuleIMPORTS
{ iso org(3) dod(6) internet (1) private(4) enterprise(1)
spelio(9363) software(1) asn1c(5) test(1) 161 }
DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
IMPORTS ImportedType
FROM ImportedModule1
{ iso org(3) dod(6) internet (1) private(4) enterprise(1)
spelio(9363) software(1) asn1c(5) test(1) 161 minor-version-3(3) }
WITH SUCCESSORS
;
Type ::= ImportedType
END
ImportedModule1
{ iso org(3) dod(6) internet (1) private(4) enterprise(1)
spelio(9363) software(1) asn1c(5) test(1) 161 minor-version-2(2)}
DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
IMPORTS -- nothing --;
ImportedType ::= INTEGER
END
-- OK: Everything is fine
-- iso.org.dod.internet.private.enterprise (1.3.6.1.4.1)
-- .spelio.software.asn1c.test (9363.1.5.1)
-- .121
ModuleIMPORTS
{ iso org(3) dod(6) internet (1) private(4) enterprise(1)
spelio(9363) software(1) asn1c(5) test(1) 161 }
DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
IMPORTS ImportedType
FROM ImportedModule1
{ iso org(3) dod(6) internet (1) private(4) enterprise(1)
spelio(9363) software(1) asn1c(5) test(1) 161 minor-version-3(3) }
WITH SUCCESSORS
;
Type ::= ImportedType
END
ImportedModule1
{ iso org(3) dod(6) internet (1) private(4) enterprise(1)
spelio(9363) software(1) asn1c(5) test(1) 161 minor-version-3(3) super-minor-version(1)}
DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
IMPORTS -- nothing --;
ImportedType ::= INTEGER
END
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment