roc/test/snapshots
2025-10-08 22:01:31 -04:00
..
eval Simplify snapshots to use snippets 2025-10-06 16:23:18 -04:00
expr Simplify snapshots to use snippets 2025-10-06 16:23:18 -04:00
file Add new builtins to snapshot tests 2025-10-08 22:01:31 -04:00
formatting Simplify snapshots to use snippets 2025-10-06 16:23:18 -04:00
fuzz_crash Add new builtins to snapshot tests 2025-10-08 22:01:31 -04:00
if_then_else Simplify snapshots to use snippets 2025-10-06 16:23:18 -04:00
issue Simplify snapshots to use snippets 2025-10-06 16:23:18 -04:00
lambda_capture Review snapshots & fix issues 2025-09-30 17:47:04 -04:00
match_expr Simplify snapshots to use snippets 2025-10-06 16:23:18 -04:00
nominal Add new builtins to snapshot tests 2025-10-08 22:01:31 -04:00
numeric_edge_cases Test against snapshots, fix alias unification 2025-09-30 17:44:46 -04:00
pass Simplify snapshots to use snippets 2025-10-06 16:23:18 -04:00
platform Fix tag ext and number layouts 2025-09-30 17:47:03 -04:00
plume_package import type modules 2025-10-06 10:44:18 -04:00
primitive Simplify snapshots to use snippets 2025-10-06 16:23:18 -04:00
records Simplify snapshots to use snippets 2025-10-06 16:23:18 -04:00
repl Fix last compile issues 2025-10-02 21:00:46 -04:00
some_folder Revise some things 2025-10-06 12:08:00 -04:00
statement Simplify snapshots to use snippets 2025-10-06 16:23:18 -04:00
type_checking Simplify snapshots to use snippets 2025-10-06 16:23:18 -04:00
type_module import type modules 2025-10-06 10:44:18 -04:00
where_clause Simplify snapshots to use snippets 2025-10-06 16:23:18 -04:00
001.md Simplify snapshots to use snippets 2025-10-06 16:23:18 -04:00
add_var_with_spaces.md Simplify snapshots to use snippets 2025-10-06 16:23:18 -04:00
annotations.md Simplify snapshots to use snippets 2025-10-06 16:23:18 -04:00
app_header__nonempty_multiline.md run snapshot tool 2025-08-26 22:18:03 +02:00
app_header__nonempty_multiline__commented.md run snapshot tool 2025-08-26 22:18:03 +02:00
app_header__nonempty_multiline__trailing_comma.md run snapshot tool 2025-08-26 22:18:03 +02:00
app_header__platform_not_first.md run snapshot tool 2025-08-26 22:18:03 +02:00
app_header_nonempty_singleline.md run snapshot tool 2025-08-26 22:18:03 +02:00
binop_omnibus__single__no_spaces.md Fix tag ext and number layouts 2025-09-30 17:47:03 -04:00
binop_omnibus__singleline.md Fix tag ext and number layouts 2025-09-30 17:47:03 -04:00
binops.md Fix tag ext and number layouts 2025-09-30 17:47:03 -04:00
bool_closure_type_check.md Review snapshots & fix issues 2025-09-30 17:47:04 -04:00
bound_type_var_no_annotation.md Refactor expr num reqs + fix merge issues 2025-10-02 16:11:03 -04:00
can_basic_scoping.md Simplify snapshots to use snippets 2025-10-06 16:23:18 -04:00
can_dot_access.md Correctly track and unify number requirements 2025-09-30 17:44:46 -04:00
can_dot_access_with_vars.md Test against snapshots, fix alias unification 2025-09-30 17:44:46 -04:00
can_frac_literal.md Simplify snapshots to use snippets 2025-10-06 16:23:18 -04:00
can_hex_integer.md Simplify snapshots to use snippets 2025-10-06 16:23:18 -04:00
can_import_comprehensive.md Add new builtins to snapshot tests 2025-10-08 22:01:31 -04:00
can_import_exposing_types.md Add new builtins to snapshot tests 2025-10-08 22:01:31 -04:00
can_import_json.md Add new builtins to snapshot tests 2025-10-08 22:01:31 -04:00
can_import_nested_modules.md Restore type=snippet 2025-10-06 22:22:24 -04:00
can_import_type_annotations.md Add new builtins to snapshot tests 2025-10-08 22:01:31 -04:00
can_import_unresolved_qualified.md Add new builtins to snapshot tests 2025-10-08 22:01:31 -04:00
can_import_with_alias.md Add new builtins to snapshot tests 2025-10-08 22:01:31 -04:00
can_list_first_concrete.md Test against snapshots, fix alias unification 2025-09-30 17:44:46 -04:00
can_list_heterogeneous.md Correctly track and unify number requirements 2025-09-30 17:44:46 -04:00
can_list_mismatch_then_nested_error.md Test against snapshots, fix alias unification 2025-09-30 17:44:46 -04:00
can_list_multiline_mismatch.md Test against snapshots, fix alias unification 2025-09-30 17:44:46 -04:00
can_list_nested_heterogeneous.md Test against snapshots, fix alias unification 2025-09-30 17:44:46 -04:00
can_list_number_doesnt_fit.md Refactor expr num reqs + fix merge issues 2025-10-02 16:11:03 -04:00
can_list_rest_types.md Refactor expr num reqs + fix merge issues 2025-10-02 16:11:03 -04:00
can_list_triple_nested_heterogeneous.md Test against snapshots, fix alias unification 2025-09-30 17:44:46 -04:00
can_list_two_elements.md Test against snapshots, fix alias unification 2025-09-30 17:44:46 -04:00
can_nested_heterogeneous_lists.md Test against snapshots, fix alias unification 2025-09-30 17:44:46 -04:00
can_two_decls.md Fix tag ext and number layouts 2025-09-30 17:47:03 -04:00
can_var_scoping_invalid_top_level.md Simplify snapshots to use snippets 2025-10-06 16:23:18 -04:00
can_var_scoping_regular_var.md Simplify snapshots to use snippets 2025-10-06 16:23:18 -04:00
can_var_scoping_var_idents.md Simplify snapshots to use snippets 2025-10-06 16:23:18 -04:00
can_var_scoping_var_redeclaration.md Simplify snapshots to use snippets 2025-10-06 16:23:18 -04:00
crash_and_ellipsis_test.md Review snapshots & fix issues 2025-09-30 17:47:04 -04:00
def_simple_with_annotation.md Simplify snapshots to use snippets 2025-10-06 16:23:18 -04:00
default_app_no_main.md import type modules 2025-10-06 10:44:18 -04:00
default_app_wrong_arity.md Refactor out ValidationContext 2025-10-06 10:44:41 -04:00
effectful_with_effectful_annotation.md Add new builtins to snapshot tests 2025-10-08 22:01:31 -04:00
exposed_items_test.md Simplify snapshots to use snippets 2025-10-06 16:23:18 -04:00
expr_ident_simple.md run snapshot tool 2025-08-26 22:18:03 +02:00
expr_if_missing_else.md Simplify snapshots to use snippets 2025-10-06 16:23:18 -04:00
expr_int_invalid.md run snapshot tool 2025-08-26 22:18:03 +02:00
expr_int_negative.md Correctly track and unify number requirements 2025-09-30 17:44:46 -04:00
expr_int_simple.md Test against snapshots, fix alias unification 2025-09-30 17:44:46 -04:00
expr_no_space_dot_int.md Simplify snapshots to use snippets 2025-10-06 16:23:18 -04:00
external_decl_lookup.md Add new builtins to snapshot tests 2025-10-08 22:01:31 -04:00
external_lookup_expr.md run snapshot tool 2025-08-26 22:18:03 +02:00
fib_module.md Simplify snapshots to use snippets 2025-10-06 16:23:18 -04:00
file_multiple_type_decls.md Simplify snapshots to use snippets 2025-10-06 16:23:18 -04:00
function_no_annotation.md Add new builtins to snapshot tests 2025-10-08 22:01:31 -04:00
header_expected_open_bracket.md Fix tag ext and number layouts 2025-09-30 17:47:03 -04:00
hello_world.md Add new builtins to snapshot tests 2025-10-08 22:01:31 -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 Add new builtins to snapshot tests 2025-10-08 22:01:31 -04:00
import_exposing_alias.md Add new builtins to snapshot tests 2025-10-08 22:01:31 -04:00
import_exposing_basic.md Add new builtins to snapshot tests 2025-10-08 22:01:31 -04:00
lambda_annotation_mismatch_error.md Simplify snapshots to use snippets 2025-10-06 16:23:18 -04:00
lambda_currying_constraint.md Simplify snapshots to use snippets 2025-10-06 16:23:18 -04:00
lambda_in_collection.md run snapshot tool 2025-08-26 22:18:03 +02:00
lambda_multi_arg_mismatch.md Simplify snapshots to use snippets 2025-10-06 16:23:18 -04:00
lambda_parameter_unused.md Review snapshots & fix issues 2025-09-30 17:47:04 -04:00
lambda_ret_constraint_bug.md Review snapshots & fix issues 2025-09-30 17:47:04 -04:00
let_polymorphism_complex.md Review snapshots & fix issues 2025-09-30 17:47:04 -04:00
let_polymorphism_error.md Get mostly tests passing 2025-09-30 17:47:04 -04:00
let_polymorphism_expr.md Update snapshots 2025-09-30 17:44:47 -04:00
let_polymorphism_lists.md Review snapshots & fix issues 2025-09-30 17:47:04 -04:00
let_polymorphism_numbers.md Review snapshots & fix issues 2025-09-30 17:47:04 -04:00
let_polymorphism_records.md Review snapshots & fix issues 2025-09-30 17:47:04 -04:00
module_empty.md Simplify snapshots to use snippets 2025-10-06 16:23:18 -04:00
module_multiline_with_comments.md Simplify snapshots to use snippets 2025-10-06 16:23:18 -04:00
module_nonempty_single.md Simplify snapshots to use snippets 2025-10-06 16:23:18 -04:00
module_singleline_fmts_to_multiline.md Simplify snapshots to use snippets 2025-10-06 16:23:18 -04:00
multi_qualified_import.md Restore type=snippet 2025-10-06 22:22:24 -04:00
multiline_binop_1.md Test against snapshots, fix alias unification 2025-09-30 17:44:46 -04:00
multiline_list_formatting_5.md Test against snapshots, fix alias unification 2025-09-30 17:44:46 -04:00
multiline_list_formatting_7.md Correctly track and unify number requirements 2025-09-30 17:44:46 -04:00
multiline_list_formatting_11.md Correctly track and unify number requirements 2025-09-30 17:44:46 -04:00
multiline_list_formatting_14.md Test against snapshots, fix alias unification 2025-09-30 17:44:46 -04:00
multiline_string_complex.md Fix tag ext and number layouts 2025-09-30 17:47:03 -04:00
multiline_string_expr.md run snapshot tool 2025-08-26 22:18:03 +02:00
nested_ifs.md remove CAN and TYPES from REPL snapshots 2025-08-15 11:27:44 +10:00
nominal_type_origin_mismatch.md Simplify snapshots to use snippets 2025-10-06 16:23:18 -04:00
numbers.md Refactor expr num reqs + fix merge issues 2025-10-02 16:11:03 -04:00
package_empty.md run snapshot tool 2025-08-26 22:18:03 +02:00
package_header_nonempty_multiline_1.md Fix tag ext and number layouts 2025-09-30 17:47:03 -04:00
package_header_nonempty_multiline_3.md Fix tag ext and number layouts 2025-09-30 17:47:03 -04:00
package_header_nonempty_multiline_4.md Fix tag ext and number layouts 2025-09-30 17:47:03 -04:00
package_header_nonempty_multiline_6.md Fix tag ext and number layouts 2025-09-30 17:47:03 -04:00
package_header_nonempty_singleline_1.md Fix tag ext and number layouts 2025-09-30 17:47:03 -04:00
pattern_f64_overflow.md run snapshot tool 2025-08-26 22:18:03 +02:00
pure_annotation_effectful_body_error.md Add new builtins to snapshot tests 2025-10-08 22:01:31 -04:00
pure_with_pure_annotation.md Review snapshots & fix issues 2025-09-30 17:47:04 -04:00
qualified_tag.md Simplify snapshots to use snippets 2025-10-06 16:23:18 -04:00
qualified_type_canonicalization.md Add new builtins to snapshot tests 2025-10-08 22:01:31 -04:00
qualified_with_anno.md Simplify snapshots to use snippets 2025-10-06 16:23:18 -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 run snapshot tool 2025-08-26 22:18:03 +02:00
record_access_multiline_formatting_4.md run snapshot tool 2025-08-26 22:18:03 +02:00
rigid_var_instantiation.md Refactor expr num reqs + fix merge issues 2025-10-02 16:11:03 -04:00
rigid_var_no_instantiation_error.md Refactor expr num reqs + fix merge issues 2025-10-02 16:11:03 -04:00
simple_external_lookup.md run snapshot tool 2025-08-26 22:18:03 +02:00
simple_lambda_constraint_success.md Simplify snapshots to use snippets 2025-10-06 16:23:18 -04:00
simple_module_no_blanks.md Add new builtins to snapshot tests 2025-10-08 22:01:31 -04:00
statement_annotations.md Simplify snapshots to use snippets 2025-10-06 16:23:18 -04:00
static_dispatch_super_test.md Support external types in annos 2025-09-30 17:44:46 -04:00
string.md Simplify snapshots to use snippets 2025-10-06 16:23:18 -04:00
string_multiline_formatting_(due_to_templating_not_multiline_string_literal)_1.md Review snapshots & fix issues 2025-09-30 17:47:04 -04:00
string_multiline_formatting_(due_to_templating_not_multiline_string_literal)_3.md Review snapshots & fix issues 2025-09-30 17:47:04 -04:00
string_unicode_emoji.md Simplify snapshots to use snippets 2025-10-06 16:23:18 -04:00
syntax_grab_bag.md Add new builtins to snapshot tests 2025-10-08 22:01:31 -04:00
test_exact_pattern_crash.md Refactor expr num reqs + fix merge issues 2025-10-02 16:11:03 -04:00
test_headerless_main.md Eval nested types 2025-10-06 22:29:02 -04:00
test_instantiated_arg_mismatch.md Review snapshots & fix issues 2025-09-30 17:47:04 -04:00
test_instantiated_return_crash.md Review snapshots & fix issues 2025-09-30 17:47:04 -04:00
test_instantiation_arity_mismatch.md Review snapshots & fix issues 2025-09-30 17:47:04 -04:00
test_nested_instantiation_crash.md Refactor expr num reqs + fix merge issues 2025-10-02 16:11:03 -04:00
test_tuple_instantiation_crash.md Refactor expr num reqs + fix merge issues 2025-10-02 16:11:03 -04:00
type_alias_decl.md Refactor expr num reqs + fix merge issues 2025-10-02 16:11:03 -04:00
type_alias_parameterized.md Refactor expr num reqs + fix merge issues 2025-10-02 16:11:03 -04:00
type_alias_simple.md Review snapshots & fix issues 2025-09-30 17:47:04 -04:00
type_alias_tag_union.md Refactor expr num reqs + fix merge issues 2025-10-02 16:11:03 -04:00
type_anno_connection.md Simplify snapshots to use snippets 2025-10-06 16:23:18 -04:00
type_annotation_basic.md Refactor expr num reqs + fix merge issues 2025-10-02 16:11:03 -04:00
type_annotation_missing_parens.md Simplify snapshots to use snippets 2025-10-06 16:23:18 -04:00
type_annotations.md Simplify snapshots to use snippets 2025-10-06 16:23:18 -04:00
type_app_complex_nested.md Refactor expr num reqs + fix merge issues 2025-10-02 16:11:03 -04:00
type_app_multiple_args.md Review snapshots & fix issues 2025-09-30 17:47:04 -04:00
type_app_nested.md Review snapshots & fix issues 2025-09-30 17:47:04 -04:00
type_app_single_arg.md Review snapshots & fix issues 2025-09-30 17:47:04 -04:00
type_app_with_vars.md Refactor expr num reqs + fix merge issues 2025-10-02 16:11:03 -04:00
type_application_basic.md Review snapshots & fix issues 2025-09-30 17:47:04 -04:00
type_builtin.md Simplify snapshots to use snippets 2025-10-06 16:23:18 -04:00
type_comprehensive_scope.md Simplify snapshots to use snippets 2025-10-06 16:23:18 -04:00
type_declarations.md Simplify snapshots to use snippets 2025-10-06 16:23:18 -04:00
type_function_basic.md Review snapshots & fix issues 2025-09-30 17:47:04 -04:00
type_function_effectful.md Review snapshots & fix issues 2025-09-30 17:47:04 -04:00
type_function_multi_arg.md Review snapshots & fix issues 2025-09-30 17:47:04 -04:00
type_function_simple.md Review snapshots & fix issues 2025-09-30 17:47:04 -04:00
type_higher_order_multiple_vars.md Review snapshots & fix issues 2025-09-30 17:47:04 -04:00
type_local_scope_vars.md Refactor expr num reqs + fix merge issues 2025-10-02 16:11:03 -04:00
type_multiple_aliases.md Review snapshots & fix issues 2025-09-30 17:47:04 -04:00
type_record_basic.md Review snapshots & fix issues 2025-09-30 17:47:04 -04:00
type_record_effectful.md Add new builtins to snapshot tests 2025-10-08 22:01:31 -04:00
type_record_simple.md Fix tag ext and number layouts 2025-09-30 17:47:03 -04:00
type_record_with_vars.md Refactor expr num reqs + fix merge issues 2025-10-02 16:11:03 -04:00
type_redeclaration_same_scope.md Simplify snapshots to use snippets 2025-10-06 16:23:18 -04:00
type_same_var_multiple_uses.md Refactor expr num reqs + fix merge issues 2025-10-02 16:11:03 -04:00
type_scope_integration.md Simplify snapshots to use snippets 2025-10-06 16:23:18 -04:00
type_shadowing_across_scopes.md Simplify snapshots to use snippets 2025-10-06 16:23:18 -04:00
type_simple_pure.md Fix tag ext and number layouts 2025-09-30 17:47:03 -04:00
type_simple_type_var.md Refactor expr num reqs + fix merge issues 2025-10-02 16:11:03 -04:00
type_tag_union_basic.md Refactor expr num reqs + fix merge issues 2025-10-02 16:11:03 -04:00
type_tag_union_complex.md Refactor expr num reqs + fix merge issues 2025-10-02 16:11:03 -04:00
type_two_variables.md Refactor expr num reqs + fix merge issues 2025-10-02 16:11:03 -04:00
type_undeclared_usage.md Simplify snapshots to use snippets 2025-10-06 16:23:18 -04:00
type_var_annotation_body_connection.md Refactor expr num reqs + fix merge issues 2025-10-02 16:11:03 -04:00
type_var_basic.md Refactor expr num reqs + fix merge issues 2025-10-02 16:11:03 -04:00
type_var_collision_simple.md Review snapshots & fix issues 2025-09-30 17:47:04 -04:00
type_var_multiple.md Refactor expr num reqs + fix merge issues 2025-10-02 16:11:03 -04:00
type_var_name_avoids_collision.md Review snapshots & fix issues 2025-09-30 17:47:04 -04:00
type_var_namespace.md Refactor expr num reqs + fix merge issues 2025-10-02 16:11:03 -04:00
type_var_nested.md Refactor expr num reqs + fix merge issues 2025-10-02 16:11:03 -04:00
type_var_shadowing.md Refactor expr num reqs + fix merge issues 2025-10-02 16:11:03 -04:00
type_var_shadowing_inner.md Refactor expr num reqs + fix merge issues 2025-10-02 16:11:03 -04:00
type_var_underscore_conventions.md Refactor expr num reqs + fix merge issues 2025-10-02 16:11:03 -04:00
unary_minus_double_negative.md Review snapshots & fix issues 2025-09-30 17:47:04 -04:00
unary_minus_lambda_parameter.md Review snapshots & fix issues 2025-09-30 17:47:04 -04:00
unicode_single_quotes.md Simplify snapshots to use snippets 2025-10-06 16:23:18 -04:00
unused_vars_block.md Fix tag ext and number layouts 2025-09-30 17:47:03 -04:00
unused_vars_simple.md Review snapshots & fix issues 2025-09-30 17:47:04 -04: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