aboutsummary
aboutsummaryrefslogtreecommitdiff
path: root/tests/conftest.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/conftest.py')
-rw-r--r--tests/conftest.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/conftest.py b/tests/conftest.py
new file mode 100644
index 0000000..9eb9e61
--- /dev/null
+++ b/tests/conftest.py
@@ -0,0 +1,13 @@
+# We need the mypy pytest plugin to do the test collection for our
+# typing tests.
+
+# mypy demands that its test-data be present for mypy.test.config to be
+# imported, so thwart that check. mypy PR #10919 fixes this.
+import unittest.mock
+with unittest.mock.patch('os.path.isdir') as isdir:
+ isdir.return_value = True
+ import mypy.test.config # noqa
+
Diffstat (limited to 'tests')
-rw-r--r--tests/wasm_compile_arithm/instructions.wat8
-rw-r--r--tests/wasm_compile_block/instructions.wat8
-rw-r--r--tests/wasm_compile_br/instructions.wat4
-rw-r--r--tests/wasm_compile_br_if/instructions.wat6
-rw-r--r--tests/wasm_compile_function_call/instructions.wat2
-rw-r--r--tests/wasm_compile_if_else/instructions.wat4
-rw-r--r--tests/wasm_compile_loop/instructions.wat2
-rw-r--r--tests/wasm_compile_simple_module/instructions.wat2
8 files changed, 18 insertions, 18 deletions
diff --git a/tests/wasm_compile_arithm/instructions.wat b/tests/wasm_compile_arithm/instructions.wat
index a43a348..e20e6c0 100644
--- a/tests/wasm_compile_arithm/instructions.wat
+++ b/tests/wasm_compile_arithm/instructions.wat
@@ -2,15 +2,15 @@
(memory 0 2)
(func $main
;; write 0xFFEFE021 at MEMORY_BOTTOM_ADDR + 0x0
- (i32.store offset=0x0 align=2 (i32.const 0x0)
+ (i32.store offset=0x0 align=4 (i32.const 0x0)
(i32.sub (i32.const 0x42143) (i32.const 0x144122)))
;; write 0x16D3B7 at MEMORY_BOTTOM_ADDR + 0x4
- (i32.store offset=0x0 align=2 (i32.const 0x4)
+ (i32.store offset=0x0 align=4 (i32.const 0x4)
(i32.add (i32.const 0x7109D) (i32.const 0xFC31A)))
;; write 0xED8 at MEMORY_BOTTOM_ADDR + 0x8
- (i32.store offset=0x0 align=2 (i32.const 0x8)
+ (i32.store offset=0x0 align=4 (i32.const 0x8)
(i32.div_u (i32.const 0x193E324F) (i32.const 0x1B342)))
;; write 0x3C773E7C at MEMORY_BOTTOM_ADDR + 0xC
- (i32.store offset=0x0 align=2 (i32.const 0xC)
+ (i32.store offset=0x0 align=4 (i32.const 0xC)
(i32.mul (i32.const 0x38F2C) (i32.const 0x10FD))))
(export "main" (func $main)))
diff --git a/tests/wasm_compile_block/instructions.wat b/tests/wasm_compile_block/instructions.wat
index 11b179d..3d682db 100644
--- a/tests/wasm_compile_block/instructions.wat
+++ b/tests/wasm_compile_block/instructions.wat
@@ -109,13 +109,13 @@
i32.add
end)
(func $main
- (i32.store offset=0x0 align=2 (i32.const 0x0)
+ (i32.store offset=0x0 align=4 (i32.const 0x0)
(call $blockfun (i32.const 4) (i32.const 2)))
- (i32.store offset=0x0 align=2 (i32.const 0x4)
+ (i32.store offset=0x0 align=4 (i32.const 0x4)
(call $blockfun (i32.const 3) (i32.const 2)))
- (i32.store offset=0x0 align=2 (i32.const 0x8)
+ (i32.store offset=0x0 align=4 (i32.const 0x8)
(call $blockfun (i32.const 2) (i32.const 0)))
- (i32.store offset=0x0 align=2 (i32.const 0xC)
+ (i32.store offset=0x0 align=4 (i32.const 0xC)
(call $blockfun (i32.const 4) (i32.const 4)))
)
(export "main" (func $main)))
diff --git a/tests/wasm_compile_br/instructions.wat b/tests/wasm_compile_br/instructions.wat
index cc7b370..35c8413 100644
--- a/tests/wasm_compile_br/instructions.wat
+++ b/tests/wasm_compile_br/instructions.wat
@@ -15,9 +15,9 @@
(i32.const -1))))
(func $main
;; write 0x00000000 at MEMORY_BOTTOM_ADDR
- (i32.store offset=0x0 align=2 (i32.const 0x0)
+ (i32.store offset=0x0 align=4 (i32.const 0x0)
(call $eq10 (i32.const 12)))
;; write 0xFFFFFFFF at MEMORY_BOTTOM_ADDR + 0x4
- (i32.store offset=0x0 align=2 (i32.const 0x4)
+ (i32.store offset=0x0 align=4 (i32.const 0x4)
(call $eq10 (i32.const 10))))
(export "main" (func $main)))
diff --git a/tests/wasm_compile_br_if/instructions.wat b/tests/wasm_compile_br_if/instructions.wat
index 506a462..cac1fa0 100644
--- a/tests/wasm_compile_br_if/instructions.wat
+++ b/tests/wasm_compile_br_if/instructions.wat
@@ -16,12 +16,12 @@
(i32.const -1))))
(func $main
;; write 0x00000000 at MEMORY_BOTTOM_ADDR
- (i32.store offset=0x0 align=2 (i32.const 0x0)
+ (i32.store offset=0x0 align=4 (i32.const 0x0)
(call $eq10or11 (i32.const 12)))
;; write 0xFFFFFFFF at MEMORY_BOTTOM_ADDR + 0x4
- (i32.store offset=0x0 align=2 (i32.const 0x4)
+ (i32.store offset=0x0 align=4 (i32.const 0x4)
(call $eq10or11 (i32.const 10)))
;; write 0xFFFFFFFF at MEMORY_BOTTOM_ADDR + 0x8
- (i32.store offset=0x0 align=2 (i32.const 0x8)
+ (i32.store offset=0x0 align=4 (i32.const 0x8)
(call $eq10or11 (i32.const 11))))
(export "main" (func $main)))
diff --git a/tests/wasm_compile_function_call/instructions.wat b/tests/wasm_compile_function_call/instructions.wat
index ad37037..2184573 100644
--- a/tests/wasm_compile_function_call/instructions.wat
+++ b/tests/wasm_compile_function_call/instructions.wat
@@ -5,7 +5,7 @@
i32.const 0x32 ;; value to substract from
i32.const 0x14 ;; value to substract
call $sub
- i32.store offset=0x25 align=2) ;; we store the difference at 0x23C
+ i32.store offset=0x25 align=4) ;; we store the difference at 0x23C
(func $sub (param $lhs i32) (param $rhs i32) (result i32)
local.get $lhs
local.get $rhs
diff --git a/tests/wasm_compile_if_else/instructions.wat b/tests/wasm_compile_if_else/instructions.wat
index 14faa6f..f1f44cd 100644
--- a/tests/wasm_compile_if_else/instructions.wat
+++ b/tests/wasm_compile_if_else/instructions.wat
@@ -11,9 +11,9 @@
(i32.const -1))))
(func $main
;; write 0x00000000 at MEMORY_BOTTOM_ADDR
- (i32.store offset=0x0 align=2 (i32.const 0x0)
+ (i32.store offset=0x0 align=4 (i32.const 0x0)
(call $eq10 (i32.const 12)))
;; write 0xFFFFFFFF at MEMORY_BOTTOM_ADDR + 0x4
- (i32.store offset=0x0 align=2 (i32.const 0x4)
+ (i32.store offset=0x0 align=4 (i32.const 0x4)
(call $eq10 (i32.const 10))))
(export "main" (func $main)))
diff --git a/tests/wasm_compile_loop/instructions.wat b/tests/wasm_compile_loop/instructions.wat
index 02a75e0..03b1d26 100644
--- a/tests/wasm_compile_loop/instructions.wat
+++ b/tests/wasm_compile_loop/instructions.wat
@@ -21,5 +21,5 @@
(i32.const 10))))
;; write computed sum (55 in dec, 37 in hex) at MEMORY_BOTTOM_ADDR
- (i32.store offset=0x0 align=2))
+ (i32.store offset=0x0 align=4))
(export "main" (func $main)))
diff --git a/tests/wasm_compile_simple_module/instructions.wat b/tests/wasm_compile_simple_module/instructions.wat
index bdf8a16..e677c93 100644
--- a/tests/wasm_compile_simple_module/instructions.wat
+++ b/tests/wasm_compile_simple_module/instructions.wat
@@ -3,5 +3,5 @@
(func $main
i32.const 0x1D ;; dynamic offset for memory store instruction
i32.const 0x1E ;; value to store
- i32.store offset=0x1F align=2) ;; we store the difference at 0x23C
+ i32.store offset=0x1F align=4) ;; we store the difference at 0x23C
(export "main" (func $main)))