diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Test_encoding.asn | 3 | ||||
-rw-r--r-- | tests/Test_encoding.c | 24 | ||||
-rw-r--r-- | tests/Test_tree.asn | 1 |
3 files changed, 27 insertions, 1 deletions
diff --git a/tests/Test_encoding.asn b/tests/Test_encoding.asn index 99b4b40..de7b93f 100644 --- a/tests/Test_encoding.asn +++ b/tests/Test_encoding.asn @@ -11,6 +11,9 @@ BEGIN Koko ::= SEQUENCE { seqint SEQUENCE OF INTEGER, int INTEGER, + a [1] OCTET STRING, + b [10] OCTET STRING, + c [100] OCTET STRING, str OCTET STRING } diff --git a/tests/Test_encoding.c b/tests/Test_encoding.c index 7d3266c..e693ed7 100644 --- a/tests/Test_encoding.c +++ b/tests/Test_encoding.c @@ -109,6 +109,30 @@ main (int argc, char *argv[]) exit (1); } + result = asn1_write_value (asn1_element, "a", "string1", 7); + if (result != ASN1_SUCCESS) + { + fprintf (stderr, "asn1_write_value(): str "); + asn1_perror (result); + exit (1); + } + + result = asn1_write_value (asn1_element, "b", "string2", 7); + if (result != ASN1_SUCCESS) + { + fprintf (stderr, "asn1_write_value(): str "); + asn1_perror (result); + exit (1); + } + + result = asn1_write_value (asn1_element, "c", "string3", 7); + if (result != ASN1_SUCCESS) + { + fprintf (stderr, "asn1_write_value(): str "); + asn1_perror (result); + exit (1); + } + /* Clear the definition structures */ asn1_delete_structure (&definitions); diff --git a/tests/Test_tree.asn b/tests/Test_tree.asn index da60870..0ad0dc5 100644 --- a/tests/Test_tree.asn +++ b/tests/Test_tree.asn @@ -144,7 +144,6 @@ Test3 ::= SEQUENCE{ b [1] EXPLICIT GeneralString2 } - GeneralString2 ::= [2] EXPLICIT GeneralString X520LocalityName ::= CHOICE { |