Skip to content

Commit 9992fbf

Browse files
committed
Add test for run
Exercising the `Err(())` return type
1 parent 58a828f commit 9992fbf

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"operations": [
3+
{
4+
"type": "run"
5+
},
6+
{
7+
"type": "wait",
8+
"exit_code": 1
9+
}
10+
]
11+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
use test_wasm32_wasip3::cli::{export, exports::wasi::cli::run::Guest};
2+
3+
struct Component;
4+
export!(Component);
5+
6+
impl Guest for Component {
7+
async fn run() -> Result<(), ()> {
8+
Err(())
9+
}
10+
}
11+
12+
fn main() {
13+
unreachable!()
14+
}

0 commit comments

Comments
 (0)