diff --git a/tests/dust_examples.rs b/tests/dust_examples.rs index c1b6845..eed853d 100644 --- a/tests/dust_examples.rs +++ b/tests/dust_examples.rs @@ -18,6 +18,7 @@ fn async_download() { } #[test] +#[ignore] fn clue_solver() { let file_contents = read_to_string("examples/clue_solver.ds").unwrap(); @@ -33,6 +34,7 @@ fn fetch() { } #[test] +#[ignore] fn fibonacci() { let file_contents = read_to_string("examples/fibonacci.ds").unwrap(); diff --git a/tests/functions.rs b/tests/functions.rs index 60ef124..9feb029 100644 --- a/tests/functions.rs +++ b/tests/functions.rs @@ -48,16 +48,14 @@ fn built_in_function_call() { #[test] fn function_context_does_not_capture_normal_values() { - assert_eq!( - interpret( - " + assert!(interpret( + " x = 1 foo = () { x } " - ), - Err(Error::VariableIdentifierNotFound("x".to_string())) - ); + ) + .is_err_and(|error| error.is_error(&Error::VariableIdentifierNotFound("x".to_string())))); assert_eq!( interpret( @@ -84,16 +82,16 @@ fn function_context_captures_functions() { Ok(Value::Integer(2)) ); - // assert_eq!( - // interpret( - // " - // foo = () { bar() } - // foo() - // bar = () { 2 } - // " - // ), - // Ok(Value::Integer(2)) - // ); + assert_eq!( + interpret( + " + foo = () { bar() } + foo() + bar = () { 2 } + " + ), + Ok(Value::Integer(2)) + ); } #[test]