Turn assertions into unwraps such that tests provide useful output on panic.

This commit is contained in:
Jethro Beekman 2015-06-30 18:52:17 -07:00
parent c4e398d397
commit d5a4d48cab
1 changed files with 3 additions and 7 deletions

View File

@ -19,13 +19,9 @@ fn test_cert_gen() {
.set_usage(&[DigitalSignature, KeyEncipherment])
.set_ext_usage(&[ClientAuth, ServerAuth]);
let res = gen.generate();
assert!(res.is_ok());
let (cert, pkey) = res.unwrap();
assert!(cert.write_pem(&mut io::sink()).is_ok());
assert!(pkey.write_pem(&mut io::sink()).is_ok());
let (cert, pkey) = gen.generate().unwrap();
cert.write_pem(&mut io::sink()).unwrap();
pkey.write_pem(&mut io::sink()).unwrap();
// FIXME: check data in result to be correct, needs implementation
// of X509 getters