roc/test/snapshots
2025-11-27 22:19:41 -05:00
..
comprehensive More fixes 2025-11-25 23:02:15 -05:00
eval More fixes 2025-11-26 23:02:00 -05:00
expr More fixes 2025-11-26 23:02:00 -05:00
file More fixes 2025-11-26 23:02:00 -05:00
formatting More fixes 2025-11-26 23:02:00 -05:00
fuzz_crash Update snapshots 2025-11-26 23:51:03 -05:00
if_then_else Improve MISSING METHOD formatting 2025-11-25 23:34:54 -05:00
issue Merge remote-tracking branch 'origin/main' into propagate_is_eq 2025-11-26 13:29:54 -05:00
lambda_capture Update snapshots 2025-11-25 10:05:41 -05:00
match_expr More fixes 2025-11-26 23:02:00 -05:00
nominal More fixes 2025-11-26 23:02:00 -05:00
numeric_edge_cases Merge origin/main 2025-11-23 09:20:48 -05:00
pass More fixes 2025-11-26 23:02:00 -05:00
platform More fixes 2025-11-26 23:02:00 -05:00
plume_package plum update, fix snapshot_tool_test: integer overflow 2025-11-27 14:29:59 +01:00
primitive Fix MODULE NOT FOUND regression 2025-11-26 07:52:25 -05:00
records More fixes 2025-11-26 22:42:17 -05:00
repl Render records in snapshots 2025-11-27 22:19:41 -05:00
some_folder Fix regression in checking module type 2025-11-18 07:56:25 -05:00
statement Fixes after rebase 2025-11-27 00:13:15 -05:00
static_dispatch More fixes 2025-11-26 23:02:00 -05:00
todo_cross_module_calls
type_checking More fixes 2025-11-26 23:02:00 -05:00
type_module Merge origin/main 2025-11-23 09:20:48 -05:00
where_clause More fixes 2025-11-26 23:02:00 -05:00
001.md
add_var_with_spaces.md Fix parallel execution 2025-11-17 16:48:50 -05:00
annotations.md More fixes 2025-11-26 23:02:00 -05:00
app_header__nonempty_multiline.md
app_header__nonempty_multiline__commented.md
app_header__nonempty_multiline__trailing_comma.md
app_header__platform_not_first.md
app_header_nonempty_singleline.md
binop_omnibus__single__no_spaces.md Improve MISSING METHOD formatting 2025-11-25 23:34:54 -05:00
binop_omnibus__singleline.md Merge origin/main 2025-11-22 15:45:17 -05:00
binops.md More fixes 2025-11-26 23:02:00 -05:00
bool_closure_type_check.md
bool_equality.md Merge remote-tracking branch 'origin/main' into propagate_is_eq 2025-11-25 11:06:10 -05:00
bound_type_var_no_annotation.md More fixes 2025-11-26 22:42:17 -05:00
can_basic_scoping.md Update snapshots 2025-11-25 10:05:41 -05:00
can_dot_access.md
can_dot_access_with_vars.md Merge origin/main 2025-11-23 09:20:48 -05:00
can_frac_literal.md Merge origin/main 2025-11-23 09:20:48 -05:00
can_hex_integer.md Merge origin/main 2025-11-23 09:20:48 -05:00
can_import_comprehensive.md Fix MODULE NOT FOUND regression 2025-11-26 07:52:25 -05:00
can_import_exposing_types.md More fixes 2025-11-26 23:02:00 -05:00
can_import_json.md Fix MODULE NOT FOUND regression 2025-11-26 07:52:25 -05:00
can_import_nested_modules.md More fixes 2025-11-26 23:02:00 -05:00
can_import_type_annotations.md More fixes 2025-11-26 23:02:00 -05:00
can_import_unresolved_qualified.md Fix MODULE NOT FOUND regression 2025-11-26 07:52:25 -05:00
can_import_with_alias.md Fix MODULE NOT FOUND regression 2025-11-26 07:52:25 -05:00
can_list_first_concrete.md Improve MISSING METHOD formatting 2025-11-25 23:34:54 -05:00
can_list_heterogeneous.md Improve MISSING METHOD formatting 2025-11-25 23:34:54 -05:00
can_list_mismatch_then_nested_error.md Improve MISSING METHOD formatting 2025-11-25 23:34:54 -05:00
can_list_multiline_mismatch.md Improve MISSING METHOD formatting 2025-11-25 23:34:54 -05:00
can_list_nested_heterogeneous.md Improve MISSING METHOD formatting 2025-11-25 23:34:54 -05:00
can_list_number_doesnt_fit.md More fixes 2025-11-26 22:42:17 -05:00
can_list_rest_types.md
can_list_triple_nested_heterogeneous.md Improve MISSING METHOD formatting 2025-11-25 23:34:54 -05:00
can_list_two_elements.md Improve MISSING METHOD formatting 2025-11-25 23:34:54 -05:00
can_nested_heterogeneous_lists.md Improve MISSING METHOD formatting 2025-11-25 23:34:54 -05:00
can_two_decls.md Merge origin/main 2025-11-23 09:20:48 -05:00
can_var_scoping_invalid_top_level.md Merge origin/main 2025-11-23 09:20:48 -05:00
can_var_scoping_regular_var.md Update snapshots 2025-11-25 10:05:41 -05:00
can_var_scoping_var_idents.md Merge origin/main 2025-11-23 09:20:48 -05:00
can_var_scoping_var_redeclaration.md Merge origin/main 2025-11-23 09:20:48 -05:00
crash_and_ellipsis_test.md More fixes 2025-11-26 22:42:17 -05:00
def_simple_with_annotation.md More fixes 2025-11-26 23:02:00 -05:00
default_app_no_main.md Merge origin/main 2025-11-23 09:20:48 -05:00
default_app_wrong_arity.md Fix regression in checking module type 2025-11-18 07:56:25 -05:00
effectful_with_effectful_annotation.md More fixes 2025-11-26 23:02:00 -05:00
exposed_items_test.md Fix MODULE NOT FOUND regression 2025-11-26 07:52:25 -05:00
expr_ident_simple.md
expr_if_missing_else.md Improve MISSING METHOD formatting 2025-11-25 23:34:54 -05:00
expr_int_invalid.md
expr_int_negative.md Merge origin/main 2025-11-23 09:20:48 -05:00
expr_int_simple.md Merge origin/main 2025-11-23 09:20:48 -05:00
expr_no_space_dot_int.md
external_decl_lookup.md Fix MODULE NOT FOUND regression 2025-11-26 07:52:25 -05:00
external_lookup_expr.md
fib_module.md Remove is_ne 2025-11-23 23:47:56 -05:00
file_multiple_type_decls.md
function_no_annotation.md Fix MODULE NOT FOUND regression 2025-11-26 07:52:25 -05:00
header_expected_open_bracket.md
hello_world.md Fix MODULE NOT FOUND regression 2025-11-26 07:52:25 -05:00
hello_world.roc
hello_world_with_block.md Fix MODULE NOT FOUND regression 2025-11-26 07:52:25 -05:00
import_exposing_basic.md Fix MODULE NOT FOUND regression 2025-11-26 07:52:25 -05:00
lambda_annotation_mismatch_error.md More fixes 2025-11-26 23:02:00 -05:00
lambda_currying_constraint.md More fixes 2025-11-26 22:42:17 -05:00
lambda_in_collection.md Merge origin/main 2025-11-22 15:45:17 -05:00
lambda_multi_arg_mismatch.md Improve MISSING METHOD formatting 2025-11-25 23:34:54 -05:00
lambda_parameter_unused.md More fixes 2025-11-26 22:42:17 -05:00
lambda_ret_constraint_bug.md More fixes 2025-11-26 22:42:17 -05:00
let_polymorphism_complex.md Merge origin/main 2025-11-23 09:20:48 -05:00
let_polymorphism_error.md Improve MISSING METHOD formatting 2025-11-25 23:34:54 -05:00
let_polymorphism_expr.md Merge origin/main 2025-11-23 09:20:48 -05:00
let_polymorphism_lists.md Merge origin/main 2025-11-23 09:20:48 -05:00
let_polymorphism_numbers.md Merge origin/main 2025-11-23 09:20:48 -05:00
let_polymorphism_records.md Improve MISSING METHOD formatting 2025-11-25 23:34:54 -05:00
module_empty.md
module_multiline_with_comments.md more Result>Try updates (#8382) 2025-11-14 17:10:55 +01:00
module_nonempty_single.md
module_singleline_fmts_to_multiline.md
multi_qualified_import.md More fixes 2025-11-26 23:02:00 -05:00
multiline_binop_1.md Merge origin/main 2025-11-23 09:20:48 -05:00
multiline_list_formatting_5.md Merge origin/main 2025-11-23 09:20:48 -05:00
multiline_list_formatting_7.md Merge origin/main 2025-11-23 09:20:48 -05:00
multiline_list_formatting_11.md Merge origin/main 2025-11-23 09:20:48 -05:00
multiline_list_formatting_14.md Merge origin/main 2025-11-23 09:20:48 -05:00
multiline_string_complex.md free allocated memory after interned 2025-11-28 13:12:48 +11:00
multiline_string_expr.md free allocated memory after interned 2025-11-28 13:12:48 +11:00
nominal_type_origin_mismatch.md More fixes 2025-11-26 23:02:00 -05:00
numbers.md Merge origin/main 2025-11-23 09:20:48 -05:00
package_empty.md
package_header_nonempty_multiline_1.md
package_header_nonempty_multiline_3.md
package_header_nonempty_multiline_4.md
package_header_nonempty_multiline_6.md
package_header_nonempty_singleline_1.md
pattern_f64_overflow.md
pure_annotation_effectful_body_error.md More fixes 2025-11-26 23:02:00 -05:00
pure_with_pure_annotation.md More fixes 2025-11-26 22:42:17 -05:00
qualified_tag.md
qualified_type_canonicalization.md More fixes 2025-11-26 23:02:00 -05:00
qualified_with_anno.md
README.md
record_access_multiline_formatting_1.md
record_access_multiline_formatting_4.md
rigid_var_instantiation.md
rigid_var_no_instantiation_error.md Improve some error messages 2025-11-18 08:04:42 -05:00
simple_external_lookup.md More fixes 2025-11-26 23:02:00 -05:00
simple_lambda_constraint_success.md More fixes 2025-11-26 22:42:17 -05:00
simple_module_no_blanks.md Fix MODULE NOT FOUND regression 2025-11-26 07:52:25 -05:00
statement_annotations.md Update snapshots 2025-11-25 10:05:41 -05:00
static_dispatch_super_test.md
string.md free allocated memory after interned 2025-11-28 13:12:48 +11:00
string_interpolation_type_mismatch.md String interpolation now requires Str 2025-11-26 22:20:16 -05:00
string_multiline_formatting_(due_to_templating_not_multiline_string_literal)_1.md
string_multiline_formatting_(due_to_templating_not_multiline_string_literal)_3.md
string_unicode_emoji.md
syntax_grab_bag.md Update snapshots 2025-11-26 23:51:03 -05:00
test_exact_pattern_crash.md Merge remote-tracking branch 'origin/main' into propagate_is_eq 2025-11-26 13:29:54 -05:00
test_headerless_main.md Merge origin/main 2025-11-23 09:20:48 -05:00
test_instantiated_arg_mismatch.md Improve MISSING METHOD formatting 2025-11-25 23:34:54 -05:00
test_instantiated_return_crash.md More fixes 2025-11-26 23:02:00 -05:00
test_instantiation_arity_mismatch.md Merge remote-tracking branch 'origin/main' into propagate_is_eq 2025-11-26 13:29:54 -05:00
test_nested_instantiation_crash.md More fixes 2025-11-26 23:02:00 -05:00
test_tuple_instantiation_crash.md Merge remote-tracking branch 'origin/main' into propagate_is_eq 2025-11-26 13:29:54 -05:00
try_err_or_lookup.md More is_eq fixes 2025-11-26 14:44:05 -05:00
try_ok_or_lookup.md More is_eq fixes 2025-11-26 14:44:05 -05:00
type_alias_decl.md More fixes 2025-11-26 22:42:17 -05:00
type_alias_parameterized.md Merge remote-tracking branch 'origin/main' into propagate_is_eq 2025-11-26 13:29:54 -05:00
type_alias_simple.md More fixes 2025-11-26 23:02:00 -05:00
type_alias_tag_union.md More fixes 2025-11-26 23:02:00 -05:00
type_anno_connection.md More fixes 2025-11-26 22:42:17 -05:00
type_annotation_basic.md More fixes 2025-11-26 22:42:17 -05:00
type_annotation_missing_parens.md more Result>Try updates (#8382) 2025-11-14 17:10:55 +01:00
type_annotations.md More fixes 2025-11-26 23:02:00 -05:00
type_app_complex_nested.md More fixes 2025-11-26 23:02:00 -05:00
type_app_multiple_args.md More fixes 2025-11-26 23:02:00 -05:00
type_app_nested.md More fixes 2025-11-26 23:02:00 -05:00
type_app_single_arg.md More fixes 2025-11-26 23:02:00 -05:00
type_app_with_vars.md Merge remote-tracking branch 'origin/main' into propagate_is_eq 2025-11-26 13:29:54 -05:00
type_application_basic.md More fixes 2025-11-26 23:02:00 -05:00
type_builtin.md
type_comprehensive_scope.md More fixes 2025-11-26 23:02:00 -05:00
type_declarations.md
type_function_basic.md Fix let polymorphism + out of order dispatch 2025-11-09 09:36:57 -05:00
type_function_effectful.md Fix let polymorphism + out of order dispatch 2025-11-09 09:36:57 -05:00
type_function_multi_arg.md Fix let polymorphism + out of order dispatch 2025-11-09 09:36:57 -05:00
type_function_simple.md Fix let polymorphism + out of order dispatch 2025-11-09 09:36:57 -05:00
type_higher_order_multiple_vars.md Fix let polymorphism + out of order dispatch 2025-11-09 09:36:57 -05:00
type_local_scope_vars.md Update snapshots 2025-11-25 10:05:41 -05:00
type_multiple_aliases.md More fixes 2025-11-26 22:42:17 -05:00
type_record_basic.md More fixes 2025-11-26 23:02:00 -05:00
type_record_effectful.md More fixes 2025-11-26 23:02:00 -05:00
type_record_simple.md More fixes 2025-11-26 23:02:00 -05:00
type_record_with_vars.md
type_redeclaration_same_scope.md
type_same_var_multiple_uses.md
type_scope_integration.md
type_shadowing_across_scopes.md More fixes 2025-11-26 23:02:00 -05:00
type_simple_pure.md More fixes 2025-11-26 23:02:00 -05:00
type_simple_type_var.md
type_tag_union_basic.md More fixes 2025-11-26 23:02:00 -05:00
type_tag_union_complex.md More fixes 2025-11-26 23:02:00 -05:00
type_two_variables.md
type_undeclared_usage.md More fixes 2025-11-26 23:02:00 -05:00
type_var_annotation_body_connection.md
type_var_basic.md
type_var_collision_simple.md Merge origin/main 2025-11-23 09:20:48 -05:00
type_var_mismatch.md More fixes 2025-11-26 23:02:00 -05:00
type_var_multiple.md
type_var_name_avoids_collision.md Merge origin/main 2025-11-23 09:20:48 -05:00
type_var_namespace.md More fixes 2025-11-26 23:02:00 -05:00
type_var_nested.md More fixes 2025-11-26 23:02:00 -05:00
type_var_shadowing.md Update snapshots 2025-11-25 10:05:41 -05:00
type_var_shadowing_inner.md Update snapshots 2025-11-25 10:05:41 -05:00
type_var_underscore_conventions.md More fixes 2025-11-26 23:02:00 -05:00
unary_minus_double_negative.md Merge origin/main 2025-11-22 15:45:17 -05:00
unary_minus_lambda_parameter.md Merge origin/main 2025-11-22 15:45:17 -05:00
unicode_single_quotes.md Change the handling of invalid single quote to improve error messages. (#8370) 2025-11-11 13:42:35 +01:00
unused_vars_block.md Update snapshots 2025-11-25 10:05:41 -05:00
unused_vars_simple.md Merge origin/main 2025-11-23 09:20:48 -05: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