chore: cargo fmt
This commit is contained in:
@@ -7,14 +7,13 @@ use inkwell::context::Context;
|
||||
use ecow::EcoString;
|
||||
use rpds::vector_sync;
|
||||
|
||||
use crate::builtins::env;
|
||||
use crate::compile::compile;
|
||||
use crate::ir::downgrade;
|
||||
use crate::ty::public::*;
|
||||
use crate::ty::common::Const;
|
||||
use crate::jit::JITContext;
|
||||
use crate::ty::common::Const;
|
||||
use crate::ty::public::*;
|
||||
use crate::vm::VM;
|
||||
use crate::builtins::env;
|
||||
|
||||
|
||||
#[inline]
|
||||
fn test_expr(expr: &str, expected: Value) {
|
||||
@@ -23,9 +22,19 @@ fn test_expr(expr: &str, expected: Value) {
|
||||
dbg!(&prog);
|
||||
let ctx = Context::create();
|
||||
let jit = JITContext::new(&ctx);
|
||||
let vm = VM::new(prog.thunks, prog.funcs, prog.symbols.into(), prog.symmap.into(), prog.consts, jit);
|
||||
let vm = VM::new(
|
||||
prog.thunks,
|
||||
prog.funcs,
|
||||
prog.symbols.into(),
|
||||
prog.symmap.into(),
|
||||
prog.consts,
|
||||
jit,
|
||||
);
|
||||
let env = env(&vm);
|
||||
let value = vm.eval(prog.top_level.into_iter(), env).unwrap().to_public(&vm, &mut HashSet::new());
|
||||
let value = vm
|
||||
.eval(prog.top_level.into_iter(), env)
|
||||
.unwrap()
|
||||
.to_public(&vm, &mut HashSet::new());
|
||||
assert_eq!(value, expected);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user