Skip to content

Commit 1121542

Browse files
authored
Merge branch 'main' into pr/fix-automatic-tag-on-choice
2 parents d8892c7 + 75b5b5c commit 1121542

File tree

35 files changed

+587
-223
lines changed

35 files changed

+587
-223
lines changed

rasn-compiler-tests/tests/simple_types.rs

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,66 @@ e2e_pdu!(
402402
r#" FQDN ::= VisibleString(FROM ("a".."z" | "A".."Z" | "0".."9" | ".-")) (SIZE (1..255))"#
403403
);
404404

405+
e2e_pdu!(
406+
teletexstring,
407+
r#" Test-String ::= TeletexString
408+
test-string-val Test-String ::= "012345""#
409+
);
410+
e2e_pdu!(
411+
teletexstring_strict,
412+
r#" Test-String ::= TeletexString SIZE (4)
413+
test-string-val Test-String ::= "012345""#
414+
);
415+
e2e_pdu!(
416+
teletexstring_strict_ext,
417+
r#" Test-String ::= TeletexString SIZE (4,...)
418+
test-string-val Test-String ::= "012345""#
419+
);
420+
e2e_pdu!(
421+
teletexstring_range,
422+
r#" Test-String ::= TeletexString SIZE (4..6)
423+
test-string-val Test-String ::= "012345""#
424+
);
425+
e2e_pdu!(
426+
teletexstring_range_ext,
427+
r#" Test-String ::= TeletexString SIZE (4..6,...)
428+
test-string-val Test-String ::= "012345""#
429+
);
430+
e2e_pdu!(
431+
teletexstring_from,
432+
r#" FQDN ::= TeletexString(FROM ("a".."z" | "A".."Z" | "0".."9" | ".-")) (SIZE (1..255))"#
433+
);
434+
435+
e2e_pdu!(
436+
universalstring,
437+
r#" Test-String ::= UniversalString
438+
test-string-val Test-String ::= "012345""#
439+
);
440+
e2e_pdu!(
441+
universalstring_strict,
442+
r#" Test-String ::= UniversalString SIZE (4)
443+
test-string-val Test-String ::= "012345""#
444+
);
445+
e2e_pdu!(
446+
universalstring_strict_ext,
447+
r#" Test-String ::= UniversalString SIZE (4,...)
448+
test-string-val Test-String ::= "012345""#
449+
);
450+
e2e_pdu!(
451+
universalstring_range,
452+
r#" Test-String ::= UniversalString SIZE (4..6)
453+
test-string-val Test-String ::= "012345""#
454+
);
455+
e2e_pdu!(
456+
universalstring_range_ext,
457+
r#" Test-String ::= UniversalString SIZE (4..6,...)
458+
test-string-val Test-String ::= "012345""#
459+
);
460+
e2e_pdu!(
461+
universalstring_from,
462+
r#" FQDN ::= UniversalString(FROM ("a".."z" | "A".."Z" | "0".."9" | ".-")) (SIZE (1..255))"#
463+
);
464+
405465
e2e_pdu!(
406466
oid_value,
407467
r#"organizationRoot OBJECT IDENTIFIER ::= { iso(1) identified-organization(3) teletrust(36) gematik(15) organization(2) legal-entity(3) type(1) }"#

rasn-compiler-tests/tests/snapshots/parse_test__parses_modules@IVIM.asn1.snap

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1200,7 +1200,6 @@ pub mod ivim_pdu_descriptions {
12001200
#[doc = "*"]
12011201
#[doc = "* @category: Basic Information"]
12021202
#[doc = "* @revision: V1.3.1"]
1203-
#[doc = ""]
12041203
#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
12051204
#[rasn(automatic_tags)]
12061205
pub struct IVIM {

rasn-compiler-tests/tests/snapshots/parse_test__parses_modules@itu-t_h_h225-0_1999_ANNEXG-MESSAGES.asn1.snap

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ pub mod annexg_messages {
9393
}
9494
#[doc = ""]
9595
#[doc = " structures common to multiple messages"]
96-
#[doc = ""]
9796
#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
9897
#[rasn(automatic_tags)]
9998
#[non_exhaustive]
@@ -822,7 +821,6 @@ pub mod annexg_messages {
822821
}
823822
#[doc = ""]
824823
#[doc = " Annex G messages"]
825-
#[doc = ""]
826824
#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
827825
#[rasn(automatic_tags)]
828826
#[non_exhaustive]

rasn-compiler-tests/tests/snapshots/parse_test__parses_modules@itu-t_h_h235.0_2014_H235-SECURITY-MESSAGES.asn1.snap

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -958,7 +958,6 @@ pub mod h235_security_messages {
958958
#[doc = "\tobject identifier { 0 0 } to indicate that the tokenOID value is not"]
959959
#[doc = "\tpresent."]
960960
#[doc = "\tStart all the cryptographic parameterized types here..."]
961-
#[doc = ""]
962961
#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
963962
#[rasn(automatic_tags)]
964963
#[non_exhaustive]

rasn-compiler-tests/tests/snapshots/parse_test__parses_modules@itu-t_h_h282_1999_RDC-PROTOCOL.asn1.snap

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,6 @@ pub mod rdc_protocol {
574574
}
575575
#[doc = ""]
576576
#[doc = " Attribute parameter types"]
577-
#[doc = ""]
578577
#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
579578
#[rasn(delegate, value("1..=31"))]
580579
pub struct Day(pub u8);

rasn-compiler-tests/tests/snapshots/parse_test__parses_modules@itu-t_h_h460.9_2002_QOS-MONITORING-REPORT.asn1.snap

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,6 @@ pub mod qos_monitoring_report {
265265
LazyLock::new(|| GenericIdentifier(GenericIdentifier(GenericIdentifier::standard(1))));
266266
#[doc = ""]
267267
#[doc = " H.460.9 Identifiers:"]
268-
#[doc = ""]
269268
pub static QOS_MONITORING_REPORT_ID: LazyLock<GenericIdentifier> =
270269
LazyLock::new(|| GenericIdentifier(GenericIdentifier(GenericIdentifier::standard(9))));
271270
}

rasn-compiler-tests/tests/snapshots/parse_test__parses_modules@itu-t_h_h501_2002_H501-MESSAGES.asn1.snap

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ pub mod h501_messages {
143143
}
144144
#[doc = ""]
145145
#[doc = " structures common to multiple messages"]
146-
#[doc = ""]
147146
#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
148147
#[rasn(automatic_tags)]
149148
#[non_exhaustive]
@@ -1042,7 +1041,6 @@ pub mod h501_messages {
10421041
}
10431042
#[doc = ""]
10441043
#[doc = " H.501 messages"]
1045-
#[doc = ""]
10461044
#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
10471045
#[rasn(automatic_tags)]
10481046
#[non_exhaustive]
@@ -1506,6 +1504,5 @@ pub mod h501_messages {
15061504
#[doc = " REPOSITORY FOR APPLICATION SPECIFIC DATA"]
15071505
#[doc = ""]
15081506
#[doc = " H.225.0 Annex-G profile data"]
1509-
#[doc = ""]
15101507
pub static ID_ANNEX_GPROFILES: LazyLock<Integer> = LazyLock::new(|| Integer::from(0i128));
15111508
}

rasn-compiler-tests/tests/snapshots/parse_test__parses_modules@itu-t_t_t123_1999_CNP-PROTOCOL.asn1.snap

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ pub mod cnp_protocol {
6565
}
6666
#[doc = ""]
6767
#[doc = " CNP Control PDU Types"]
68-
#[doc = ""]
6968
#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
7069
#[rasn(automatic_tags)]
7170
#[non_exhaustive]
@@ -271,7 +270,6 @@ pub mod cnp_protocol {
271270
#[doc = " {itu-t (0) recommendation (0) t (20) 123 annexb (2) 1}"]
272271
#[doc = ""]
273272
#[doc = " Service Negotiation Types"]
274-
#[doc = ""]
275273
#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
276274
#[rasn(delegate, value("128..=65535"))]
277275
pub struct TPDUSize(pub u16);

rasn-compiler-tests/tests/snapshots/parse_test__parses_modules@itu-t_t_t134_1998_CHAT-PROTOCOL.asn1.snap

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ pub mod chat_protocol {
4242
#[doc = " Chat Protocol String"]
4343
#[doc = ""]
4444
#[doc = " Begin CHATPDU Definitions"]
45-
#[doc = ""]
4645
#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
4746
#[rasn(automatic_tags)]
4847
#[non_exhaustive]

rasn-compiler-tests/tests/snapshots/parse_test__parses_modules@itu-t_x_x282_1999_DLM.asn1.snap

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ pub mod dlm {
107107
#[doc = ""]
108108
#[doc = " value assignments for Data Link layer specific errorIds for activate action processingFailure"]
109109
#[doc = " errors."]
110-
#[doc = ""]
111110
pub static ACTIVATE_FAILURE: LazyLock<ObjectIdentifier> = LazyLock::new(|| {
112111
Oid::new(&[&***SSEOI, &[9u32, 1u32, 1u32, 1u32]].concat())
113112
.unwrap()
@@ -151,7 +150,6 @@ pub mod dlm {
151150
LazyLock::new(|| Oid::const_new(&[2u32, 15u32]).to_owned());
152151
#[doc = ""]
153152
#[doc = " other definitions"]
154-
#[doc = ""]
155153
pub static DATALINK_SUBSYSTEM_ID_VALUE: LazyLock<GraphicString> =
156154
LazyLock::new(|| GraphicString::try_from(String::from("datalinkSubsystem")).unwrap());
157155
pub static DLOI: LazyLock<ObjectIdentifier> = LazyLock::new(|| {
@@ -193,7 +191,6 @@ pub mod dlm {
193191
});
194192
#[doc = ""]
195193
#[doc = " value assignments for Data Link layer specificProblems"]
196-
#[doc = ""]
197194
pub static F_RMRRECEIVED: LazyLock<ObjectIdentifier> = LazyLock::new(|| {
198195
Oid::new(&[&***SSEOI, &[11u32, 5u32]].concat())
199196
.unwrap()

0 commit comments

Comments
 (0)