vfs::test_utils

Function build_flag_combinations

Source
pub fn build_flag_combinations<T: Flags + Copy>(
    constant_flags: T,
    variable_flags: T,
) -> Vec<T>
Expand description

Returns a list of flag combinations to test. Returns a vector of the aggregate of every constant flag and every combination of variable flags. For example, calling build_flag_combinations(100, 011) would return [100, 110, 101, 111] (in binary), whereas build_flag_combinations(0, 011) would return [000, 001, 010, 011].