refactor(tvix/eval): use new public API in test code

This removes internal uses of the previous crate::eval module, which
is being removed.

Change-Id: I5fb3c53460a9c5381853d0258f9ed074ab23c630
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7543
Tested-by: BuildkiteCI
Autosubmit: tazjin <tazjin@tvl.su>
Reviewed-by: grfn <grfn@gws.fyi>
This commit is contained in:
Vincent Ambo 2022-12-09 00:31:45 +03:00 committed by clbot
parent d101151fc5
commit 1138fbcaad
2 changed files with 48 additions and 41 deletions

View file

@ -40,8 +40,10 @@ fn nix_eval(expr: &str) -> String {
#[track_caller]
fn compare_eval(expr: &str) {
let nix_result = nix_eval(expr);
let tvix_result = tvix_eval::interpret(expr, None, Default::default())
.unwrap()
let tvix_result = tvix_eval::Evaluation::new(expr, None)
.evaluate()
.value
.expect("tvix evaluation should succeed")
.to_string();
assert_eq!(nix_result.trim(), tvix_result);