Skip to content

Commit df808db

Browse files
committed
tests: move no_subject_alt_names test above helper
1 parent 1bb3068 commit df808db

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

tests/integration.rs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,21 @@ fn wildcard_subject_alternative_names() {
331331
);
332332
}
333333

334+
#[cfg(feature = "alloc")]
335+
#[test]
336+
fn no_subject_alt_names() {
337+
let ee = CertificateDer::from(&include_bytes!("misc/no_subject_alternative_name.der")[..]);
338+
339+
let cert = webpki::EndEntityCert::try_from(&ee)
340+
.expect("should parse end entity certificate correctly");
341+
342+
let names = cert
343+
.dns_names()
344+
.expect("we should get a result even without subjectAltNames");
345+
346+
assert!(names.collect::<Vec<_>>().is_empty());
347+
}
348+
334349
#[cfg(feature = "alloc")]
335350
fn expect_cert_dns_names<'name>(
336351
cert_der: &[u8],
@@ -348,18 +363,3 @@ fn expect_cert_dns_names<'name>(
348363

349364
assert!(cert.dns_names().unwrap().eq(expected_names));
350365
}
351-
352-
#[cfg(feature = "alloc")]
353-
#[test]
354-
fn no_subject_alt_names() {
355-
let ee = CertificateDer::from(&include_bytes!("misc/no_subject_alternative_name.der")[..]);
356-
357-
let cert = webpki::EndEntityCert::try_from(&ee)
358-
.expect("should parse end entity certificate correctly");
359-
360-
let names = cert
361-
.dns_names()
362-
.expect("we should get a result even without subjectAltNames");
363-
364-
assert!(names.collect::<Vec<_>>().is_empty());
365-
}

0 commit comments

Comments
 (0)