roc/test/snapshots
2025-11-20 16:49:48 -05:00
..
comprehensive Cleanup 2025-11-09 09:59:56 -05:00
eval Merge remote-tracking branch 'origin/fix-fmt' into fold 2025-11-10 23:15:02 -05:00
expr Fix tests 2025-11-16 23:19:01 -05:00
file more Result>Try updates (#8382) 2025-11-14 17:10:55 +01:00
formatting more Result>Try updates (#8382) 2025-11-14 17:10:55 +01:00
fuzz_crash Add if-without-else 2025-11-20 16:49:48 -05:00
if_then_else Fix parallel execution 2025-11-17 16:48:50 -05:00
issue Revise how external nominals work 2025-10-25 11:17:49 -04:00
lambda_capture Cleanup 2025-11-09 09:59:56 -05:00
match_expr Add if-without-else 2025-11-20 16:49:48 -05:00
nominal Fix regression in checking module type 2025-11-18 07:56:25 -05:00
numeric_edge_cases Cleanup 2025-11-09 09:59:56 -05:00
pass Merge remote-tracking branch 'origin/phantom-types' into remove-list-primitive 2025-11-16 23:49:47 -05:00
platform Get more List.get stuff working 2025-11-07 15:48:23 -05:00
plume_package Merge remote-tracking branch 'origin/main' into no-str-primitive 2025-11-18 20:20:22 -05:00
primitive more Result>Try updates (#8382) 2025-11-14 17:10:55 +01:00
records Add if-without-else 2025-11-20 16:49:48 -05:00
repl Revert "Fix some repl tests" 2025-11-02 21:40:59 -05:00
some_folder Fix regression in checking module type 2025-11-18 07:56:25 -05:00
statement Fix some nominal str things 2025-11-16 23:27:48 -05:00
static_dispatch Merge remote-tracking branch 'origin/main' into no-str-primitive 2025-11-18 20:20:22 -05:00
todo_cross_module_calls Disable a test for now 2025-10-24 21:03:22 -04:00
type_checking Revise how external nominals work 2025-10-25 11:17:49 -04:00
type_module Fix regression in checking module type 2025-11-18 07:56:25 -05:00
where_clause more Result>Try updates (#8382) 2025-11-14 17:10:55 +01:00
001.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
add_var_with_spaces.md Fix parallel execution 2025-11-17 16:48:50 -05:00
annotations.md Revise how external nominals work 2025-10-25 11:17:49 -04: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 Fix parallel execution 2025-11-17 16:48:50 -05:00
binop_omnibus__singleline.md Revise how external nominals work 2025-10-25 11:17:49 -04:00
binops.md Cleanup 2025-11-09 09:59:56 -05:00
bool_closure_type_check.md Revise how external nominals work 2025-10-25 11:17:49 -04:00
bound_type_var_no_annotation.md Can & check stmts 2025-10-23 20:21:12 -04:00
can_basic_scoping.md Cleanup 2025-11-09 09:59:56 -05:00
can_dot_access.md Propagate errors correctly in function return types 2025-10-21 18:43:11 -04:00
can_dot_access_with_vars.md Fix some more stuff 2025-11-17 22:35:41 -05:00
can_frac_literal.md Cleanup 2025-11-09 09:59:56 -05:00
can_hex_integer.md Cleanup 2025-11-09 09:59:56 -05:00
can_import_comprehensive.md Fix parallel execution 2025-11-17 16:48:50 -05:00
can_import_exposing_types.md Improve some error messages 2025-11-18 08:04:42 -05:00
can_import_json.md Don't report redundant errors 2025-10-18 18:20:56 -04:00
can_import_nested_modules.md more Result>Try updates (#8382) 2025-11-14 17:10:55 +01:00
can_import_type_annotations.md Fix parallel execution 2025-11-17 16:48:50 -05:00
can_import_unresolved_qualified.md Fix parallel execution 2025-11-17 16:48:50 -05:00
can_import_with_alias.md Fix parallel execution 2025-11-17 16:48:50 -05: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 Fix parallel execution 2025-11-17 16:48:50 -05:00
can_list_nested_heterogeneous.md Fix parallel execution 2025-11-17 16:48:50 -05: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 Fix tests 2025-11-16 23:19:01 -05:00
can_two_decls.md Cleanup 2025-11-09 09:59:56 -05:00
can_var_scoping_invalid_top_level.md Cleanup 2025-11-09 09:59:56 -05: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 Cleanup 2025-11-09 09:59:56 -05:00
can_var_scoping_var_redeclaration.md Cleanup 2025-11-09 09:59:56 -05:00
crash_and_ellipsis_test.md Fix tests 2025-11-16 23:19:01 -05:00
def_simple_with_annotation.md Revise how external nominals work 2025-10-25 11:17:49 -04:00
default_app_no_main.md Fix regression in checking module type 2025-11-18 07:56:25 -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 Fix parallel execution 2025-11-17 16:48:50 -05:00
exposed_items_test.md Cleanup 2025-11-09 09:59:56 -05: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 Add if-without-else 2025-11-20 16:49:48 -05: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 Cleanup 2025-11-09 09:59:56 -05:00
expr_int_simple.md Cleanup 2025-11-09 09:59:56 -05: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 Propagate errors correctly in function return types 2025-10-21 18:43:11 -04:00
external_lookup_expr.md Fix an error message regression 2025-10-30 18:47:48 -04:00
fib_module.md Cleanup 2025-11-09 09:59:56 -05:00
file_multiple_type_decls.md Revise how external nominals work 2025-10-25 11:17:49 -04:00
function_no_annotation.md Cleanup 2025-11-09 09:59:56 -05: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 Propagate errors correctly in function return types 2025-10-21 18:43:11 -04:00
hello_world.roc move snapshots into test/, the tool into a sub-dir 2025-08-12 17:10:31 +10:00
hello_world_with_block.md Propagate errors correctly in function return types 2025-10-21 18:43:11 -04:00
import_exposing_alias.md Propagate errors correctly in function return types 2025-10-21 18:43:11 -04:00
import_exposing_basic.md Fix parallel execution 2025-11-17 16:48:50 -05:00
lambda_annotation_mismatch_error.md Fix some nominal str things 2025-11-16 23:27:48 -05:00
lambda_currying_constraint.md Fix let polymorphism + out of order dispatch 2025-11-09 09:36:57 -05:00
lambda_in_collection.md Cleanup 2025-11-09 09:59:56 -05:00
lambda_multi_arg_mismatch.md Update snapshots 2025-11-17 19:00:13 -05:00
lambda_parameter_unused.md Can & check stmts 2025-10-23 20:21:12 -04:00
lambda_ret_constraint_bug.md Infer static dispatch types in check 2025-10-21 08:48:30 -04:00
let_polymorphism_complex.md Fix tests 2025-11-16 23:19:01 -05: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 Fix tests 2025-11-16 23:19:01 -05:00
let_polymorphism_lists.md Fix snapshots 2025-11-17 10:27:09 -05:00
let_polymorphism_numbers.md Cleanup 2025-11-09 09:59:56 -05:00
let_polymorphism_records.md Fix tests 2025-11-16 23:19:01 -05: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 more Result>Try updates (#8382) 2025-11-14 17:10:55 +01: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 Fix an error message regression 2025-10-30 18:47:48 -04:00
multiline_binop_1.md Cleanup 2025-11-09 09:59:56 -05:00
multiline_list_formatting_5.md Cleanup 2025-11-09 09:59:56 -05:00
multiline_list_formatting_7.md Cleanup 2025-11-09 09:59:56 -05:00
multiline_list_formatting_11.md Cleanup 2025-11-09 09:59:56 -05:00
multiline_list_formatting_14.md Cleanup 2025-11-09 09:59:56 -05:00
multiline_string_complex.md More fixes 2025-10-24 20:51:13 -04:00
multiline_string_expr.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
nominal_type_origin_mismatch.md Revise how external nominals work 2025-10-25 11:17:49 -04:00
numbers.md Cleanup 2025-11-09 09:59:56 -05: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 Revise how external nominals work 2025-10-25 11:17:49 -04:00
pure_with_pure_annotation.md Infer static dispatch types in check 2025-10-21 08:48:30 -04:00
qualified_tag.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
qualified_type_canonicalization.md more Result>Try updates (#8382) 2025-11-14 17:10:55 +01:00
qualified_with_anno.md Infer static dispatch types in check 2025-10-21 08:48:30 -04:00
README.md move snapshots into test/, the tool into a sub-dir 2025-08-12 17:10:31 +10:00
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 Infer static dispatch types in check 2025-10-21 08:48:30 -04:00
rigid_var_no_instantiation_error.md Improve some error messages 2025-11-18 08:04:42 -05:00
simple_external_lookup.md Fix snapshots 2025-11-17 10:27:09 -05:00
simple_lambda_constraint_success.md Infer static dispatch types in check 2025-10-21 08:48:30 -04:00
simple_module_no_blanks.md Propagate errors correctly in function return types 2025-10-21 18:43:11 -04:00
statement_annotations.md Fix record regression & add back ext vars 2025-11-09 09:41:14 -05:00
static_dispatch_super_test.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
string.md Fix source location 2025-10-30 11:19:56 -04:00
string_multiline_formatting_(due_to_templating_not_multiline_string_literal)_1.md Propagate errors correctly in function return types 2025-10-21 18:43:11 -04:00
string_multiline_formatting_(due_to_templating_not_multiline_string_literal)_3.md Propagate errors correctly in function return types 2025-10-21 18:43:11 -04: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 Fix some nominal str things 2025-11-16 23:27:48 -05:00
test_exact_pattern_crash.md Fix let polymorphism + out of order dispatch 2025-11-09 09:36:57 -05:00
test_headerless_main.md Cleanup 2025-11-09 09:59:56 -05: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 Revise how external nominals work 2025-10-25 11:17:49 -04: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 Fix record regression & add back ext vars 2025-11-09 09:41:14 -05:00
test_tuple_instantiation_crash.md Infer static dispatch types in check 2025-10-21 08:48:30 -04:00
try_err_or_lookup.md Test nested ZSTs 2025-11-17 11:35:38 -05:00
try_ok_or_lookup.md Test nested ZSTs 2025-11-17 11:35:38 -05:00
type_alias_decl.md more Result>Try updates (#8382) 2025-11-14 17:10:55 +01:00
type_alias_parameterized.md Update snapshots 2025-11-17 19:00:13 -05:00
type_alias_simple.md Revise how external nominals work 2025-10-25 11:17:49 -04:00
type_alias_tag_union.md more Result>Try updates (#8382) 2025-11-14 17:10:55 +01:00
type_anno_connection.md Infer static dispatch types in check 2025-10-21 08:48:30 -04:00
type_annotation_basic.md Update snapshots 2025-11-17 19:00:13 -05:00
type_annotation_missing_parens.md more Result>Try updates (#8382) 2025-11-14 17:10:55 +01:00
type_annotations.md more Result>Try updates (#8382) 2025-11-14 17:10:55 +01:00
type_app_complex_nested.md Fix some more stuff 2025-11-17 22:35:41 -05:00
type_app_multiple_args.md Improve some error messages 2025-11-18 08:04:42 -05:00
type_app_nested.md Fix some more stuff 2025-11-17 22:35:41 -05:00
type_app_single_arg.md Fix some more stuff 2025-11-17 22:35:41 -05:00
type_app_with_vars.md Fix some more stuff 2025-11-17 22:35:41 -05:00
type_application_basic.md Fix some more stuff 2025-11-17 22:35:41 -05:00
type_builtin.md Revise how external nominals work 2025-10-25 11:17:49 -04:00
type_comprehensive_scope.md Update snapshots 2025-11-17 19:00:13 -05:00
type_declarations.md Remove line/col info from snapshots by default 2025-10-16 07:00:23 -07:00
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 Fix scoped type variables 2025-11-09 09:41:14 -05:00
type_multiple_aliases.md Revise how external nominals work 2025-10-25 11:17:49 -04:00
type_record_basic.md Revise how external nominals work 2025-10-25 11:17:49 -04:00
type_record_effectful.md Fix record regression & add back ext vars 2025-11-09 09:41:14 -05:00
type_record_simple.md Fix record regression & add back ext vars 2025-11-09 09:41:14 -05:00
type_record_with_vars.md Infer static dispatch types in check 2025-10-21 08:48:30 -04: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 Infer static dispatch types in check 2025-10-21 08:48:30 -04:00
type_scope_integration.md Revise how external nominals work 2025-10-25 11:17:49 -04:00
type_shadowing_across_scopes.md more Result>Try updates (#8382) 2025-11-14 17:10:55 +01:00
type_simple_pure.md Revise how external nominals work 2025-10-25 11:17:49 -04:00
type_simple_type_var.md Infer static dispatch types in check 2025-10-21 08:48:30 -04:00
type_tag_union_basic.md Fix some more stuff 2025-11-17 22:35:41 -05:00
type_tag_union_complex.md Fix some more stuff 2025-11-17 22:35:41 -05:00
type_two_variables.md Infer static dispatch types in check 2025-10-21 08:48:30 -04:00
type_undeclared_usage.md Revise how external nominals work 2025-10-25 11:17:49 -04:00
type_var_annotation_body_connection.md Infer static dispatch types in check 2025-10-21 08:48:30 -04:00
type_var_basic.md Infer static dispatch types in check 2025-10-21 08:48:30 -04:00
type_var_collision_simple.md Cleanup 2025-11-09 09:59:56 -05:00
type_var_mismatch.md roc fmt on a snapshot 2025-11-17 22:52:53 -05:00
type_var_multiple.md Infer static dispatch types in check 2025-10-21 08:48:30 -04:00
type_var_name_avoids_collision.md Cleanup 2025-11-09 09:59:56 -05:00
type_var_namespace.md Fix some more stuff 2025-11-17 22:35:41 -05:00
type_var_nested.md Fix some more stuff 2025-11-17 22:35:41 -05:00
type_var_shadowing.md Infer static dispatch types in check 2025-10-21 08:48:30 -04:00
type_var_shadowing_inner.md Infer static dispatch types in check 2025-10-21 08:48:30 -04:00
type_var_underscore_conventions.md Merge remote-tracking branch 'origin/main' into nested-builtins 2025-10-30 12:31:35 -04:00
unary_minus_double_negative.md Cleanup 2025-11-09 09:59:56 -05:00
unary_minus_lambda_parameter.md Cleanup 2025-11-09 09:59:56 -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 Cleanup 2025-11-09 09:59:56 -05:00
unused_vars_simple.md Cleanup 2025-11-09 09:59:56 -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