Skip to content

Commit

Permalink
Make test sleeps slightly longer to avoid some trailing sleeps not tr…
Browse files Browse the repository at this point in the history
…igger a spacer.
  • Loading branch information
samwho committed Jun 25, 2023
1 parent 61f0be0 commit 9ca7b00
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -322,14 +322,14 @@ mod tests {
}

#[test_case(vec![], vec![] ; "no output")]
#[test_case(vec![Sleep(120)], vec![] ; "no output, after sleep")]
#[test_case(vec![Sleep(150)], vec![] ; "no output, after sleep")]
#[test_case(
vec![WriteLn("foo"), Sleep(120)],
vec![WriteLn("foo"), Sleep(150)],
vec![Line("foo"), Spacer]
; "single line"
)]
#[test_case(
vec![WriteLn("foo"), Sleep(120), WriteLn("bar"), WriteLn("baz"), Sleep(120)],
vec![WriteLn("foo"), Sleep(150), WriteLn("bar"), WriteLn("baz"), Sleep(150)],
vec![Line("foo"), Spacer, Line("bar"), Line("baz"), Spacer]
; "multiple lines"
)]
Expand All @@ -339,7 +339,7 @@ mod tests {
; "multiple lines, no sleeps"
)]
#[test_case(
vec![Write("foo"), Write("bar"), Sleep(120), WriteLn("baz")],
vec![Write("foo"), Write("bar"), Sleep(150), WriteLn("baz")],
vec![Line("foobarbaz")]
; "single line, sleep in the middle"
)]
Expand Down

0 comments on commit 9ca7b00

Please sign in to comment.