Fix tests
This commit is contained in:
@@ -337,22 +337,6 @@ mod tests {
|
|||||||
sut.get(a); // panics, only use constants returned by ConstantPool
|
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]
|
#[test]
|
||||||
fn display_constant_data() {
|
fn display_constant_data() {
|
||||||
assert_eq!(ConstantData::from([0].as_ref()).to_string(), "0x00");
|
assert_eq!(ConstantData::from([0].as_ref()).to_string(), "0x00");
|
||||||
|
|||||||
Reference in New Issue
Block a user