tests: update ExternalName api
This commit is contained in:
committed by
Jakob Stoklund Olesen
parent
803b83c87a
commit
eb49d9f8bf
@@ -447,9 +447,9 @@ mod tests {
|
||||
#[test]
|
||||
fn basic() {
|
||||
let mut f = Function::new();
|
||||
assert_eq!(f.to_string(), "function %() native {\n}\n");
|
||||
assert_eq!(f.to_string(), "function u0:0() native {\n}\n");
|
||||
|
||||
f.name = ExternalName::new("foo");
|
||||
f.name = ExternalName::testcase("foo");
|
||||
assert_eq!(f.to_string(), "function %foo() native {\n}\n");
|
||||
|
||||
f.create_stack_slot(StackSlotData::new(StackSlotKind::Local, 4));
|
||||
|
||||
@@ -613,7 +613,7 @@ mod tests {
|
||||
sig.params.push(AbiParam::new(I32));
|
||||
|
||||
let mut il_builder = ILBuilder::<Variable>::new();
|
||||
let mut func = Function::with_name_signature(ExternalName::new("sample_function"), sig);
|
||||
let mut func = Function::with_name_signature(ExternalName::testcase("sample"), sig);
|
||||
{
|
||||
let mut builder = FunctionBuilder::<Variable>::new(&mut func, &mut il_builder);
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
//! sig.returns.push(AbiParam::new(I32));
|
||||
//! sig.params.push(AbiParam::new(I32));
|
||||
//! let mut il_builder = ILBuilder::<Variable>::new();
|
||||
//! let mut func = Function::with_name_signature(ExternalName::new("sample_function"), sig);
|
||||
//! let mut func = Function::with_name_signature(ExternalName::user(0, 0), sig);
|
||||
//! {
|
||||
//! let mut builder = FunctionBuilder::<Variable>::new(&mut func, &mut il_builder);
|
||||
//!
|
||||
|
||||
@@ -252,7 +252,7 @@ mod tests {
|
||||
let runtime = DummyEnvironment::default();
|
||||
let mut ctx = Context::new();
|
||||
|
||||
ctx.func.name = ir::ExternalName::new("small1");
|
||||
ctx.func.name = ir::ExternalName::testcase("small1");
|
||||
ctx.func.signature.params.push(ir::AbiParam::new(I32));
|
||||
ctx.func.signature.returns.push(ir::AbiParam::new(I32));
|
||||
|
||||
@@ -283,7 +283,7 @@ mod tests {
|
||||
let runtime = DummyEnvironment::default();
|
||||
let mut ctx = Context::new();
|
||||
|
||||
ctx.func.name = ir::ExternalName::new("small2");
|
||||
ctx.func.name = ir::ExternalName::testcase("small2");
|
||||
ctx.func.signature.params.push(ir::AbiParam::new(I32));
|
||||
ctx.func.signature.returns.push(ir::AbiParam::new(I32));
|
||||
|
||||
@@ -323,7 +323,7 @@ mod tests {
|
||||
let runtime = DummyEnvironment::default();
|
||||
let mut ctx = Context::new();
|
||||
|
||||
ctx.func.name = ir::ExternalName::new("infloop");
|
||||
ctx.func.name = ir::ExternalName::testcase("infloop");
|
||||
ctx.func.signature.returns.push(ir::AbiParam::new(I32));
|
||||
|
||||
trans
|
||||
|
||||
Reference in New Issue
Block a user