mirror of
https://github.com/MorizzG/rlox.git
synced 2025-12-06 04:12:42 +00:00
1263 lines
26 KiB
Rust
1263 lines
26 KiB
Rust
mod common;
|
|
|
|
use common::run_test;
|
|
|
|
#[test]
|
|
fn test_lox_assignment_associativity() {
|
|
run_test("tests/lox/assignment/associativity.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_assignment_global() {
|
|
run_test("tests/lox/assignment/global.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_assignment_grouping() {
|
|
run_test("tests/lox/assignment/grouping.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_assignment_infix_operator() {
|
|
run_test("tests/lox/assignment/infix_operator.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_assignment_local() {
|
|
run_test("tests/lox/assignment/local.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_assignment_prefix_operator() {
|
|
run_test("tests/lox/assignment/prefix_operator.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_assignment_syntax() {
|
|
run_test("tests/lox/assignment/syntax.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_assignment_to_this() {
|
|
run_test("tests/lox/assignment/to_this.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_assignment_undefined() {
|
|
run_test("tests/lox/assignment/undefined.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_block_empty() {
|
|
run_test("tests/lox/block/empty.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_block_scope() {
|
|
run_test("tests/lox/block/scope.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_bool_equality() {
|
|
run_test("tests/lox/bool/equality.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_bool_not() {
|
|
run_test("tests/lox/bool/not.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_break_for() {
|
|
run_test("tests/lox/break/for.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_break_outside_loop() {
|
|
run_test("tests/lox/break/outside_loop.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_break_while() {
|
|
run_test("tests/lox/break/while.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_call_bool() {
|
|
run_test("tests/lox/call/bool.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_call_nil() {
|
|
run_test("tests/lox/call/nil.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_call_num() {
|
|
run_test("tests/lox/call/num.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_call_object() {
|
|
run_test("tests/lox/call/object.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_call_string() {
|
|
run_test("tests/lox/call/string.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_class_empty() {
|
|
run_test("tests/lox/class/empty.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_class_inherit_self() {
|
|
run_test("tests/lox/class/inherit_self.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_class_inherited_method() {
|
|
run_test("tests/lox/class/inherited_method.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_class_local_inherit_other() {
|
|
run_test("tests/lox/class/local_inherit_other.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_class_local_inherit_self() {
|
|
run_test("tests/lox/class/local_inherit_self.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_class_local_reference_self() {
|
|
run_test("tests/lox/class/local_reference_self.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_class_reference_self() {
|
|
run_test("tests/lox/class/reference_self.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_closure_assign_to_closure() {
|
|
run_test("tests/lox/closure/assign_to_closure.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_closure_assign_to_shadowed_later() {
|
|
run_test("tests/lox/closure/assign_to_shadowed_later.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_closure_close_over_function_parameter() {
|
|
run_test("tests/lox/closure/close_over_function_parameter.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_closure_close_over_later_variable() {
|
|
run_test("tests/lox/closure/close_over_later_variable.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_closure_close_over_method_parameter() {
|
|
run_test("tests/lox/closure/close_over_method_parameter.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_closure_closed_closure_in_function() {
|
|
run_test("tests/lox/closure/closed_closure_in_function.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_closure_nested_closure() {
|
|
run_test("tests/lox/closure/nested_closure.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_closure_open_closure_in_function() {
|
|
run_test("tests/lox/closure/open_closure_in_function.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_closure_reference_closure_multiple_times() {
|
|
run_test("tests/lox/closure/reference_closure_multiple_times.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_closure_reuse_closure_slot() {
|
|
run_test("tests/lox/closure/reuse_closure_slot.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_closure_shadow_closure_with_local() {
|
|
run_test("tests/lox/closure/shadow_closure_with_local.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_closure_unused_closure() {
|
|
run_test("tests/lox/closure/unused_closure.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_closure_unused_later_closure() {
|
|
run_test("tests/lox/closure/unused_later_closure.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_comments_line_at_eof() {
|
|
run_test("tests/lox/comments/line_at_eof.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_comments_only_line_comment() {
|
|
run_test("tests/lox/comments/only_line_comment.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_comments_only_line_comment_and_line() {
|
|
run_test("tests/lox/comments/only_line_comment_and_line.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_comments_unicode() {
|
|
run_test("tests/lox/comments/unicode.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_constructor_arguments() {
|
|
run_test("tests/lox/constructor/arguments.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_constructor_call_init_early_return() {
|
|
run_test("tests/lox/constructor/call_init_early_return.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_constructor_call_init_explicitly() {
|
|
run_test("tests/lox/constructor/call_init_explicitly.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_constructor_default() {
|
|
run_test("tests/lox/constructor/default.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_constructor_default_arguments() {
|
|
run_test("tests/lox/constructor/default_arguments.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_constructor_early_return() {
|
|
run_test("tests/lox/constructor/early_return.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_constructor_extra_arguments() {
|
|
run_test("tests/lox/constructor/extra_arguments.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_constructor_init_not_method() {
|
|
run_test("tests/lox/constructor/init_not_method.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_constructor_missing_arguments() {
|
|
run_test("tests/lox/constructor/missing_arguments.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_constructor_return_in_nested_function() {
|
|
run_test("tests/lox/constructor/return_in_nested_function.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_constructor_return_value() {
|
|
run_test("tests/lox/constructor/return_value.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_continue_for() {
|
|
run_test("tests/lox/continue/for.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_continue_outside_loop() {
|
|
run_test("tests/lox/continue/outside_loop.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_continue_while() {
|
|
run_test("tests/lox/continue/while.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_empty_file() {
|
|
run_test("tests/lox/empty_file.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_field_call_function_field() {
|
|
run_test("tests/lox/field/call_function_field.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_field_call_nonfunction_field() {
|
|
run_test("tests/lox/field/call_nonfunction_field.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_field_get_and_set_method() {
|
|
run_test("tests/lox/field/get_and_set_method.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_field_get_on_bool() {
|
|
run_test("tests/lox/field/get_on_bool.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_field_get_on_class() {
|
|
run_test("tests/lox/field/get_on_class.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_field_get_on_function() {
|
|
run_test("tests/lox/field/get_on_function.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_field_get_on_nil() {
|
|
run_test("tests/lox/field/get_on_nil.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_field_get_on_num() {
|
|
run_test("tests/lox/field/get_on_num.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_field_get_on_string() {
|
|
run_test("tests/lox/field/get_on_string.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_field_many() {
|
|
run_test("tests/lox/field/many.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_field_method() {
|
|
run_test("tests/lox/field/method.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_field_method_binds_this() {
|
|
run_test("tests/lox/field/method_binds_this.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_field_on_instance() {
|
|
run_test("tests/lox/field/on_instance.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_field_set_evaluation_order() {
|
|
run_test("tests/lox/field/set_evaluation_order.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_field_set_on_bool() {
|
|
run_test("tests/lox/field/set_on_bool.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_field_set_on_class() {
|
|
run_test("tests/lox/field/set_on_class.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_field_set_on_function() {
|
|
run_test("tests/lox/field/set_on_function.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_field_set_on_nil() {
|
|
run_test("tests/lox/field/set_on_nil.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_field_set_on_num() {
|
|
run_test("tests/lox/field/set_on_num.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_field_set_on_string() {
|
|
run_test("tests/lox/field/set_on_string.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_field_undefined() {
|
|
run_test("tests/lox/field/undefined.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_for_class_in_body() {
|
|
run_test("tests/lox/for/class_in_body.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_for_closure_in_body() {
|
|
run_test("tests/lox/for/closure_in_body.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_for_fun_in_body() {
|
|
run_test("tests/lox/for/fun_in_body.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_for_return_closure() {
|
|
run_test("tests/lox/for/return_closure.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_for_return_inside() {
|
|
run_test("tests/lox/for/return_inside.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_for_scope() {
|
|
run_test("tests/lox/for/scope.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_for_statement_condition() {
|
|
run_test("tests/lox/for/statement_condition.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_for_statement_increment() {
|
|
run_test("tests/lox/for/statement_increment.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_for_statement_initializer() {
|
|
run_test("tests/lox/for/statement_initializer.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_for_syntax() {
|
|
run_test("tests/lox/for/syntax.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_for_var_in_body() {
|
|
run_test("tests/lox/for/var_in_body.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_function_body_must_be_block() {
|
|
run_test("tests/lox/function/body_must_be_block.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_function_empty_body() {
|
|
run_test("tests/lox/function/empty_body.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_function_extra_arguments() {
|
|
run_test("tests/lox/function/extra_arguments.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_function_local_mutual_recursion() {
|
|
run_test("tests/lox/function/local_mutual_recursion.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_function_local_recursion() {
|
|
run_test("tests/lox/function/local_recursion.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_function_missing_arguments() {
|
|
run_test("tests/lox/function/missing_arguments.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_function_missing_comma_in_parameters() {
|
|
run_test("tests/lox/function/missing_comma_in_parameters.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_function_mutual_recursion() {
|
|
run_test("tests/lox/function/mutual_recursion.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_function_nested_call_with_arguments() {
|
|
run_test("tests/lox/function/nested_call_with_arguments.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_function_parameters() {
|
|
run_test("tests/lox/function/parameters.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_function_print() {
|
|
run_test("tests/lox/function/print.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_function_recursion() {
|
|
run_test("tests/lox/function/recursion.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_function_too_many_arguments() {
|
|
run_test("tests/lox/function/too_many_arguments.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_function_too_many_parameters() {
|
|
run_test("tests/lox/function/too_many_parameters.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_if_class_in_else() {
|
|
run_test("tests/lox/if/class_in_else.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_if_class_in_then() {
|
|
run_test("tests/lox/if/class_in_then.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_if_dangling_else() {
|
|
run_test("tests/lox/if/dangling_else.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_if_else() {
|
|
run_test("tests/lox/if/else.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_if_fun_in_else() {
|
|
run_test("tests/lox/if/fun_in_else.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_if_fun_in_then() {
|
|
run_test("tests/lox/if/fun_in_then.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_if_if() {
|
|
run_test("tests/lox/if/if.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_if_truth() {
|
|
run_test("tests/lox/if/truth.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_if_var_in_else() {
|
|
run_test("tests/lox/if/var_in_else.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_if_var_in_then() {
|
|
run_test("tests/lox/if/var_in_then.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_inheritance_constructor() {
|
|
run_test("tests/lox/inheritance/constructor.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_inheritance_inherit_from_function() {
|
|
run_test("tests/lox/inheritance/inherit_from_function.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_inheritance_inherit_from_nil() {
|
|
run_test("tests/lox/inheritance/inherit_from_nil.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_inheritance_inherit_from_number() {
|
|
run_test("tests/lox/inheritance/inherit_from_number.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_inheritance_inherit_methods() {
|
|
run_test("tests/lox/inheritance/inherit_methods.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_inheritance_parenthesized_superclass() {
|
|
run_test("tests/lox/inheritance/parenthesized_superclass.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_inheritance_set_fields_from_base_class() {
|
|
run_test("tests/lox/inheritance/set_fields_from_base_class.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_limit_loop_too_large() {
|
|
run_test("tests/lox/limit/loop_too_large.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_limit_no_reuse_constants() {
|
|
run_test("tests/lox/limit/no_reuse_constants.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_limit_stack_overflow() {
|
|
run_test("tests/lox/limit/stack_overflow.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_limit_too_many_constants() {
|
|
run_test("tests/lox/limit/too_many_constants.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_limit_too_many_locals() {
|
|
run_test("tests/lox/limit/too_many_locals.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_limit_too_many_upvalues() {
|
|
run_test("tests/lox/limit/too_many_upvalues.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_logical_operator_and() {
|
|
run_test("tests/lox/logical_operator/and.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_logical_operator_and_truth() {
|
|
run_test("tests/lox/logical_operator/and_truth.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_logical_operator_or() {
|
|
run_test("tests/lox/logical_operator/or.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_logical_operator_or_truth() {
|
|
run_test("tests/lox/logical_operator/or_truth.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_method_arity() {
|
|
run_test("tests/lox/method/arity.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_method_empty_block() {
|
|
run_test("tests/lox/method/empty_block.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_method_extra_arguments() {
|
|
run_test("tests/lox/method/extra_arguments.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_method_missing_arguments() {
|
|
run_test("tests/lox/method/missing_arguments.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_method_not_found() {
|
|
run_test("tests/lox/method/not_found.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_method_print_bound_method() {
|
|
run_test("tests/lox/method/print_bound_method.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_method_refer_to_name() {
|
|
run_test("tests/lox/method/refer_to_name.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_method_too_many_arguments() {
|
|
run_test("tests/lox/method/too_many_arguments.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_method_too_many_parameters() {
|
|
run_test("tests/lox/method/too_many_parameters.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_nil_literal() {
|
|
run_test("tests/lox/nil/literal.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_number_decimal_point_at_eof() {
|
|
run_test("tests/lox/number/decimal_point_at_eof.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_number_leading_dot() {
|
|
run_test("tests/lox/number/leading_dot.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_number_literals() {
|
|
run_test("tests/lox/number/literals.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_number_nan_equality() {
|
|
run_test("tests/lox/number/nan_equality.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_number_trailing_dot() {
|
|
run_test("tests/lox/number/trailing_dot.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_operator_add() {
|
|
run_test("tests/lox/operator/add.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_operator_add_bool_nil() {
|
|
run_test("tests/lox/operator/add_bool_nil.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_operator_add_bool_num() {
|
|
run_test("tests/lox/operator/add_bool_num.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_operator_add_bool_string() {
|
|
run_test("tests/lox/operator/add_bool_string.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_operator_add_nil_nil() {
|
|
run_test("tests/lox/operator/add_nil_nil.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_operator_add_num_nil() {
|
|
run_test("tests/lox/operator/add_num_nil.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_operator_add_string_nil() {
|
|
run_test("tests/lox/operator/add_string_nil.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_operator_comparison() {
|
|
run_test("tests/lox/operator/comparison.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_operator_divide() {
|
|
run_test("tests/lox/operator/divide.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_operator_divide_nonnum_num() {
|
|
run_test("tests/lox/operator/divide_nonnum_num.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_operator_divide_num_nonnum() {
|
|
run_test("tests/lox/operator/divide_num_nonnum.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_operator_equals() {
|
|
run_test("tests/lox/operator/equals.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_operator_equals_class() {
|
|
run_test("tests/lox/operator/equals_class.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_operator_equals_method() {
|
|
run_test("tests/lox/operator/equals_method.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_operator_greater_nonnum_num() {
|
|
run_test("tests/lox/operator/greater_nonnum_num.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_operator_greater_num_nonnum() {
|
|
run_test("tests/lox/operator/greater_num_nonnum.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_operator_greater_or_equal_nonnum_num() {
|
|
run_test("tests/lox/operator/greater_or_equal_nonnum_num.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_operator_greater_or_equal_num_nonnum() {
|
|
run_test("tests/lox/operator/greater_or_equal_num_nonnum.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_operator_less_nonnum_num() {
|
|
run_test("tests/lox/operator/less_nonnum_num.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_operator_less_num_nonnum() {
|
|
run_test("tests/lox/operator/less_num_nonnum.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_operator_less_or_equal_nonnum_num() {
|
|
run_test("tests/lox/operator/less_or_equal_nonnum_num.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_operator_less_or_equal_num_nonnum() {
|
|
run_test("tests/lox/operator/less_or_equal_num_nonnum.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_operator_multiply() {
|
|
run_test("tests/lox/operator/multiply.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_operator_multiply_nonnum_num() {
|
|
run_test("tests/lox/operator/multiply_nonnum_num.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_operator_multiply_num_nonnum() {
|
|
run_test("tests/lox/operator/multiply_num_nonnum.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_operator_negate() {
|
|
run_test("tests/lox/operator/negate.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_operator_negate_nonnum() {
|
|
run_test("tests/lox/operator/negate_nonnum.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_operator_not() {
|
|
run_test("tests/lox/operator/not.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_operator_not_class() {
|
|
run_test("tests/lox/operator/not_class.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_operator_not_equals() {
|
|
run_test("tests/lox/operator/not_equals.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_operator_subtract() {
|
|
run_test("tests/lox/operator/subtract.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_operator_subtract_nonnum_num() {
|
|
run_test("tests/lox/operator/subtract_nonnum_num.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_operator_subtract_num_nonnum() {
|
|
run_test("tests/lox/operator/subtract_num_nonnum.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_precedence() {
|
|
run_test("tests/lox/precedence.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_print_missing_argument() {
|
|
run_test("tests/lox/print/missing_argument.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_regression_40() {
|
|
run_test("tests/lox/regression/40.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_regression_394() {
|
|
run_test("tests/lox/regression/394.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_return_after_else() {
|
|
run_test("tests/lox/return/after_else.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_return_after_if() {
|
|
run_test("tests/lox/return/after_if.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_return_after_while() {
|
|
run_test("tests/lox/return/after_while.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_return_at_top_level() {
|
|
run_test("tests/lox/return/at_top_level.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_return_in_function() {
|
|
run_test("tests/lox/return/in_function.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_return_in_method() {
|
|
run_test("tests/lox/return/in_method.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_return_return_nil_if_no_value() {
|
|
run_test("tests/lox/return/return_nil_if_no_value.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_string_error_after_multiline() {
|
|
run_test("tests/lox/string/error_after_multiline.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_string_literals() {
|
|
run_test("tests/lox/string/literals.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_string_multiline() {
|
|
run_test("tests/lox/string/multiline.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_string_unterminated() {
|
|
run_test("tests/lox/string/unterminated.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_super_bound_method() {
|
|
run_test("tests/lox/super/bound_method.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_super_call_other_method() {
|
|
run_test("tests/lox/super/call_other_method.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_super_call_same_method() {
|
|
run_test("tests/lox/super/call_same_method.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_super_closure() {
|
|
run_test("tests/lox/super/closure.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_super_constructor() {
|
|
run_test("tests/lox/super/constructor.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_super_extra_arguments() {
|
|
run_test("tests/lox/super/extra_arguments.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_super_indirectly_inherited() {
|
|
run_test("tests/lox/super/indirectly_inherited.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_super_missing_arguments() {
|
|
run_test("tests/lox/super/missing_arguments.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_super_no_superclass_bind() {
|
|
run_test("tests/lox/super/no_superclass_bind.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_super_no_superclass_call() {
|
|
run_test("tests/lox/super/no_superclass_call.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_super_no_superclass_method() {
|
|
run_test("tests/lox/super/no_superclass_method.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_super_parenthesized() {
|
|
run_test("tests/lox/super/parenthesized.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_super_reassign_superclass() {
|
|
run_test("tests/lox/super/reassign_superclass.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_super_super_at_top_level() {
|
|
run_test("tests/lox/super/super_at_top_level.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_super_super_in_closure_in_inherited_method() {
|
|
run_test("tests/lox/super/super_in_closure_in_inherited_method.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_super_super_in_inherited_method() {
|
|
run_test("tests/lox/super/super_in_inherited_method.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_super_super_in_top_level_function() {
|
|
run_test("tests/lox/super/super_in_top_level_function.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_super_super_without_dot() {
|
|
run_test("tests/lox/super/super_without_dot.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_super_super_without_name() {
|
|
run_test("tests/lox/super/super_without_name.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_super_this_in_superclass_method() {
|
|
run_test("tests/lox/super/this_in_superclass_method.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_this_closure() {
|
|
run_test("tests/lox/this/closure.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_this_nested_class() {
|
|
run_test("tests/lox/this/nested_class.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_this_nested_closure() {
|
|
run_test("tests/lox/this/nested_closure.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_this_this_at_top_level() {
|
|
run_test("tests/lox/this/this_at_top_level.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_this_this_in_method() {
|
|
run_test("tests/lox/this/this_in_method.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_this_this_in_top_level_function() {
|
|
run_test("tests/lox/this/this_in_top_level_function.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_unexpected_character() {
|
|
run_test("tests/lox/unexpected_character.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_variable_collide_with_parameter() {
|
|
run_test("tests/lox/variable/collide_with_parameter.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_variable_duplicate_local() {
|
|
run_test("tests/lox/variable/duplicate_local.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_variable_duplicate_parameter() {
|
|
run_test("tests/lox/variable/duplicate_parameter.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_variable_early_bound() {
|
|
run_test("tests/lox/variable/early_bound.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_variable_in_middle_of_block() {
|
|
run_test("tests/lox/variable/in_middle_of_block.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_variable_in_nested_block() {
|
|
run_test("tests/lox/variable/in_nested_block.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_variable_local_from_method() {
|
|
run_test("tests/lox/variable/local_from_method.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_variable_redeclare_global() {
|
|
run_test("tests/lox/variable/redeclare_global.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_variable_redefine_global() {
|
|
run_test("tests/lox/variable/redefine_global.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_variable_scope_reuse_in_different_blocks() {
|
|
run_test("tests/lox/variable/scope_reuse_in_different_blocks.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_variable_shadow_and_local() {
|
|
run_test("tests/lox/variable/shadow_and_local.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_variable_shadow_global() {
|
|
run_test("tests/lox/variable/shadow_global.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_variable_shadow_local() {
|
|
run_test("tests/lox/variable/shadow_local.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_variable_undefined_global() {
|
|
run_test("tests/lox/variable/undefined_global.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_variable_undefined_local() {
|
|
run_test("tests/lox/variable/undefined_local.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_variable_uninitialized() {
|
|
run_test("tests/lox/variable/uninitialized.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_variable_unreached_undefined() {
|
|
run_test("tests/lox/variable/unreached_undefined.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_variable_use_false_as_var() {
|
|
run_test("tests/lox/variable/use_false_as_var.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_variable_use_global_in_initializer() {
|
|
run_test("tests/lox/variable/use_global_in_initializer.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_variable_use_local_in_initializer() {
|
|
run_test("tests/lox/variable/use_local_in_initializer.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_variable_use_nil_as_var() {
|
|
run_test("tests/lox/variable/use_nil_as_var.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_variable_use_this_as_var() {
|
|
run_test("tests/lox/variable/use_this_as_var.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_while_class_in_body() {
|
|
run_test("tests/lox/while/class_in_body.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_while_closure_in_body() {
|
|
run_test("tests/lox/while/closure_in_body.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_while_fun_in_body() {
|
|
run_test("tests/lox/while/fun_in_body.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_while_return_closure() {
|
|
run_test("tests/lox/while/return_closure.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_while_return_inside() {
|
|
run_test("tests/lox/while/return_inside.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_while_syntax() {
|
|
run_test("tests/lox/while/syntax.lox");
|
|
}
|
|
|
|
#[test]
|
|
fn test_lox_while_var_in_body() {
|
|
run_test("tests/lox/while/var_in_body.lox");
|
|
}
|