aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/test
diff options
context:
space:
mode:
Diffstat (limited to 'lib/asn1/test')
-rw-r--r--lib/asn1/test/asn1_SUITE_data/InfObj.asn10
-rw-r--r--lib/asn1/test/asn1_SUITE_data/InfObjExtract.asn17
-rw-r--r--lib/asn1/test/error_SUITE.erl7
-rw-r--r--lib/asn1/test/testInfObj.erl8
-rw-r--r--lib/asn1/test/testInfObjExtract.erl3
5 files changed, 31 insertions, 4 deletions
diff --git a/lib/asn1/test/asn1_SUITE_data/InfObj.asn b/lib/asn1/test/asn1_SUITE_data/InfObj.asn
index 2bf1dc0921..aef20451cb 100644
--- a/lib/asn1/test/asn1_SUITE_data/InfObj.asn
+++ b/lib/asn1/test/asn1_SUITE_data/InfObj.asn
@@ -290,20 +290,26 @@ OstSeq1234 ::= ObjectSetTest{ {Ost1234} }
OstSeq45 ::= ObjectSetTest{ {Ost45} }
OstSeq12345 ::= ObjectSetTest{ {Ost12345} }
+OstSeq12Except ::= ObjectSetTest{ {Ost123 EXCEPT ost3} }
+OstSeq123Except ::= ObjectSetTest{ {Ost12345 EXCEPT Ost45} }
+
ExOst1 OBJECT-SET-TEST ::= { ost1, ... }
ExOst12 OBJECT-SET-TEST ::= { ost1, ..., ost2 }
ExOst123 OBJECT-SET-TEST ::= { ost3, ..., ExOst12 }
---ExOst1234 OBJECT-SET-TEST ::= { ExOst123, ..., ost4 }
+ExOst1234 OBJECT-SET-TEST ::= { ExOst123, ..., ost4 }
ExOst45 OBJECT-SET-TEST ::= { ost4, ..., ost5 }
ExOst12345 OBJECT-SET-TEST ::= { ExOst123, ..., ExOst45 }
ExOstSeq1 ::= ObjectSetTest{ {ExOst1} }
ExOstSeq12 ::= ObjectSetTest{ {ExOst12} }
ExOstSeq123 ::= ObjectSetTest{ {ExOst123} }
---ExOstSeq1234 ::= ObjectSetTest{ {ExOst1234} }
+ExOstSeq1234 ::= ObjectSetTest{ {ExOst1234} }
ExOstSeq45 ::= ObjectSetTest{ {ExOst45} }
ExOstSeq12345 ::= ObjectSetTest{ {ExOst12345} }
+ExOstSeq12Except ::= ObjectSetTest{ {ExOst123 EXCEPT ost3} }
+ExOstSeq123Except ::= ObjectSetTest{ {ExOst12345 EXCEPT ExOst45} }
+
ExInlOst1 OBJECT-SET-TEST ::= {
{ 1 IS BIT STRING },
...
diff --git a/lib/asn1/test/asn1_SUITE_data/InfObjExtract.asn1 b/lib/asn1/test/asn1_SUITE_data/InfObjExtract.asn1
index c70303831e..13981b546d 100644
--- a/lib/asn1/test/asn1_SUITE_data/InfObjExtract.asn1
+++ b/lib/asn1/test/asn1_SUITE_data/InfObjExtract.asn1
@@ -27,6 +27,10 @@ OBJ-SET DATA-CLASS ::= {
...
}
+SingleElementSet DATA-CLASS ::= {
+ holder-object-1.&obj
+}
+
holder-object-1 HOLDER-CLASS ::= {
OBJ data-object-1
}
@@ -83,6 +87,9 @@ DataSeq-4 ::= TestSeq{ {holder-object-5.&ObjSet} }
DataSeq-5 ::= TestSeq{ {holder-object-6.&ObjSet} }
DataSeq-6 ::= TestSeq{ {holder-object-7.&ObjSet} }
+DataSeqSingleSet-1 ::= TestSeq{ {SingleElementSet} }
+DataSeqSingleSet-2 ::= TestSeq{ {holder-object-1.&obj} }
+
--
-- Test ObjectSetFromObjects.
--
diff --git a/lib/asn1/test/error_SUITE.erl b/lib/asn1/test/error_SUITE.erl
index 0fe77e7b22..bcb31cb3bb 100644
--- a/lib/asn1/test/error_SUITE.erl
+++ b/lib/asn1/test/error_SUITE.erl
@@ -282,6 +282,10 @@ object_field_extraction(Config) ->
" ...\n"
" }\n"
+ " DataObjSetNoExt DATA-CLASS ::= {\n"
+ " holder-object-1.&int\n"
+ " }\n"
+
" holder-object-1 HOLDER-CLASS ::= {\n"
" &int 42\n"
" }\n"
@@ -297,7 +301,8 @@ object_field_extraction(Config) ->
"END\n">>},
{error,
[
- {structured_error,{M,2},asn1ct_check,illegal_object}
+ {structured_error,{M,2},asn1ct_check,illegal_object},
+ {structured_error,{M,6},asn1ct_check,illegal_object}
]
} = run(P, Config),
ok.
diff --git a/lib/asn1/test/testInfObj.erl b/lib/asn1/test/testInfObj.erl
index 0b59cb35b5..bcd4755003 100644
--- a/lib/asn1/test/testInfObj.erl
+++ b/lib/asn1/test/testInfObj.erl
@@ -138,12 +138,18 @@ main(_Erule) ->
test_objset('OstSeq45', [4,5]),
test_objset('OstSeq12345', [1,2,3,4,5]),
+ test_objset('OstSeq12Except', [1,2]),
+ test_objset('OstSeq123Except', [1,2]),
+
test_objset('ExOstSeq12', [1,2]),
test_objset('ExOstSeq123', [1,2,3]),
- %%test_objset('ExOstSeq1234', [1,2,3,4]),
+ test_objset('ExOstSeq1234', [1,2,3,4]),
test_objset('ExOstSeq45', [4,5]),
test_objset('ExOstSeq12345', [1,2,3,4,5]),
+ test_objset('ExOstSeq12Except', [1,2]),
+ test_objset('ExOstSeq123Except', [1,2]),
+
roundtrip('InfObj', 'ExtClassSeq', {'ExtClassSeq', 4}),
{1,2,42} = 'InfObj':'value-1'(),
diff --git a/lib/asn1/test/testInfObjExtract.erl b/lib/asn1/test/testInfObjExtract.erl
index f86626d037..0ef967c1f6 100644
--- a/lib/asn1/test/testInfObjExtract.erl
+++ b/lib/asn1/test/testInfObjExtract.erl
@@ -32,6 +32,9 @@ main() ->
roundtrip_data_object_13('DataSeq-5'),
roundtrip_data_object_13('DataSeq-6'),
+ roundtrip_data_object_1('DataSeqSingleSet-1'),
+ roundtrip_data_object_1('DataSeqSingleSet-2'),
+
roundtrip('ObjClassSeq-1', {'ObjClassSeq-1',1,true}),
roundtrip('ObjClassSeq-1', {'ObjClassSeq-1',2,true}),