Lines Matching refs:assert
7 assert!(Global::new(&mut store, ty.clone(), Val::I64(0)).is_err()); in bad_globals()
8 assert!(Global::new(&mut store, ty.clone(), Val::F32(0)).is_err()); in bad_globals()
9 assert!(Global::new(&mut store, ty.clone(), Val::F64(0)).is_err()); in bad_globals()
13 assert!(g.set(&mut store, Val::I32(1)).is_err()); in bad_globals()
17 assert!(g.set(&mut store, Val::I64(0)).is_err()); in bad_globals()
26 assert!(Table::new(&mut store, ty.clone(), Ref::Extern(None)).is_err()); in bad_tables()
31 assert!(t.get(&mut store, 0).is_none()); in bad_tables()
32 assert!(t.get(&mut store, u64::from(u32::MAX)).is_none()); in bad_tables()
33 assert!(t.get(&mut store, u64::MAX).is_none()); in bad_tables()
38 assert!(t.set(&mut store, 0, Ref::Extern(None)).is_err()); in bad_tables()
39 assert!(t.set(&mut store, 0, Ref::Func(None)).is_ok()); in bad_tables()
40 assert!(t.set(&mut store, 1, Ref::Func(None)).is_err()); in bad_tables()
45 assert!(t.grow(&mut store, 0, Ref::Func(None)).is_ok()); in bad_tables()
46 assert!(t.grow(&mut store, 1, Ref::Func(None)).is_err()); in bad_tables()
52 assert!(t.grow(&mut store, 1, Ref::Extern(None)).is_err()); in bad_tables()
76 assert!(Instance::new(&mut store1, &need_func, &[func.into()]).is_err()); in cross_store()
79 assert!(Instance::new(&mut store1, &need_global, &[global.into()]).is_err()); in cross_store()
82 assert!(Instance::new(&mut store1, &need_table, &[table.into()]).is_err()); in cross_store()
85 assert!(Instance::new(&mut store1, &need_memory, &[memory.into()]).is_err()); in cross_store()
95 assert!(Global::new(&mut store2, ty.clone(), store1val).is_err()); in cross_store()
97 assert!(g.set(&mut store2, store1val).is_err()); in cross_store()
103 assert!(Table::new(&mut store2, ty.clone(), store1ref.clone()).is_err()); in cross_store()
105 assert!(t1.set(&mut store2, 0, store1ref.clone()).is_err()); in cross_store()
106 assert!(t1.grow(&mut store2, 0, store1ref.clone()).is_err()); in cross_store()
107 assert!(t1.fill(&mut store2, 0, store1ref.clone(), 1).is_err()); in cross_store()
117 assert!( in cross_store()
121 assert!( in cross_store()
125 assert!( in cross_store()
129 assert!( in cross_store()
133 assert!( in cross_store()
137 assert!( in cross_store()
145 assert!(s1_f_t.call(&mut store1, None).is_ok()); in cross_store()
146 assert!(s2_f_t.call(&mut store2, None).is_ok()); in cross_store()
147 assert!(s1_f_t.call(&mut store1, Some(s1_f)).is_ok()); in cross_store()
148 assert!(s1_f_t.call(&mut store1, Some(s2_f)).is_err()); in cross_store()
149 assert!(s2_f_t.call(&mut store2, Some(s1_f)).is_err()); in cross_store()
150 assert!(s2_f_t.call(&mut store2, Some(s2_f)).is_ok()); in cross_store()
169 assert!(global.get(&mut store).unwrap_externref().is_none()); in get_set_externref_globals_via_api()
174 assert!( in get_set_externref_globals_via_api()
196 assert!(r.data(&store)?.expect("should have host data").is::<i32>()); in get_set_externref_globals_via_api()
225 assert!(global.get(&mut store).unwrap_funcref().is_none()); in get_set_funcref_globals_via_api()
229 assert!(FuncType::eq(&f.ty(&store), &f2.ty(&store))); in get_set_funcref_globals_via_api()
239 assert!(FuncType::eq(&f.ty(&store), &f2.ty(&store))); in get_set_funcref_globals_via_api()
255 assert!(table.get(&mut store, 5).unwrap().unwrap_func().is_some()); in create_get_set_funcref_tables_via_api()
257 assert!(table.get(&mut store, 5).unwrap().unwrap_func().is_none()); in create_get_set_funcref_tables_via_api()
273 assert!(table.get(&mut store, i).unwrap().unwrap_func().is_none()); in fill_funcref_tables_via_api()
280 assert!(table.get(&mut store, i).unwrap().unwrap_func().is_none()); in fill_funcref_tables_via_api()
283 assert!(table.get(&mut store, i).unwrap().unwrap_func().is_some()); in fill_funcref_tables_via_api()
330 assert!(table.get(&mut store, 5).unwrap().unwrap_extern().is_none()); in create_get_set_externref_tables_via_api()
346 assert!(table.get(&mut store, i).unwrap().unwrap_extern().is_none()); in fill_externref_tables_via_api()
353 assert!(table.get(&mut store, i).unwrap().unwrap_extern().is_none()); in fill_externref_tables_via_api()
413 assert!(res.is_err()); in read_write_memory_via_api()
428 assert!(res.is_err()); in read_write_memory_via_api()
433 assert!(res.is_err()); in read_write_memory_via_api()
437 assert!(res.is_err()); in read_write_memory_via_api()
495 assert!(a_ty.matches(&a_ty)); in dummy_funcs_and_subtypes()
496 assert!(a_ty.matches(&b_ty)); in dummy_funcs_and_subtypes()
497 assert!(a_ty.matches(&c_ty)); in dummy_funcs_and_subtypes()
498 assert!(!b_ty.matches(&a_ty)); in dummy_funcs_and_subtypes()
499 assert!(b_ty.matches(&b_ty)); in dummy_funcs_and_subtypes()
500 assert!(b_ty.matches(&c_ty)); in dummy_funcs_and_subtypes()
501 assert!(!c_ty.matches(&a_ty)); in dummy_funcs_and_subtypes()
502 assert!(!c_ty.matches(&b_ty)); in dummy_funcs_and_subtypes()
503 assert!(c_ty.matches(&c_ty)); in dummy_funcs_and_subtypes()
505 assert!(a.matches_ty(&store, &a_ty)); in dummy_funcs_and_subtypes()
506 assert!(a.matches_ty(&store, &b_ty)); in dummy_funcs_and_subtypes()
507 assert!(a.matches_ty(&store, &c_ty)); in dummy_funcs_and_subtypes()
508 assert!(!b.matches_ty(&store, &a_ty)); in dummy_funcs_and_subtypes()
509 assert!(b.matches_ty(&store, &b_ty)); in dummy_funcs_and_subtypes()
510 assert!(b.matches_ty(&store, &c_ty)); in dummy_funcs_and_subtypes()
511 assert!(!c.matches_ty(&store, &a_ty)); in dummy_funcs_and_subtypes()
512 assert!(!c.matches_ty(&store, &b_ty)); in dummy_funcs_and_subtypes()
513 assert!(c.matches_ty(&store, &c_ty)); in dummy_funcs_and_subtypes()
546 Err(e) if !expected => assert!(e.to_string().contains("type mismatch")), in new_global_func_subtyping()
584 Err(e) if !expected => assert!(e.to_string().contains("type mismatch")), in global_set_func_subtyping()
615 Err(e) if !expected => assert!(e.to_string().contains("type mismatch")), in new_table_func_subtyping()
647 assert!(table.get(&mut store, i).expect("in bounds").is_null()); in table_set_func_subtyping()
652 Err(e) if !expected => assert!(e.to_string().contains("type mismatch")), in table_set_func_subtyping()
657 assert!(table.get(&mut store, i).expect("in bounds").is_non_null()); in table_set_func_subtyping()
694 Err(e) if !expected => assert!(e.to_string().contains("type mismatch")), in table_grow_func_subtyping()
702 assert!(table.get(&mut store, i).expect("in bounds").is_non_null()); in table_grow_func_subtyping()
736 Err(e) if !expected => assert!(e.to_string().contains("type mismatch")), in table_fill_func_subtyping()
742 assert!(table.get(&mut store, i).expect("in bounds").is_non_null()); in table_fill_func_subtyping()
791 Err(e) if !expected => assert!(e.to_string().contains("type mismatch")), in table_copy_func_subtyping()
797 assert!( in table_copy_func_subtyping()