-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Expand file tree
/
Copy pathwinch_engine_features.rs
More file actions
66 lines (60 loc) · 1.84 KB
/
Copy pathwinch_engine_features.rs
File metadata and controls
66 lines (60 loc) · 1.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
use wasmtime::*;
use wasmtime_test_macros::wasmtime_test;
#[wasmtime_test(strategies(only(Winch)))]
#[cfg_attr(miri, ignore)]
fn ensure_compatibility_between_winch_and_table_lazy_init(config: &mut Config) -> Result<()> {
config.table_lazy_init(false);
let result = Engine::new(&config);
match result {
Ok(_) => {
wasmtime::bail!(
"Expected incompatibility between the `table_lazy_init` option and Winch"
)
}
Err(e) => {
assert_eq!(
e.to_string(),
"Winch requires the table-lazy-init option to be enabled"
);
}
}
Ok(())
}
#[wasmtime_test(strategies(only(Winch)))]
#[cfg_attr(miri, ignore)]
fn ensure_compatibility_between_winch_and_signals_based_traps(config: &mut Config) -> Result<()> {
config.signals_based_traps(false);
let result = Engine::new(&config);
match result {
Ok(_) => {
wasmtime::bail!(
"Expected incompatibility between the `signals_based_traps` option and Winch"
)
}
Err(e) => {
assert_eq!(
e.to_string(),
"Winch requires the signals-based-traps option to be enabled"
);
}
}
Ok(())
}
#[wasmtime_test(strategies(only(Winch)))]
#[cfg_attr(miri, ignore)]
fn ensure_compatibility_between_winch_and_debug_native(config: &mut Config) -> Result<()> {
config.debug_info(true);
let result = Engine::new(&config);
match result {
Ok(_) => {
wasmtime::bail!("Expected incompatibility between the `debug_native` option and Winch")
}
Err(e) => {
assert_eq!(
e.to_string(),
"Winch does not currently support generating native debug information"
);
}
}
Ok(())
}