fix tests
This commit is contained in:
@@ -3,7 +3,7 @@ use wiggle::{GuestMemory, GuestPtr};
|
||||
use wiggle_test::{impl_errno, HostMemory, MemArea, WasiCtx};
|
||||
|
||||
wiggle::from_witx!({
|
||||
witx: ["tests/arrays.witx"],
|
||||
witx: ["$CARGO_MANIFEST_DIR/tests/arrays.witx"],
|
||||
ctx: WasiCtx,
|
||||
});
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ use wiggle::GuestMemory;
|
||||
use wiggle_test::{impl_errno, HostMemory, MemArea, WasiCtx};
|
||||
|
||||
wiggle::from_witx!({
|
||||
witx: ["tests/atoms.witx"],
|
||||
witx: ["$CARGO_MANIFEST_DIR/tests/atoms.witx"],
|
||||
ctx: WasiCtx,
|
||||
});
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ use wiggle::{GuestMemory, GuestPtr};
|
||||
use wiggle_test::{impl_errno, HostMemory, MemArea, WasiCtx};
|
||||
|
||||
wiggle::from_witx!({
|
||||
witx: ["tests/flags.witx"],
|
||||
witx: ["$CARGO_MANIFEST_DIR/tests/flags.witx"],
|
||||
ctx: WasiCtx,
|
||||
});
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ use wiggle_test::{impl_errno, HostMemory, MemArea, WasiCtx};
|
||||
const FD_VAL: u32 = 123;
|
||||
|
||||
wiggle::from_witx!({
|
||||
witx: ["tests/handles.witx"],
|
||||
witx: ["$CARGO_MANIFEST_DIR/tests/handles.witx"],
|
||||
ctx: WasiCtx,
|
||||
});
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ use wiggle::GuestMemory;
|
||||
use wiggle_test::{impl_errno, HostMemory, MemArea, WasiCtx};
|
||||
|
||||
wiggle::from_witx!({
|
||||
witx: ["tests/ints.witx"],
|
||||
witx: ["$CARGO_MANIFEST_DIR/tests/ints.witx"],
|
||||
ctx: WasiCtx,
|
||||
});
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ mod struct_test {
|
||||
/// Test that a union variant that conflicts with a Rust keyword can be compiled properly.
|
||||
mod union_test {
|
||||
wiggle::from_witx!({
|
||||
witx: ["tests/keywords_union.witx"],
|
||||
witx: ["$CARGO_MANIFEST_DIR/tests/keywords_union.witx"],
|
||||
ctx: DummyCtx,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ use wiggle::{GuestMemory, GuestPtr};
|
||||
use wiggle_test::{impl_errno, HostMemory, MemArea, WasiCtx};
|
||||
|
||||
wiggle::from_witx!({
|
||||
witx: ["tests/pointers.witx"],
|
||||
witx: ["$CARGO_MANIFEST_DIR/tests/pointers.witx"],
|
||||
ctx: WasiCtx,
|
||||
});
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ use wiggle::{GuestMemory, GuestPtr};
|
||||
use wiggle_test::{impl_errno, HostMemory, MemArea, MemAreas, WasiCtx};
|
||||
|
||||
wiggle::from_witx!({
|
||||
witx: ["tests/strings.witx"],
|
||||
witx: ["$CARGO_MANIFEST_DIR/tests/strings.witx"],
|
||||
ctx: WasiCtx,
|
||||
});
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ use wiggle::{GuestMemory, GuestPtr};
|
||||
use wiggle_test::{impl_errno, HostMemory, MemArea, MemAreas, WasiCtx};
|
||||
|
||||
wiggle::from_witx!({
|
||||
witx: ["tests/structs.witx"],
|
||||
witx: ["$CARGO_MANIFEST_DIR/tests/structs.witx"],
|
||||
ctx: WasiCtx,
|
||||
});
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ use wiggle::{GuestMemory, GuestType};
|
||||
use wiggle_test::{impl_errno, HostMemory, MemArea, WasiCtx};
|
||||
|
||||
wiggle::from_witx!({
|
||||
witx: ["tests/union.witx"],
|
||||
witx: ["$CARGO_MANIFEST_DIR/tests/union.witx"],
|
||||
ctx: WasiCtx,
|
||||
});
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ use wiggle_test::WasiCtx;
|
||||
// witx is exposed with the type signatures that we expect.
|
||||
|
||||
wiggle::from_witx!({
|
||||
witx: ["tests/wasi.witx"],
|
||||
witx: ["$CARGO_MANIFEST_DIR/tests/wasi.witx"],
|
||||
ctx: WasiCtx,
|
||||
});
|
||||
|
||||
@@ -16,7 +16,8 @@ wiggle::from_witx!({
|
||||
#[test]
|
||||
fn document_equivalent() {
|
||||
let macro_doc = metadata::document();
|
||||
let disk_doc = witx::load(&["tests/wasi.witx"]).expect("load wasi.witx from disk");
|
||||
let disk_doc =
|
||||
witx::load(&["$CARGO_MANIFEST_DIR/tests/wasi.witx"]).expect("load wasi.witx from disk");
|
||||
|
||||
assert_eq!(macro_doc, disk_doc);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user