Add std.hashset with explicit pure hash/equality policies and complete owning keys. Duplicate/full insert returns the original input, while remove/pop and nonempty free preserve explicit resource ownership. Reuse safe HashMap storage and failure/peak/refund accounting. Integrate normative contracts, RFC, references, complexity measurements, CLI/profile checks and independent Copy/owner set traces. Validation: 973 conformance cases; runtime set GC and schedule stress; unit/Quick Reference, formatting, hosted smoke, 53 CLI checks, 106 source coverage constructs and bundle generation.
675 lines
46 KiB
Rust
675 lines
46 KiB
Rust
// expect: run
|
|
// result: 42
|
|
// phase: 6
|
|
// spec: docs/spec/16-standard-library.md §2.15
|
|
// grant: heap=mem.alloc:512
|
|
// fuel: 2000000
|
|
module test.hashset
|
|
import std.hashset;
|
|
import std.option;
|
|
fn opened<K, H: fn(ref<K>) -> u64 effects [], E: fn(ref<K>,ref<K>) -> bool effects []>(capacity: usize,heap: cap<mem.alloc>) -> std.hashset.HashSet<K,fn H,fn E> effects [mem.alloc] {
|
|
match std.hashset.new::<K,fn H,fn E>(capacity,heap) { std.hashset.NewResult::<K,fn H,fn E>::ok(set) => { return move set; }, std.hashset.NewResult::<K,fn H,fn E>::err(error) => { trap; } }
|
|
}
|
|
fn inserted<K>(result: std.hashset.InsertResult<K>) -> void effects [] {
|
|
match move result { std.hashset.InsertResult::<K>::inserted => {}, std.hashset.InsertResult::<K>::present(key) => { trap; }, std.hashset.InsertResult::<K>::full(key) => { trap; } }
|
|
}
|
|
fn extracted<K>(result: std.option.Option<K>) -> K effects [] { match move result { std.option.Option::<K>::some(key) => { return move key; }, std.option.Option::<K>::none => { trap; } } }
|
|
fn released<K, H: fn(ref<K>) -> u64 effects [], E: fn(ref<K>,ref<K>) -> bool effects []>(set: std.hashset.HashSet<K,fn H,fn E>) -> void effects [] {
|
|
match std.hashset.free::<K,fn H,fn E>(move set) { std.hashset.FreeResult::<K,fn H,fn E>::ok => {}, std.hashset.FreeResult::<K,fn H,fn E>::not_empty(set) => { trap; } }
|
|
}
|
|
struct Key { id: u64, marker: u64 }
|
|
fn hash(key: ref<Key>) -> u64 effects [] { return key.id % 3u64; }
|
|
fn equal(a: ref<Key>,b: ref<Key>) -> bool effects [] { return a.id == b.id; }
|
|
fn main(heap: cap<mem.alloc>) -> u64 effects [mem.alloc] {
|
|
let set = opened::<Key,fn hash,fn equal>(2,heap);
|
|
{ mut q = set;
|
|
{
|
|
match std.hashset.insert::<Key,fn hash,fn equal>(q,Key { id: 1,marker: 1 }) { std.hashset.InsertResult::<Key>::inserted => { }, std.hashset.InsertResult::<Key>::present(key) => { trap; }, std.hashset.InsertResult::<Key>::full(key) => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 1usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 2usize);
|
|
{ let query = Key { id: 0,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 1,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 2,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 3,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 7,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
}
|
|
{
|
|
match std.hashset.insert::<Key,fn hash,fn equal>(q,Key { id: 2,marker: 2 }) { std.hashset.InsertResult::<Key>::inserted => { }, std.hashset.InsertResult::<Key>::present(key) => { trap; }, std.hashset.InsertResult::<Key>::full(key) => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 2usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 2usize);
|
|
{ let query = Key { id: 0,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 1,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 2,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 3,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 7,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
}
|
|
{
|
|
match std.hashset.pop::<Key,fn hash,fn equal>(q) { std.option.Option::<Key>::some(key) => { assert(key.id == 2u64); assert(key.marker == 2u64); }, std.option.Option::<Key>::none => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 1usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 2usize);
|
|
{ let query = Key { id: 0,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 1,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 2,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 3,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 7,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
}
|
|
{
|
|
let query = Key { id: 2,marker: 0 };
|
|
match std.hashset.remove::<Key,fn hash,fn equal>(q,ref query) { std.option.Option::<Key>::some(key) => { trap; }, std.option.Option::<Key>::none => { } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 1usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 2usize);
|
|
{ let query = Key { id: 0,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 1,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 2,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 3,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 7,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
}
|
|
{
|
|
match std.hashset.insert::<Key,fn hash,fn equal>(q,Key { id: 1,marker: 5 }) { std.hashset.InsertResult::<Key>::inserted => { trap; }, std.hashset.InsertResult::<Key>::present(key) => { assert(key.id == 1u64); assert(key.marker == 5u64); }, std.hashset.InsertResult::<Key>::full(key) => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 1usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 2usize);
|
|
{ let query = Key { id: 0,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 1,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 2,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 3,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 7,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
}
|
|
{
|
|
match std.hashset.reserve::<Key,fn hash,fn equal>(q,3usize,heap) { std.hashset.ReserveResult::ok => {}, std.hashset.ReserveResult::err(error) => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 1usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 3usize);
|
|
{ let query = Key { id: 0,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 1,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 2,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 3,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 7,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
}
|
|
{
|
|
match std.hashset.insert::<Key,fn hash,fn equal>(q,Key { id: 1,marker: 7 }) { std.hashset.InsertResult::<Key>::inserted => { trap; }, std.hashset.InsertResult::<Key>::present(key) => { assert(key.id == 1u64); assert(key.marker == 7u64); }, std.hashset.InsertResult::<Key>::full(key) => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 1usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 3usize);
|
|
{ let query = Key { id: 0,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 1,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 2,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 3,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 7,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
}
|
|
{
|
|
match std.hashset.insert::<Key,fn hash,fn equal>(q,Key { id: 0,marker: 8 }) { std.hashset.InsertResult::<Key>::inserted => { }, std.hashset.InsertResult::<Key>::present(key) => { trap; }, std.hashset.InsertResult::<Key>::full(key) => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 2usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 3usize);
|
|
{ let query = Key { id: 0,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 1,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 2,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 3,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 7,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
}
|
|
{
|
|
match std.hashset.reserve::<Key,fn hash,fn equal>(q,0usize,heap) { std.hashset.ReserveResult::ok => {}, std.hashset.ReserveResult::err(error) => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 2usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 3usize);
|
|
{ let query = Key { id: 0,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 1,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 2,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 3,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 7,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
}
|
|
{
|
|
let query = Key { id: 7,marker: 0 };
|
|
match std.hashset.remove::<Key,fn hash,fn equal>(q,ref query) { std.option.Option::<Key>::some(key) => { trap; }, std.option.Option::<Key>::none => { } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 2usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 3usize);
|
|
{ let query = Key { id: 0,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 1,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 2,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 3,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 7,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
}
|
|
{
|
|
let query = Key { id: 0,marker: 0 };
|
|
match std.hashset.remove::<Key,fn hash,fn equal>(q,ref query) { std.option.Option::<Key>::some(key) => { assert(key.id == 0u64); assert(key.marker == 8u64); }, std.option.Option::<Key>::none => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 1usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 3usize);
|
|
{ let query = Key { id: 0,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 1,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 2,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 3,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 7,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
}
|
|
{
|
|
match std.hashset.insert::<Key,fn hash,fn equal>(q,Key { id: 3,marker: 12 }) { std.hashset.InsertResult::<Key>::inserted => { }, std.hashset.InsertResult::<Key>::present(key) => { trap; }, std.hashset.InsertResult::<Key>::full(key) => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 2usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 3usize);
|
|
{ let query = Key { id: 0,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 1,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 2,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 3,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 7,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
}
|
|
{
|
|
match std.hashset.insert::<Key,fn hash,fn equal>(q,Key { id: 2,marker: 13 }) { std.hashset.InsertResult::<Key>::inserted => { }, std.hashset.InsertResult::<Key>::present(key) => { trap; }, std.hashset.InsertResult::<Key>::full(key) => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 3usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 3usize);
|
|
{ let query = Key { id: 0,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 1,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 2,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 3,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 7,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
}
|
|
{
|
|
match std.hashset.insert::<Key,fn hash,fn equal>(q,Key { id: 1,marker: 14 }) { std.hashset.InsertResult::<Key>::inserted => { trap; }, std.hashset.InsertResult::<Key>::present(key) => { assert(key.id == 1u64); assert(key.marker == 14u64); }, std.hashset.InsertResult::<Key>::full(key) => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 3usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 3usize);
|
|
{ let query = Key { id: 0,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 1,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 2,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 3,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 7,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
}
|
|
{
|
|
match std.hashset.insert::<Key,fn hash,fn equal>(q,Key { id: 7,marker: 15 }) { std.hashset.InsertResult::<Key>::inserted => { trap; }, std.hashset.InsertResult::<Key>::present(key) => { trap; }, std.hashset.InsertResult::<Key>::full(key) => { assert(key.id == 7u64); assert(key.marker == 15u64); } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 3usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 3usize);
|
|
{ let query = Key { id: 0,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 1,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 2,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 3,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 7,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
}
|
|
{
|
|
match std.hashset.pop::<Key,fn hash,fn equal>(q) { std.option.Option::<Key>::some(key) => { assert(key.id == 2u64); assert(key.marker == 13u64); }, std.option.Option::<Key>::none => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 2usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 3usize);
|
|
{ let query = Key { id: 0,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 1,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 2,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 3,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 7,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
}
|
|
{
|
|
match std.hashset.insert::<Key,fn hash,fn equal>(q,Key { id: 3,marker: 17 }) { std.hashset.InsertResult::<Key>::inserted => { trap; }, std.hashset.InsertResult::<Key>::present(key) => { assert(key.id == 3u64); assert(key.marker == 17u64); }, std.hashset.InsertResult::<Key>::full(key) => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 2usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 3usize);
|
|
{ let query = Key { id: 0,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 1,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 2,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 3,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 7,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
}
|
|
{
|
|
let query = Key { id: 3,marker: 0 };
|
|
match std.hashset.remove::<Key,fn hash,fn equal>(q,ref query) { std.option.Option::<Key>::some(key) => { assert(key.id == 3u64); assert(key.marker == 12u64); }, std.option.Option::<Key>::none => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 1usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 3usize);
|
|
{ let query = Key { id: 0,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 1,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 2,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 3,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 7,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
}
|
|
{
|
|
match std.hashset.insert::<Key,fn hash,fn equal>(q,Key { id: 7,marker: 19 }) { std.hashset.InsertResult::<Key>::inserted => { }, std.hashset.InsertResult::<Key>::present(key) => { trap; }, std.hashset.InsertResult::<Key>::full(key) => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 2usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 3usize);
|
|
{ let query = Key { id: 0,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 1,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 2,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 3,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 7,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
}
|
|
{
|
|
match std.hashset.insert::<Key,fn hash,fn equal>(q,Key { id: 7,marker: 20 }) { std.hashset.InsertResult::<Key>::inserted => { trap; }, std.hashset.InsertResult::<Key>::present(key) => { assert(key.id == 7u64); assert(key.marker == 20u64); }, std.hashset.InsertResult::<Key>::full(key) => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 2usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 3usize);
|
|
{ let query = Key { id: 0,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 1,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 2,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 3,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 7,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
}
|
|
{
|
|
match std.hashset.pop::<Key,fn hash,fn equal>(q) { std.option.Option::<Key>::some(key) => { assert(key.id == 7u64); assert(key.marker == 19u64); }, std.option.Option::<Key>::none => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 1usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 3usize);
|
|
{ let query = Key { id: 0,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 1,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 2,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 3,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 7,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
}
|
|
{
|
|
match std.hashset.insert::<Key,fn hash,fn equal>(q,Key { id: 3,marker: 22 }) { std.hashset.InsertResult::<Key>::inserted => { }, std.hashset.InsertResult::<Key>::present(key) => { trap; }, std.hashset.InsertResult::<Key>::full(key) => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 2usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 3usize);
|
|
{ let query = Key { id: 0,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 1,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 2,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 3,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 7,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
}
|
|
{
|
|
match std.hashset.pop::<Key,fn hash,fn equal>(q) { std.option.Option::<Key>::some(key) => { assert(key.id == 3u64); assert(key.marker == 22u64); }, std.option.Option::<Key>::none => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 1usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 3usize);
|
|
{ let query = Key { id: 0,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 1,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 2,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 3,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 7,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
}
|
|
{
|
|
match std.hashset.insert::<Key,fn hash,fn equal>(q,Key { id: 2,marker: 24 }) { std.hashset.InsertResult::<Key>::inserted => { }, std.hashset.InsertResult::<Key>::present(key) => { trap; }, std.hashset.InsertResult::<Key>::full(key) => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 2usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 3usize);
|
|
{ let query = Key { id: 0,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 1,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 2,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 3,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 7,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
}
|
|
{
|
|
match std.hashset.insert::<Key,fn hash,fn equal>(q,Key { id: 1,marker: 25 }) { std.hashset.InsertResult::<Key>::inserted => { trap; }, std.hashset.InsertResult::<Key>::present(key) => { assert(key.id == 1u64); assert(key.marker == 25u64); }, std.hashset.InsertResult::<Key>::full(key) => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 2usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 3usize);
|
|
{ let query = Key { id: 0,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 1,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 2,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 3,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 7,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
}
|
|
{
|
|
match std.hashset.insert::<Key,fn hash,fn equal>(q,Key { id: 18446744073709551615,marker: 26 }) { std.hashset.InsertResult::<Key>::inserted => { }, std.hashset.InsertResult::<Key>::present(key) => { trap; }, std.hashset.InsertResult::<Key>::full(key) => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 3usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 3usize);
|
|
{ let query = Key { id: 0,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 1,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 2,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 3,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 7,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
}
|
|
{
|
|
match std.hashset.reserve::<Key,fn hash,fn equal>(q,2usize,heap) { std.hashset.ReserveResult::ok => {}, std.hashset.ReserveResult::err(error) => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 3usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 3usize);
|
|
{ let query = Key { id: 0,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 1,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 2,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 3,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 7,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
}
|
|
{
|
|
match std.hashset.insert::<Key,fn hash,fn equal>(q,Key { id: 3,marker: 28 }) { std.hashset.InsertResult::<Key>::inserted => { trap; }, std.hashset.InsertResult::<Key>::present(key) => { trap; }, std.hashset.InsertResult::<Key>::full(key) => { assert(key.id == 3u64); assert(key.marker == 28u64); } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 3usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 3usize);
|
|
{ let query = Key { id: 0,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 1,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 2,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 3,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 7,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
}
|
|
{
|
|
match std.hashset.pop::<Key,fn hash,fn equal>(q) { std.option.Option::<Key>::some(key) => { assert(key.id == 18446744073709551615u64); assert(key.marker == 26u64); }, std.option.Option::<Key>::none => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 2usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 3usize);
|
|
{ let query = Key { id: 0,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 1,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 2,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 3,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 7,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
}
|
|
{
|
|
match std.hashset.pop::<Key,fn hash,fn equal>(q) { std.option.Option::<Key>::some(key) => { assert(key.id == 2u64); assert(key.marker == 24u64); }, std.option.Option::<Key>::none => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 1usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 3usize);
|
|
{ let query = Key { id: 0,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 1,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 2,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 3,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 7,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
}
|
|
{
|
|
match std.hashset.reserve::<Key,fn hash,fn equal>(q,4usize,heap) { std.hashset.ReserveResult::ok => {}, std.hashset.ReserveResult::err(error) => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 1usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 4usize);
|
|
{ let query = Key { id: 0,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 1,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 2,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 3,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 7,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
}
|
|
{
|
|
let query = Key { id: 2,marker: 0 };
|
|
match std.hashset.remove::<Key,fn hash,fn equal>(q,ref query) { std.option.Option::<Key>::some(key) => { trap; }, std.option.Option::<Key>::none => { } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 1usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 4usize);
|
|
{ let query = Key { id: 0,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 1,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 2,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 3,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 7,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
}
|
|
{
|
|
match std.hashset.pop::<Key,fn hash,fn equal>(q) { std.option.Option::<Key>::some(key) => { assert(key.id == 1u64); assert(key.marker == 1u64); }, std.option.Option::<Key>::none => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 0usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 4usize);
|
|
{ let query = Key { id: 0,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 1,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 2,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 3,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 7,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
}
|
|
{
|
|
match std.hashset.insert::<Key,fn hash,fn equal>(q,Key { id: 1,marker: 34 }) { std.hashset.InsertResult::<Key>::inserted => { }, std.hashset.InsertResult::<Key>::present(key) => { trap; }, std.hashset.InsertResult::<Key>::full(key) => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 1usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 4usize);
|
|
{ let query = Key { id: 0,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 1,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 2,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 3,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 7,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
}
|
|
{
|
|
match std.hashset.pop::<Key,fn hash,fn equal>(q) { std.option.Option::<Key>::some(key) => { assert(key.id == 1u64); assert(key.marker == 34u64); }, std.option.Option::<Key>::none => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 0usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 4usize);
|
|
{ let query = Key { id: 0,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 1,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 2,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 3,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 7,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
}
|
|
{
|
|
match std.hashset.insert::<Key,fn hash,fn equal>(q,Key { id: 7,marker: 36 }) { std.hashset.InsertResult::<Key>::inserted => { }, std.hashset.InsertResult::<Key>::present(key) => { trap; }, std.hashset.InsertResult::<Key>::full(key) => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 1usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 4usize);
|
|
{ let query = Key { id: 0,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 1,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 2,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 3,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 7,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
}
|
|
{
|
|
match std.hashset.insert::<Key,fn hash,fn equal>(q,Key { id: 1,marker: 37 }) { std.hashset.InsertResult::<Key>::inserted => { }, std.hashset.InsertResult::<Key>::present(key) => { trap; }, std.hashset.InsertResult::<Key>::full(key) => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 2usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 4usize);
|
|
{ let query = Key { id: 0,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 1,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 2,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 3,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 7,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
}
|
|
{
|
|
match std.hashset.insert::<Key,fn hash,fn equal>(q,Key { id: 1,marker: 38 }) { std.hashset.InsertResult::<Key>::inserted => { trap; }, std.hashset.InsertResult::<Key>::present(key) => { assert(key.id == 1u64); assert(key.marker == 38u64); }, std.hashset.InsertResult::<Key>::full(key) => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 2usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 4usize);
|
|
{ let query = Key { id: 0,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 1,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 2,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 3,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 7,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
}
|
|
{
|
|
match std.hashset.insert::<Key,fn hash,fn equal>(q,Key { id: 18446744073709551615,marker: 39 }) { std.hashset.InsertResult::<Key>::inserted => { }, std.hashset.InsertResult::<Key>::present(key) => { trap; }, std.hashset.InsertResult::<Key>::full(key) => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 3usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 4usize);
|
|
{ let query = Key { id: 0,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 1,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 2,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 3,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 7,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
}
|
|
{
|
|
match std.hashset.pop::<Key,fn hash,fn equal>(q) { std.option.Option::<Key>::some(key) => { assert(key.id == 18446744073709551615u64); assert(key.marker == 39u64); }, std.option.Option::<Key>::none => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 2usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 4usize);
|
|
{ let query = Key { id: 0,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 1,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 2,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 3,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
{ let query = Key { id: 7,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,marker: 0 }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
}
|
|
}
|
|
{ let key = extracted::<Key>(std.hashset.pop::<Key,fn hash,fn equal>(q)); assert(key.id == 1u64); assert(key.marker == 37u64); }
|
|
{ let key = extracted::<Key>(std.hashset.pop::<Key,fn hash,fn equal>(q)); assert(key.id == 7u64); assert(key.marker == 36u64); }
|
|
} released::<Key,fn hash,fn equal>(move set); return 42;
|
|
}
|