Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
bytecodealliance
GitHub Repository: bytecodealliance/wasmtime
Path: blob/main/crates/wasi-http/tests/all/main.rs
3088 views
1
// Assert that each of `sync` and `async` below are testing everything through
2
// assertion of the existence of the test function itself.
3
macro_rules! assert_test_exists {
4
($name:ident) => {
5
#[expect(unused_imports, reason = "only here to ensure a name exists")]
6
use self::$name as _;
7
};
8
}
9
10
mod http_server;
11
mod p2;
12
#[cfg(feature = "p3")]
13
mod p3;
14
15
mod body {
16
use http_body_util::{BodyExt, Empty, Full, combinators::BoxBody};
17
use hyper::Error;
18
use hyper::body::Bytes;
19
20
pub fn full(bytes: Bytes) -> BoxBody<Bytes, Error> {
21
BoxBody::new(Full::new(bytes).map_err(|x| match x {}))
22
}
23
24
pub fn empty() -> BoxBody<Bytes, Error> {
25
BoxBody::new(Empty::new().map_err(|x| match x {}))
26
}
27
}
28
29