From dc19bf32b9e05f7e048ccd07d6026fab10d541b8 Mon Sep 17 00:00:00 2001 From: Mark McCaskey Date: Wed, 17 Jul 2019 15:47:59 -0700 Subject: [PATCH] fmt --- lib/wasi-tests/tests/wasitests/_common.rs | 3 +-- lib/wasi-tests/tests/wasitests/envvar.rs | 2 +- lib/wasi-tests/tests/wasitests/fseek.rs | 5 ++++- lib/wasi-tests/tests/wasitests/mapdir.rs | 5 ++++- lib/wasi-tests/tests/wasitests/readlink.rs | 5 ++++- .../tests/wasitests/wasi_sees_virtual_root.rs | 15 ++++++++++++++- 6 files changed, 28 insertions(+), 7 deletions(-) diff --git a/lib/wasi-tests/tests/wasitests/_common.rs b/lib/wasi-tests/tests/wasitests/_common.rs index 0850d1d0a..958fdf6ad 100644 --- a/lib/wasi-tests/tests/wasitests/_common.rs +++ b/lib/wasi-tests/tests/wasitests/_common.rs @@ -33,8 +33,7 @@ macro_rules! assert_wasi_output { let module = wasmer_runtime_core::compile_with(&wasm_bytes[..], &get_compiler()) .expect("WASM can't be compiled"); - let import_object = - generate_import_object(vec![], vec![], $po_dir_args, $mapdir_args); + let import_object = generate_import_object(vec![], vec![], $po_dir_args, $mapdir_args); let instance = module .instantiate(&import_object) diff --git a/lib/wasi-tests/tests/wasitests/envvar.rs b/lib/wasi-tests/tests/wasitests/envvar.rs index caaa76670..7c66b3d2c 100644 --- a/lib/wasi-tests/tests/wasitests/envvar.rs +++ b/lib/wasi-tests/tests/wasitests/envvar.rs @@ -5,7 +5,7 @@ fn test_envvar() { "envvar", vec![], vec![], - vec!["DOG=1".to_string(),"CAT=2".to_string(),], + vec!["DOG=1".to_string(), "CAT=2".to_string(),], "../../wasitests/envvar.out" ); } diff --git a/lib/wasi-tests/tests/wasitests/fseek.rs b/lib/wasi-tests/tests/wasitests/fseek.rs index 43bbf21a7..a1eac93ed 100644 --- a/lib/wasi-tests/tests/wasitests/fseek.rs +++ b/lib/wasi-tests/tests/wasitests/fseek.rs @@ -4,7 +4,10 @@ fn test_fseek() { "../../wasitests/fseek.wasm", "fseek", vec![], - vec![(".".to_string(), ::std::path::PathBuf::from("wasitests/test_fs/hamlet")),], + vec![( + ".".to_string(), + ::std::path::PathBuf::from("wasitests/test_fs/hamlet") + ),], vec![], "../../wasitests/fseek.out" ); diff --git a/lib/wasi-tests/tests/wasitests/mapdir.rs b/lib/wasi-tests/tests/wasitests/mapdir.rs index 407d39f75..301f4887a 100644 --- a/lib/wasi-tests/tests/wasitests/mapdir.rs +++ b/lib/wasi-tests/tests/wasitests/mapdir.rs @@ -4,7 +4,10 @@ fn test_mapdir() { "../../wasitests/mapdir.wasm", "mapdir", vec![], - vec![(".".to_string(), ::std::path::PathBuf::from("wasitests/test_fs/hamlet")),], + vec![( + ".".to_string(), + ::std::path::PathBuf::from("wasitests/test_fs/hamlet") + ),], vec![], "../../wasitests/mapdir.out" ); diff --git a/lib/wasi-tests/tests/wasitests/readlink.rs b/lib/wasi-tests/tests/wasitests/readlink.rs index 9c86e3666..72e0c7fa7 100644 --- a/lib/wasi-tests/tests/wasitests/readlink.rs +++ b/lib/wasi-tests/tests/wasitests/readlink.rs @@ -4,7 +4,10 @@ fn test_readlink() { "../../wasitests/readlink.wasm", "readlink", vec![], - vec![(".".to_string(), ::std::path::PathBuf::from("wasitests/test_fs/hamlet")),], + vec![( + ".".to_string(), + ::std::path::PathBuf::from("wasitests/test_fs/hamlet") + ),], vec![], "../../wasitests/readlink.out" ); diff --git a/lib/wasi-tests/tests/wasitests/wasi_sees_virtual_root.rs b/lib/wasi-tests/tests/wasitests/wasi_sees_virtual_root.rs index be60d2b3e..f604f9678 100644 --- a/lib/wasi-tests/tests/wasitests/wasi_sees_virtual_root.rs +++ b/lib/wasi-tests/tests/wasitests/wasi_sees_virtual_root.rs @@ -4,7 +4,20 @@ fn test_wasi_sees_virtual_root() { "../../wasitests/wasi_sees_virtual_root.wasm", "wasi_sees_virtual_root", vec![], - vec![("act1".to_string(), ::std::path::PathBuf::from("wasitests/test_fs/hamlet/act1")),("act2".to_string(), ::std::path::PathBuf::from("wasitests/test_fs/hamlet/act2")),("act1-again".to_string(), ::std::path::PathBuf::from("wasitests/test_fs/hamlet/act1")),], + vec![ + ( + "act1".to_string(), + ::std::path::PathBuf::from("wasitests/test_fs/hamlet/act1") + ), + ( + "act2".to_string(), + ::std::path::PathBuf::from("wasitests/test_fs/hamlet/act2") + ), + ( + "act1-again".to_string(), + ::std::path::PathBuf::from("wasitests/test_fs/hamlet/act1") + ), + ], vec![], "../../wasitests/wasi_sees_virtual_root.out" );