From bd0590604d1da3c9bccbdcadd09f2b0b3997ac47 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Thu, 31 Aug 2017 07:45:35 -0700 Subject: [PATCH] Test dfg's next_inst(). --- lib/cretonne/src/ir/dfg.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/cretonne/src/ir/dfg.rs b/lib/cretonne/src/ir/dfg.rs index 219557aeb8..8a1447f858 100644 --- a/lib/cretonne/src/ir/dfg.rs +++ b/lib/cretonne/src/ir/dfg.rs @@ -866,7 +866,10 @@ mod tests { let mut dfg = DataFlowGraph::new(); let idata = InstructionData::Nullary { opcode: Opcode::Iconst }; + let next = dfg.next_inst(); let inst = dfg.make_inst(idata); + assert_eq!(next, inst); + dfg.make_inst_results(inst, types::I32); assert_eq!(inst.to_string(), "inst0"); assert_eq!(dfg.display_inst(inst, None).to_string(), "v0 = iconst.i32");