about summary refs log tree commit diff
path: root/tvix/eval/src/tests
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2022-08-16T12·33+0300
committertazjin <tazjin@tvl.su>2022-09-01T12·50+0000
commit16e9703f3810adc4f294fbc723c75f9107e89243 (patch)
treee97cd7d612f5de7dc1e125ae448366424b326581 /tvix/eval/src/tests
parentf153a163a692215aa754218e18f6809f1ab0eb48 (diff)
refactor(tvix/eval): use pretty_assertions for tests r/4563
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 <sternenseemann@systemli.org>
Diffstat (limited to 'tvix/eval/src/tests')
-rw-r--r--tvix/eval/src/tests/mod.rs9
1 files changed, 5 insertions, 4 deletions
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)"
     )
 }