roc/test/snapshots
2025-10-19 20:56:32 -04:00
..
eval Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
expr Merge remote-tracking branch 'base/main' into type_cleanup 2025-10-18 15:41:44 +02:00
file Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
formatting Merge remote-tracking branch 'base/main' into type_cleanup 2025-10-18 15:41:44 +02:00
fuzz_crash Merge remote-tracking branch 'base/main' into type_cleanup 2025-10-18 15:41:44 +02:00
if_then_else Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
issue Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
lambda_capture Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
match_expr Merge remote-tracking branch 'base/main' into type_cleanup 2025-10-18 15:41:44 +02:00
nominal Fix tests 2025-10-19 15:32:31 -04:00
numeric_edge_cases Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
pass Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
platform Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
plume_package Merge remote-tracking branch 'base/main' into type_cleanup 2025-10-18 15:41:44 +02:00
primitive Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
records Merge remote-tracking branch 'base/main' into type_cleanup 2025-10-18 15:41:44 +02:00
repl Fix last compile issues 2025-10-02 21:00:46 -04:00
some_folder Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
statement Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
type_checking Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
type_module Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
where_clause Merge remote-tracking branch 'base/main' into type_cleanup 2025-10-18 15:41:44 +02:00
001.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
add_var_with_spaces.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
annotations.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
app_header__nonempty_multiline.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
app_header__nonempty_multiline__commented.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
app_header__nonempty_multiline__trailing_comma.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
app_header__platform_not_first.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
app_header_nonempty_singleline.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
binop_omnibus__single__no_spaces.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
binop_omnibus__singleline.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
binops.md Merge remote-tracking branch 'base/main' into type_cleanup 2025-10-18 15:41:44 +02:00
bool_closure_type_check.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
bound_type_var_no_annotation.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
can_basic_scoping.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
can_dot_access.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
can_dot_access_with_vars.md Merge remote-tracking branch 'base/main' into type_cleanup 2025-10-18 15:41:44 +02:00
can_frac_literal.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
can_hex_integer.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
can_import_comprehensive.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
can_import_exposing_types.md Merge remote-tracking branch 'base/main' into type_cleanup 2025-10-18 15:41:44 +02:00
can_import_json.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
can_import_nested_modules.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
can_import_type_annotations.md Merge remote-tracking branch 'base/main' into type_cleanup 2025-10-18 15:41:44 +02:00
can_import_unresolved_qualified.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
can_import_with_alias.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
can_list_first_concrete.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
can_list_heterogeneous.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
can_list_mismatch_then_nested_error.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
can_list_multiline_mismatch.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
can_list_nested_heterogeneous.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
can_list_number_doesnt_fit.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
can_list_rest_types.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
can_list_triple_nested_heterogeneous.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
can_list_two_elements.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
can_nested_heterogeneous_lists.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
can_two_decls.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
can_var_scoping_invalid_top_level.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
can_var_scoping_regular_var.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
can_var_scoping_var_idents.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
can_var_scoping_var_redeclaration.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
crash_and_ellipsis_test.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
def_simple_with_annotation.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
default_app_no_main.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
default_app_wrong_arity.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
effectful_with_effectful_annotation.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
exposed_items_test.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
expr_ident_simple.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
expr_if_missing_else.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
expr_int_invalid.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
expr_int_negative.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
expr_int_simple.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
expr_no_space_dot_int.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
external_decl_lookup.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
external_lookup_expr.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
fib_module.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
file_multiple_type_decls.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
function_no_annotation.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
header_expected_open_bracket.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
hello_world.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
hello_world.roc
hello_world_with_block.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
import_exposing_alias.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
import_exposing_basic.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
lambda_annotation_mismatch_error.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
lambda_currying_constraint.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
lambda_in_collection.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
lambda_multi_arg_mismatch.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
lambda_parameter_unused.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
lambda_ret_constraint_bug.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
let_polymorphism_complex.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
let_polymorphism_error.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
let_polymorphism_expr.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
let_polymorphism_lists.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
let_polymorphism_numbers.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
let_polymorphism_records.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
module_empty.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
module_multiline_with_comments.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
module_nonempty_single.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
module_singleline_fmts_to_multiline.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
multi_qualified_import.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
multiline_binop_1.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
multiline_list_formatting_5.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
multiline_list_formatting_7.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
multiline_list_formatting_11.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
multiline_list_formatting_14.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
multiline_string_complex.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
multiline_string_expr.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
nested_ifs.md remove CAN and TYPES from REPL snapshots 2025-08-15 11:27:44 +10:00
nominal_type_origin_mismatch.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
numbers.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
package_empty.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
package_header_nonempty_multiline_1.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
package_header_nonempty_multiline_3.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
package_header_nonempty_multiline_4.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
package_header_nonempty_multiline_6.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
package_header_nonempty_singleline_1.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
pattern_f64_overflow.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
pure_annotation_effectful_body_error.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
pure_with_pure_annotation.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
qualified_tag.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
qualified_type_canonicalization.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
qualified_with_anno.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
README.md
record_access_multiline_formatting_1.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
record_access_multiline_formatting_4.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
rigid_var_instantiation.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
rigid_var_no_instantiation_error.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
simple_external_lookup.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
simple_lambda_constraint_success.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
simple_module_no_blanks.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
statement_annotations.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
static_dispatch_super_test.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
string.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
string_multiline_formatting_(due_to_templating_not_multiline_string_literal)_1.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
string_multiline_formatting_(due_to_templating_not_multiline_string_literal)_3.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
string_unicode_emoji.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
syntax_grab_bag.md Merge remote-tracking branch 'base/main' into type_cleanup 2025-10-18 15:41:44 +02:00
test_exact_pattern_crash.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
test_headerless_main.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
test_instantiated_arg_mismatch.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
test_instantiated_return_crash.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
test_instantiation_arity_mismatch.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
test_nested_instantiation_crash.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
test_tuple_instantiation_crash.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
type_alias_decl.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
type_alias_parameterized.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
type_alias_simple.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
type_alias_tag_union.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
type_anno_connection.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
type_annotation_basic.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
type_annotation_missing_parens.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
type_annotations.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
type_app_complex_nested.md Merge remote-tracking branch 'base/main' into type_cleanup 2025-10-18 15:41:44 +02:00
type_app_multiple_args.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
type_app_nested.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
type_app_single_arg.md Merge remote-tracking branch 'base/main' into type_cleanup 2025-10-18 15:41:44 +02:00
type_app_with_vars.md Merge remote-tracking branch 'base/main' into type_cleanup 2025-10-18 15:41:44 +02:00
type_application_basic.md Merge remote-tracking branch 'base/main' into type_cleanup 2025-10-18 15:41:44 +02:00
type_builtin.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
type_comprehensive_scope.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
type_declarations.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
type_function_basic.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
type_function_effectful.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
type_function_multi_arg.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
type_function_simple.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
type_higher_order_multiple_vars.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
type_local_scope_vars.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
type_multiple_aliases.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
type_record_basic.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
type_record_effectful.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
type_record_simple.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
type_record_with_vars.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
type_redeclaration_same_scope.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
type_same_var_multiple_uses.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
type_scope_integration.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
type_shadowing_across_scopes.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
type_simple_pure.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
type_simple_type_var.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
type_tag_union_basic.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
type_tag_union_complex.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
type_two_variables.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
type_undeclared_usage.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
type_var_annotation_body_connection.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
type_var_basic.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
type_var_collision_simple.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
type_var_multiple.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
type_var_name_avoids_collision.md Merge remote-tracking branch 'base/main' into type_cleanup 2025-10-18 15:41:44 +02:00
type_var_namespace.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
type_var_nested.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
type_var_shadowing.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
type_var_shadowing_inner.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
type_var_underscore_conventions.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
unary_minus_double_negative.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
unary_minus_lambda_parameter.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
unicode_single_quotes.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
unused_vars_block.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
unused_vars_simple.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00

Snapshots

Snapshot tests that validate compiler behavior by capturing the output of each compilation stage for specific Roc code examples.

Snapshot tests provide comprehensive validation of the compilation pipeline by showing how source code is transformed through each stage: tokenization, parsing, canonicalization, and type checking etc.

Each snapshot file contains the expected output and helps us to detect regressions when compiler behavior changes unexpectedly.

Usage

  • Generate all snapshots: zig build snapshot
  • Update specific snapshot: zig build snapshot -- <file_path>
  • Update expected from problems: zig build update-expected -- <file_path>
  • Debug REPL evaluation with trace: zig build snapshot -- <repl_snapshot.md> --trace-eval

Trace Debugging

The --trace-eval flag enables detailed interpreter tracing for debugging REPL snapshots:

# Debug build (trace support enabled by default)
zig build snapshot -- src/snapshots/repl/repl_record_field_access.md --trace-eval

Requirements:

  • Only works with REPL snapshots (type=repl)
  • Can only be used with a single snapshot file
  • Trace output is automatically enabled in debug builds
  • For release builds, use -Dtrace-eval=true to enable tracing