╭ README.md ────────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭ find file ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╮ ╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │ │ │http│ ssh │ │ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╯ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
.. compile_errors/ safety/ ╭─────────────────────────────────╮ │README.md │ ╰─────────────────────────────────╯ address_of_extern_var_as_const.zi address_space_pointer_access_chai address_spaces_pointer_access_cha address_spaces_pointer_access_cha address_spaces_pointer_access_cha ambiguous_reference.zig array_in_anon_struct.zig blocks.zig callconv_spirv.zig compile_error.zig comptime_aggregate_print.zig decl_value_arena.zig default_value_references_comptime dereferencing_though_multiple_poi disable_stack_tracing.zig error_union_variant_is_runtime_kn exit.zig export_from_body_of_coerced_fn.zi f32_passed_to_variadic_fn.zig f_segment_address_space_reading_a float_mode_optimized_reduce.zig fn_typeinfo_passed_to_comptime_fn for_loop.zig function_redeclaration.zig global_variable_redeclaration.zig hello_world.zig image_sampling_spirv.zig inherit_want_safety.zig inner_func_accessing_outer_var.zi large_add_function.zig large_slices.zig maximum_sized_integer_literal.zig nested_blocks.zig no_compile_panic_for_unchecked_ar non_leaf_functions.zig optionals.zig passing_u0_to_function.zig pointer_keeps_address_space.zig pointer_keeps_address_space_when_ pointer_to_explicit_generic_addre recursive_fibonacci.zig rem.zig returning_undefined_sentinel_term returns_in_try.zig runtime_bitwise_and.zig runtime_bitwise_or.zig save_function_return_values_in_ca sentinel_references_comptime_var. setting_an_address_space_on_a_loc simple_addition_and_subtraction.z simple_if_statement.zig spirv_mergable_pointers.zig storage_buffer_opengl.zig tail_call_noreturn.zig taking_pointer_of_global_tagged_u try_in_comptime_in_struct_in_test type_names.zig union_unresolved_layout.zig unused_vars.zig while_loops.zig
🬂█🬂 🬕🬂🬂 🬔🬂🬈 🬂█🬂 🬔🬂🬈 🬦🬎🬓 🬔🬂🬈 🬕🬂🬂 🬔🬂🬧 ▌ ▐ 🬂█🬂 🬔🬂🬈 ▌🬞🬅 █ 🬛🬋🬃 🬈🬋🬢 █ ▌ 🬝🬋🬬 🬈🬋🬢 🬛🬋🬃 ▌ ▐ ▌ ▐ █ ▌ 🬛🬐 █ 🬲🬭🬭 🬢🬭🬘 █ 🬣🬭🬖 ▌ ▐ 🬢🬭🬘 🬲🬭🬭 🬈🬍🬤 🬣🬭🬘 🬭█🬭 🬣🬭🬖 ▌🬁🬢 🬕🬂🬧 🬕🬂🬂 🬕🬂🬂 🬕🬂🬂 🬕🬂🬧 🬕🬂🬂 🬺 ▐ 🬔🬂🬈 🬕🬂🬂 🬛🬚🬅 🬛🬋🬃 🬛🬋🬃 🬛🬋🬃 🬛🬚🬅 🬛🬋🬃 ▌🬈🬷 ▌ 🬛🬋🬃 ▌🬁🬢 🬲🬭🬭 ▌ 🬲🬭🬭 ▌🬁🬢 🬲🬭🬭 ▌ 🬨 🬣🬭🬖 🬲🬭🬭 Use comments at the end of the file to indicate metadata about the test case. Here are examples of different kinds of tests: 🬔🬂 🬔🬧 🬺🬻 🬴🬗 🬨🬕 ▌ 🬴🬒 🬴🬒 🬴🬗 🬴🬗 🬔🬧 🬴🬗 🬨🬕 🬴🬒 🬤🬒 🬨🬕 🬣🬭 🬣🬘 ▌▐ ▌ 🬷🬲 🬲🬭 🬲🬭 🬲🬭 🬕🬢 🬕🬢 🬣🬘 🬕🬢 ▐▌ 🬲🬭 🬱🬘 ▐▌ If you want it to be run with zig test and match expected error messages: ╭─────────────────────────────────────────────╮ │// error │ │// is_test=true │ │// │ │// :4:13: error: 'try' outside function scope│ ╰─────────────────────────────────────────────╯ 🬴🬒 🬣🬘 🬴🬒 🬔🬂 ▌▐ 🬨🬕 🬨🬕 🬔🬧 🬺▐ 🬲🬭 🬔🬧 🬲🬭 🬣🬭 🬣🬘 ▐▌ 🬷🬲 🬣🬘 ▌🬬 This will do zig run on the code and expect exit code 0. ╭──────╮ │// run│ ╰──────╯ 🬨🬕 🬺▐ 🬔🬂 🬴🬗 🬴🬒 🬺🬻 🬴🬒 🬺▐ 🬨🬕 🬳🬶 ▌ 🬷🬲 ▌🬬 🬣🬭 🬕🬢 🬲🬭 ▌▐ 🬲🬭 ▌🬬 ▐▌ ▌▐ 🬲🬭 🬔🬂 🬔🬧 🬺🬻 🬴🬗 🬨🬕 ▌ 🬳🬶 🬨🬕 🬨🬕 🬔🬧 🬺▐ 🬣🬭 🬣🬘 ▌▐ ▌ 🬷🬲 🬲🬭 ▌▐ ▐▌ 🬷🬲 🬣🬘 ▌🬬 Make multiple files that have ".", and then an integer, before the ".zig" extension, like this: ╭───────────╮ │hello.0.zig│ │hello.1.zig│ │hello.2.zig│ ╰───────────╯ Each file can be a different kind of test, such as expecting compile errors, or expecting to be run and exit(0). The test harness will use these to simulate incremental compilation. At the time of writing there is no way to specify multiple files being changed as part of an update. 🬤🬒 ▌▐ 🬴🬗 🬕🬧 🬨🬕 🬴🬗 🬴🬒 🬔🬂 🬨🬕 🬔🬧 🬴🬗 🬨🬕 🬴🬒 🬤🬒 🬱🬘 🬣🬘 🬲🬘 🬲🬘 🬷🬲 🬕🬢 🬲🬭 🬣🬭 ▐▌ 🬣🬘 🬕🬢 🬷🬲 🬲🬭 🬱🬘 Subdirectories do not have any semantic meaning but they can be used for organization since the test harness will recurse into them. The full directory path will be prepended as a prefix on the test case name. ▌ 🬨🬕 🬺🬻 🬨🬕 🬨🬕 🬨🬕 🬺▐ 🬔🬰 ▌▐ 🬲🬷 🬨🬕 🬔🬂 🬲🬷 🬲🬭 🬷🬲 ▌▐ 🬷🬲 ▐▌ 🬷🬲 ▌🬬 🬣🬷 🬬🬝 ▌▐ 🬷🬲 🬣🬭 ▌▐ 🬴🬗 🬳🬶 🬔🬂 🬲🬅 🬴🬒 🬺▐ 🬕🬧 🬤🬒 🬳🬶 🬺▐ 🬕🬧 🬨🬕 🬳🬶 🬴🬗 🬔🬰 🬴🬒 🬨🬕 🬤🬒 🬲🬘 ▌▐ 🬣🬭 🬕🬢 🬲🬭 ▌🬬 🬲🬘 🬱🬘 ▌▐ ▌🬬 🬲🬘 ▐▌ ▌▐ 🬕🬢 🬣🬷 🬲🬭 ▐▌ 🬱🬘 🬳🬶 🬴🬗 🬴🬒 🬨🬕 🬴🬒 🬤🬒 🬨🬕 🬴🬒 🬕🬧 ▌▐ 🬕🬢 🬲🬭 ▐▌ 🬲🬭 🬱🬘 ▐▌ 🬲🬭 🬲🬘 ╭───────────────────────────────────╮ │// run │ │// backend=selfhosted,llvm │ │// target=x86_64-linux,x86_64-macos│ ╰───────────────────────────────────╯ Possible backends are: • auto: the default; compiler picks the backend based on robustness. • selfhosted: equivalent to passing -fno-llvm -fno-lld. • llvm: equivalent to -fllvm.