Skip to content

Commit

Permalink
Move test_extend back to the previous place
Browse files Browse the repository at this point in the history
  • Loading branch information
magicant committed Oct 9, 2021
1 parent 1741702 commit 598f6a6
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/sys/signal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1144,6 +1144,19 @@ mod tests {
assert_eq!("9".parse::<Signal>(), errval);
}

#[test]
fn test_extend() {
let mut one_signal = SigSet::empty();
one_signal.add(SIGUSR1);

let mut two_signals = SigSet::empty();
two_signals.add(SIGUSR2);
two_signals.extend(&one_signal);

assert!(two_signals.contains(SIGUSR1));
assert!(two_signals.contains(SIGUSR2));
}

#[test]
#[cfg(not(target_os = "redox"))]
fn test_thread_signal_set_mask() {
Expand Down Expand Up @@ -1214,19 +1227,6 @@ mod tests {
}).join().unwrap();
}

#[test]
fn test_extend() {
let mut one_signal = SigSet::empty();
one_signal.add(SIGUSR1);

let mut two_signals = SigSet::empty();
two_signals.add(SIGUSR2);
two_signals.extend(&one_signal);

assert!(two_signals.contains(SIGUSR1));
assert!(two_signals.contains(SIGUSR2));
}

#[test]
fn test_from_and_into_iterator() {
let sigset = SigSet::from_iter(vec![Signal::SIGUSR1, Signal::SIGUSR2]);
Expand Down

0 comments on commit 598f6a6

Please sign in to comment.