Skip to content

Commit 48cf68e

Browse files
committed
Fixing the tests that broke because of a change in how Rust formats 0f64. See rust-lang/rust#47619
1 parent 939b52e commit 48cf68e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/drawing.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ mod tests {
552552
use turtle::*;
553553

554554
#[test]
555-
#[should_panic(expected = "Invalid color: Color { red: NaN, green: 0, blue: 0, alpha: 0 }. See the color module documentation for more information.")]
555+
#[should_panic(expected = "Invalid color: Color { red: NaN, green: 0.0, blue: 0.0, alpha: 0.0 }. See the color module documentation for more information.")]
556556
fn rejects_invalid_background_color() {
557557
let mut turtle = Turtle::new();
558558
turtle.drawing_mut().set_background_color(Color {red: ::std::f64::NAN, green: 0.0, blue: 0.0, alpha: 0.0});

src/turtle.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1026,14 +1026,14 @@ mod tests {
10261026
}
10271027

10281028
#[test]
1029-
#[should_panic(expected = "Invalid color: Color { red: NaN, green: 0, blue: 0, alpha: 0 }. See the color module documentation for more information.")]
1029+
#[should_panic(expected = "Invalid color: Color { red: NaN, green: 0.0, blue: 0.0, alpha: 0.0 }. See the color module documentation for more information.")]
10301030
fn rejects_invalid_pen_color() {
10311031
let mut turtle = Turtle::new();
10321032
turtle.set_pen_color(Color {red: ::std::f64::NAN, green: 0.0, blue: 0.0, alpha: 0.0});
10331033
}
10341034

10351035
#[test]
1036-
#[should_panic(expected = "Invalid color: Color { red: NaN, green: 0, blue: 0, alpha: 0 }. See the color module documentation for more information.")]
1036+
#[should_panic(expected = "Invalid color: Color { red: NaN, green: 0.0, blue: 0.0, alpha: 0.0 }. See the color module documentation for more information.")]
10371037
fn rejects_invalid_fill_color() {
10381038
let mut turtle = Turtle::new();
10391039
turtle.set_fill_color(Color {red: ::std::f64::NAN, green: 0.0, blue: 0.0, alpha: 0.0});

0 commit comments

Comments
 (0)