From 16e9703f3810adc4f294fbc723c75f9107e89243 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Tue, 16 Aug 2022 15:33:50 +0300 Subject: refactor(tvix/eval): use pretty_assertions for tests This makes for much more readable output especially when long strings are involved. Change-Id: I43dd73a0480535d7181a760788c42883a9b083f8 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6229 Tested-by: BuildkiteCI Reviewed-by: sterni --- tvix/eval/src/tests/mod.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'tvix/eval/src') diff --git a/tvix/eval/src/tests/mod.rs b/tvix/eval/src/tests/mod.rs index 313498eeb777..ec9ee0d1c9ea 100644 --- a/tvix/eval/src/tests/mod.rs +++ b/tvix/eval/src/tests/mod.rs @@ -1,4 +1,5 @@ use crate::eval::interpret; +use pretty_assertions::assert_eq; use test_generator::test_resources; @@ -15,9 +16,9 @@ fn eval_okay_test(code_path: &str) { let result_str = format!("{}", result); assert_eq!( - exp.trim(), result_str, - "result value representation (right) must match expectation (left)" + exp.trim(), + "result value representation (left) must match expectation (right)" ); } @@ -31,9 +32,9 @@ fn identity(code_path: &str) { let result_str = format!("{}", result); assert_eq!( - code.trim(), result_str, - "result value representation (right) must match expectation (left)" + code.trim(), + "result value representation (left) must match expectation (right)" ) } -- cgit 1.4.1