This commit is contained in:
Pat Hickey
2020-08-28 17:11:11 -07:00
parent edefbf7c73
commit 335886134c

View File

@@ -16,8 +16,10 @@ wiggle::from_witx!({
#[test] #[test]
fn document_equivalent() { fn document_equivalent() {
let macro_doc = metadata::document(); let macro_doc = metadata::document();
let disk_doc = let mut path = std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR"));
witx::load(&["$CARGO_MANIFEST_DIR/tests/wasi.witx"]).expect("load wasi.witx from disk"); path.push("tests");
path.push("wasi.witx");
let disk_doc = witx::load(&[path]).expect("load wasi.witx from disk");
assert_eq!(macro_doc, disk_doc); assert_eq!(macro_doc, disk_doc);
} }