generalize segment setValue tests