Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions test/clocks/res_get-monotonic-success.wat
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
(module
(import "wasi_snapshot_preview1" "clock_res_get" (func $res_get (param i32 i32) (result i32)))
(memory 1)
(export "memory" (memory 0))
(func $_start
i32.const 1
i32.const 0
call $res_get
if
unreachable
end
)
(export "_start" (func $_start))
)
17 changes: 17 additions & 0 deletions test/clocks/res_get-negative-invalid.wat
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
(module
(import "wasi_snapshot_preview1" "clock_res_get" (func $res_get (param i32 i32) (result i32)))
(memory $0 0)
(export "memory" (memory $0))
(func $_start
i32.const -1
i32.const 0
call $res_get
i32.const 28
i32.ne
if
unreachable
end
)
(export "_start" (func $_start))
)

14 changes: 14 additions & 0 deletions test/clocks/res_get-realtime-success.wat
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
(module
(import "wasi_snapshot_preview1" "clock_res_get" (func $res_get (param i32 i32) (result i32)))
(memory 1)
(export "memory" (memory 0))
(func $_start
i32.const 0
i32.const 0
call $res_get
if
unreachable
end
)
(export "_start" (func $_start))
)
15 changes: 15 additions & 0 deletions test/clocks/time_get-monotonic-success.wat
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
(module
(import "wasi_snapshot_preview1" "clock_time_get" (func $time_get (param i32 i64 i32) (result i32)))
(memory 1)
(export "memory" (memory 0))
(func $_start
i32.const 1
i64.const 0
i32.const 0
call $time_get
if
unreachable
end
)
(export "_start" (func $_start))
)
15 changes: 15 additions & 0 deletions test/clocks/time_get-realtime-success.wat
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
(module
(import "wasi_snapshot_preview1" "clock_time_get" (func $time_get (param i32 i64 i32) (result i32)))
(memory 1)
(export "memory" (memory 0))
(func $_start
i32.const 0
i64.const 0
i32.const 0
call $time_get
if
unreachable
end
)
(export "_start" (func $_start))
)
9 changes: 9 additions & 0 deletions test/run_all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not intending to keep this; but added it temporarily so there's something in place to run this.


runtime=$1
shift

for input in $@; do
echo "$input"
$runtime $input && echo "PASS" || echo "FAIL"
done