Skip to main content

prop_sort_stability

Function prop_sort_stability 

Source
pub fn prop_sort_stability(
    ctx: &TestContext,
    keys: Vec<u32>,
    vals: Vec<u32>,
) -> Result<(), String>
Expand description

Property: When sorting by key, rows with equal keys maintain their original relative order (stability).

For each group of equal keys, if row A appeared before row B in the input, row A should appear before row B in the output.