Use Result in test

This commit is contained in:
greg 2018-08-14 21:46:48 -07:00
parent 6825de3916
commit 6d18f80185

View File

@ -395,7 +395,7 @@ mod eval_tests {
let symbol_table = Rc::new(RefCell::new(SymbolTable::new())); let symbol_table = Rc::new(RefCell::new(SymbolTable::new()));
let mut state = State::new(symbol_table); let mut state = State::new(symbol_table);
let ast = parse(tokenize($string)).0.unwrap(); let ast = parse(tokenize($string)).0.unwrap();
state.symbol_table_handle.borrow_mut().add_top_level_symbols(&ast); state.symbol_table_handle.borrow_mut().add_top_level_symbols(&ast).unwrap();
let reduced = ast.reduce(&state.symbol_table_handle.borrow()); let reduced = ast.reduce(&state.symbol_table_handle.borrow());
let all_output = state.evaluate(reduced, true); let all_output = state.evaluate(reduced, true);
all_output all_output