From 355dd996a20c35f2395c5e855737cf4ed5e67479 Mon Sep 17 00:00:00 2001 From: bjorn3 Date: Sun, 10 Oct 2021 15:00:25 +0200 Subject: [PATCH] Fix tests --- cranelift/codegen/src/ir/constant.rs | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/cranelift/codegen/src/ir/constant.rs b/cranelift/codegen/src/ir/constant.rs index 5d97cb8187..8a319d7ac1 100644 --- a/cranelift/codegen/src/ir/constant.rs +++ b/cranelift/codegen/src/ir/constant.rs @@ -337,22 +337,6 @@ mod tests { sut.get(a); // panics, only use constants returned by ConstantPool } - #[test] - fn get_offset() { - let mut sut = ConstantPool::new(); - let a = sut.insert(vec![1].into()); - sut.set_offset(a, 42); - assert_eq!(sut.get_offset(a), 42) - } - - #[test] - #[should_panic] - fn get_nonexistent_offset() { - let mut sut = ConstantPool::new(); - let a = sut.insert(vec![1].into()); - sut.get_offset(a); // panics, set_offset should have been called - } - #[test] fn display_constant_data() { assert_eq!(ConstantData::from([0].as_ref()).to_string(), "0x00");