The hello_world.rs and hello_world_nomacro.rs are identical in functionality
(guest: &str)
| 13 | // The hello_world.rs and hello_world_nomacro.rs are identical in |
| 14 | // functionality |
| 15 | fn run(guest: &str) -> Result<()> { |
| 16 | // Run wasmtime serve. |
| 17 | let _serve = test_programs::WasmtimeServe::new(guest)?; |
| 18 | |
| 19 | // Test each path in the server: |
| 20 | |
| 21 | // TEST / handler |
| 22 | // Response body is the hard-coded default |
| 23 | let body: String = ureq::get("http://127.0.0.1:8081") |
| 24 | .call()? |
| 25 | .body_mut() |
| 26 | .read_to_string()?; |
| 27 | assert!(body.contains("<h1>Hello, World!</h1>")); |
| 28 | |
| 29 | Ok(()) |
| 30 | } |
no test coverage detected