Use *.wat instead of *.wit for text files (#1901)

The `*.wit` extension is actually intended to mean "WebAssembly Instance
Type", not "WebAssembly Interface Types". The `*.wat` text format
already will have support for annotations, and wasm interface types are
just an extension of that!
This commit is contained in:
Alex Crichton 2019-12-11 16:22:35 -08:00 committed by GitHub
parent 090109dea7
commit c564eb72b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 3 additions and 3 deletions

View File

@ -12,7 +12,7 @@ fn main() -> Result<()> {
let dir = env::current_dir()?.join("tests/interface-types"); let dir = env::current_dir()?.join("tests/interface-types");
for entry in dir.read_dir()? { for entry in dir.read_dir()? {
let path = entry?.path(); let path = entry?.path();
if path.extension().and_then(|s| s.to_str()) != Some("wit") { if path.extension().and_then(|s| s.to_str()) != Some("wat") {
continue; continue;
} }
if let Some(filter) = &filter { if let Some(filter) = &filter {

View File

@ -109,8 +109,8 @@ fn runtest(test: &Path) -> Result<()> {
if interface_types { if interface_types {
let wasm = td.path().join("reference_test.wasm"); let wasm = td.path().join("reference_test.wasm");
wit_validator::validate(&fs::read(&wasm)?)?; wit_validator::validate(&fs::read(&wasm)?)?;
let wit = sanitize_wasm(&wasm)?; let wat = sanitize_wasm(&wasm)?;
assert_same(&wit, &test.with_extension("wit"))?; assert_same(&wat, &test.with_extension("wat"))?;
} else { } else {
let js = fs::read_to_string(td.path().join("reference_test.js"))?; let js = fs::read_to_string(td.path().join("reference_test.js"))?;
assert_same(&js, &test.with_extension("js"))?; assert_same(&js, &test.with_extension("js"))?;