MCPcopy Create free account
hub / github.com/06chaynes/http-cache / test_errors

Function test_errors

http-cache/src/test.rs:35–44  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

33#[test]
34#[allow(clippy::default_constructed_unit_structs)]
35fn test_errors() -> Result<()> {
36 // Testing the Debug, Default, Display and Clone traits for the error types
37 let bv = error::BadVersion::default();
38 assert_eq!(format!("{:?}", bv.clone()), "BadVersion",);
39 assert_eq!(bv.to_string(), "Unknown HTTP version".to_string(),);
40 let bh = error::BadHeader::default();
41 assert_eq!(format!("{:?}", bh.clone()), "BadHeader",);
42 assert_eq!(bh.to_string(), "Error parsing header value".to_string(),);
43 Ok(())
44}
45
46#[test]
47fn response_methods_work() -> Result<()> {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected