Diagnosing a Linux-only unit test failure
codeblog.jonskeet.uk
Diagnosing a Linux-only unit test failure
1–10 of 25 posts
Re: Diagnosing a Linux-only unit test failure
#2 Console.WriteLine($"lhs=({lhs.x}, {lhs.y}); rhs=({rhs.x}, {rhs.y})");
Console.WriteLine($"{lhs.x == rhs.x}, {lhs.y == rhs.y}");Re: Diagnosing a Linux-only unit test failure
#3Not directly related to the article, but string interpolation in code samples in step 6 looks somewhat unreadable without proper syntax coloring: Console.WriteLine($"lhs=({lhs.x}, {lhs.y}); rhs=({rhs.x}, {rhs.y})"); Console.WriteLine($"{lhs.x == rhs.x}, {lhs.y == rhs.y}");
Re: Diagnosing a Linux-only unit test failure
#4Re: Diagnosing a Linux-only unit test failure
#5Fun problem.
Re: Diagnosing a Linux-only unit test failure
#6To address this, CircleCI has an interesting feature where you can enable SSH access to the build, so one can investigate locally (relative to the build) instead of repeatedly throwing code over the wall and waiting for something remotely meaningful to come back in logs.
Re: Diagnosing a Linux-only unit test failure
#7Not directly related to the article, but string interpolation in code samples in step 6 looks somewhat unreadable without proper syntax coloring: Console.WriteLine($"lhs=({lhs.x}, {lhs.y}); rhs=({rhs.x}, {rhs.y})"); Console.WriteLine($"{lhs.x == rhs.x}, {lhs.y == rhs.y}");
They look fine to me, but I guess it helps that both Python and Rust use the same interpolation style.
("lhs=({}, {}); rhs=({}, {})", lhs.x, lhs.y, rhs.x, rhs.y)Re: Diagnosing a Linux-only unit test failure
#8Earlier quoted context omitted.
They look fine to me, but I guess it helps that both Python and Rust use the same interpolation style.
Err... do either python or rust allow this style, in both languages I've always used ("lhs=({}, {}); rhs=({}, {})", lhs.x, lhs.y, rhs.x, rhs.y)
f"{some_var}"
which evaluates "some_var" in the local scope. Sort of like Ruby's "#{...}" (if I'm remembering that syntax correctly). Rust supports named parameters in format strings[2] but that's not quite the same.[1]: https://www.python.org/dev/peps/pep-0498/ [2]: https://doc.rust-lang.org/std/fmt/#named-parameters
Re: Diagnosing a Linux-only unit test failure
#9Re: Diagnosing a Linux-only unit test failure
#10Comparing doubles with == ?