1
0

Revise tests

This commit is contained in:
Jeff 2024-01-23 14:06:58 -05:00
parent 4e61c6dd6e
commit 8224f7fe3c
2 changed files with 16 additions and 16 deletions

View File

@ -18,6 +18,7 @@ fn async_download() {
} }
#[test] #[test]
#[ignore]
fn clue_solver() { fn clue_solver() {
let file_contents = read_to_string("examples/clue_solver.ds").unwrap(); let file_contents = read_to_string("examples/clue_solver.ds").unwrap();
@ -33,6 +34,7 @@ fn fetch() {
} }
#[test] #[test]
#[ignore]
fn fibonacci() { fn fibonacci() {
let file_contents = read_to_string("examples/fibonacci.ds").unwrap(); let file_contents = read_to_string("examples/fibonacci.ds").unwrap();

View File

@ -48,16 +48,14 @@ fn built_in_function_call() {
#[test] #[test]
fn function_context_does_not_capture_normal_values() { fn function_context_does_not_capture_normal_values() {
assert_eq!( assert!(interpret(
interpret(
" "
x = 1 x = 1
foo = () <any> { x } foo = () <any> { x }
" "
), )
Err(Error::VariableIdentifierNotFound("x".to_string())) .is_err_and(|error| error.is_error(&Error::VariableIdentifierNotFound("x".to_string()))));
);
assert_eq!( assert_eq!(
interpret( interpret(
@ -84,16 +82,16 @@ fn function_context_captures_functions() {
Ok(Value::Integer(2)) Ok(Value::Integer(2))
); );
// assert_eq!( assert_eq!(
// interpret( interpret(
// " "
// foo = () <int> { bar() } foo = () <int> { bar() }
// foo() foo()
// bar = () <int> { 2 } bar = () <int> { 2 }
// " "
// ), ),
// Ok(Value::Integer(2)) Ok(Value::Integer(2))
// ); );
} }
#[test] #[test]