Skip to content

Commit

Permalink
Add another extensible test for partial presence
Browse files Browse the repository at this point in the history
  • Loading branch information
kellerkindt committed Jun 9, 2021
1 parent 75f2882 commit aa6e4f1
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions tests/basic_set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,31 @@ fn test_extensible_2() {
);
}

/// ```asn
/// Extensible ::= {
/// abc "bye bye",
/// def 774,
/// jkl "jkl"
/// }
/// ```
#[test]
fn test_extensible_4() {
// from playground
serialize_and_deserialize_uper(
8 * 17 + 2,
&[
0x81, 0x01, 0x83, 0x03, 0xB1, 0x3C, 0xB2, 0x90, 0x31, 0x3C, 0xB2, 0x81, 0x81, 0x00,
0xDA, 0x9A, 0xDB, 0x00,
],
&Extensible {
def: 774,
abc: "bye bye".to_string(),
jkl: Some("jkl".to_string()),
ghi: None,
},
);
}

#[test]
fn test_implicit_tag_assignment() {
use asn1rs::syn::common::Constraint;
Expand Down

0 comments on commit aa6e4f1

Please sign in to comment.