in plasma-store/src/tests.rs [253:276]
fn plasma_client_create_then_abort() {
let pc = build_client();
// create an object of a given size
let oid = ObjectId::rand();
let data_size = 16;
let meta = [1, 2, 3, 4];
let mut ob = pc.create(oid.clone(), data_size, &meta).unwrap();
// write data into the object's data buffer
let data = [1u8, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16];
let data_buf = ob.data_mut();
for i in 0..data_buf.len() {
data_buf[i] = data[i];
}
// abort the object
ob.abort().unwrap();
assert_eq!(
false,
pc.contains(&oid).unwrap(),
"object should not be in the store"
);
}