zig/test/behavior
Jacob Young e60d667111 Module: fix @embedFile of files containing zero bytes
If an adapted string key with embedded nulls was put in a hash map with
`std.hash_map.StringIndexAdapter`, then an incorrect hash would be
entered for that entry such that it is possible that when looking for
the exact key that matches the prefix of the original key up to the
first null would sometimes match this entry due to hash collisions and
sometimes not if performed later after a grow + rehash, causing the same
key to exist with two different indices breaking every string equality
comparison ever, for example claiming that a container type doesn't
contain a field because the field name string in the struct and the
string representing the identifier to lookup might be equal strings but
have different string indices.  This could maybe be fixed by changing
`std.hash_map.StringIndexAdapter.hash` to only hash up to the first
null, therefore ensuring that the entry's hash is correct and that all
future lookups will be consistent, but I don't trust anything so instead
I assert that there are no embedded nulls.
2024-02-22 12:33:53 -08:00
..
conflicting_externs categorize behavior/bugs/<issueno>.zig tests 2024-01-06 16:49:41 -08:00
hasdecl
import
namespace_depends_on_compile_var
pub_enum
usingnamespace compiler_rt: fix arm hard-float f16 abi 2023-09-19 09:37:53 -07:00
abs.zig x86_64+macho: pass more behavior tests 2024-02-06 19:01:17 +01:00
align.zig spirv: update tests 2024-02-04 19:09:33 +01:00
alignof.zig test/behavior: replace all 'comptime expect' with 'comptime assert' 2024-01-15 20:55:01 +11:00
array.zig spirv: update tests 2024-02-04 19:09:33 +01:00
asm.zig test: update behavior to silence 'var is never mutated' errors 2023-11-19 09:57:03 +00:00
async_fn.zig test/behavior: replace all 'comptime expect' with 'comptime assert' 2024-01-15 20:55:01 +11:00
atomics.zig x86_64: implement more atomic ops 2023-12-03 10:22:06 -05:00
await_struct.zig test: update behavior to silence 'var is never mutated' errors 2023-11-19 09:57:03 +00:00
basic.zig spirv: make rusticl the primary testing implementation 2024-02-09 09:27:08 +03:30
bit_shifting.zig categorize behavior/bugs/<issueno>.zig tests 2024-01-06 16:49:41 -08:00
bitcast.zig x86_64+macho: pass more behavior tests 2024-02-06 19:01:17 +01:00
bitreverse.zig x86_64+macho: pass more behavior tests 2024-02-06 19:01:17 +01:00
bool.zig spirv: air int_from_bool 2024-02-04 19:09:29 +01:00
builtin_functions_returning_void_or_noreturn.zig spirv: update tests 2024-02-04 19:09:33 +01:00
byteswap.zig x86_64+macho: pass more behavior tests 2024-02-06 19:01:17 +01:00
byval_arg_var.zig spirv: make rusticl the primary testing implementation 2024-02-09 09:27:08 +03:30
call.zig test/behavior: replace all 'comptime expect' with 'comptime assert' 2024-01-15 20:55:01 +11:00
call_tail.zig spirv: disable failing tests 2023-09-23 12:36:44 -07:00
cast.zig Sema: fix peer type resolution for arrays of coercible elements 2024-02-21 00:55:29 +00:00
cast_int.zig test: update behavior to silence 'var is never mutated' errors 2023-11-19 09:57:03 +00:00
comptime_memory.zig Value: expand canMutateComptimeVarState 2024-01-29 13:48:45 +02:00
const_slice_child.zig spirv: update failing / passing tests 2023-10-15 20:08:18 +02:00
decltest.zig spirv: more passing tests 2023-05-20 17:30:22 +02:00
defer.zig spirv: update failing / passing tests 2023-10-15 20:08:18 +02:00
destructure.zig spirv: update tests 2024-02-04 19:09:33 +01:00
duplicated_test_names.zig spirv: update tests 2024-02-04 19:09:33 +01:00
empty_file_level_struct.zig fix overflow found while fuzzing 2022-12-23 23:10:04 +02:00
empty_file_level_union.zig fix overflow found while fuzzing 2022-12-23 23:10:04 +02:00
empty_tuple_fields.zig setup spirv backend in behavior tests 2023-05-11 20:31:52 +02:00
empty_union.zig test: update behavior to silence 'var is never mutated' errors 2023-11-19 09:57:03 +00:00
enum.zig test/behavior: replace all 'comptime expect' with 'comptime assert' 2024-01-15 20:55:01 +11:00
error.zig spirv: make rusticl the primary testing implementation 2024-02-09 09:27:08 +03:30
eval.zig x86_64+macho: pass more behavior tests 2024-02-06 19:01:17 +01:00
export_builtin.zig spirv: update tests 2024-02-04 19:09:33 +01:00
export_c_keywords.zig cbe: fix non-msvc externs and exports 2024-01-03 02:52:25 -05:00
export_keyword.zig spirv: update tests 2024-02-04 19:09:33 +01:00
export_self_referential_type_info.zig all: zig fmt and rename "@XToY" to "@YFromX" 2023-06-19 12:34:42 -07:00
extern.zig x86_64+macho: pass more behavior tests 2024-02-06 19:01:17 +01:00
extern_struct_zero_size_fields.zig test: update behavior to silence 'var is never mutated' errors 2023-11-19 09:57:03 +00:00
field_parent_ptr.zig spirv: fieldParentPtr 2023-10-16 20:27:28 -04:00
file_to_embed.txt rename behavior test to better describe what it does 2023-10-23 17:28:10 -07:00
floatop.zig spirv: make rusticl the primary testing implementation 2024-02-09 09:27:08 +03:30
fn.zig x86_64+macho: pass more behavior tests 2024-02-06 19:01:17 +01:00
fn_delegation.zig spirv: more passing tests 2023-05-20 17:30:22 +02:00
fn_in_struct_in_comptime.zig test: update behavior to silence 'var is never mutated' errors 2023-11-19 09:57:03 +00:00
for.zig spirv: update tests 2024-02-04 19:09:33 +01:00
generics.zig categorize behavior/bugs/<issueno>.zig tests 2024-01-06 16:49:41 -08:00
globals.zig spirv: make rusticl the primary testing implementation 2024-02-09 09:27:08 +03:30
hasdecl.zig spirv: update tests 2024-02-04 19:09:33 +01:00
hasfield.zig
if.zig categorize behavior/bugs/<issueno>.zig tests 2024-01-06 16:49:41 -08:00
import.zig spirv: update tests 2024-02-04 19:09:33 +01:00
import_c_keywords.zig x86_64+macho: pass more behavior tests 2024-02-06 19:01:17 +01:00
incomplete_struct_param_tld.zig stage2: sparc64: Skip unimplemented tests 2022-12-10 21:51:46 +07:00
inline_switch.zig test: update behavior to silence 'var is never mutated' errors 2023-11-19 09:57:03 +00:00
int128.zig x86_64: implement some todos 2023-12-03 10:24:03 -05:00
int_comparison_elision.zig categorize behavior/bugs/<issueno>.zig tests 2024-01-06 16:49:41 -08:00
int_div.zig spirv: update tests 2024-02-04 19:09:33 +01:00
ir_block_deps.zig spirv: update failing / passing tests 2023-10-15 20:08:18 +02:00
lower_strlit_to_vector.zig spirv: update failing / passing tests 2023-10-15 20:08:18 +02:00
math.zig test: skip new failing tests for spirv 2024-02-15 18:44:24 +03:30
maximum_minimum.zig spirv: vectorize max, min 2024-02-04 19:09:31 +01:00
member_func.zig Zir: eliminate field_call_bind and field_call_bind_named 2023-05-20 12:27:48 -07:00
memcpy.zig Sema: ensure slice_ptr produces the correct type 2023-12-23 02:08:58 -05:00
memset.zig categorize behavior/bugs/<issueno>.zig tests 2024-01-06 16:49:41 -08:00
merge_error_sets.zig spirv: update failing / passing tests 2023-10-15 20:08:18 +02:00
muladd.zig x86_64+macho: pass more behavior tests 2024-02-06 19:01:17 +01:00
multiple_externs_with_conflicting_types.zig x86_64+macho: pass more behavior tests 2024-02-06 19:01:17 +01:00
namespace_depends_on_compile_var.zig spirv: update tests 2024-02-04 19:09:33 +01:00
nan.zig x86_64: fix compiler rt test failures 2023-10-29 07:20:36 -04:00
null.zig spirv: air is_(non_)null_ptr, optional_payload_ptr 2024-02-04 19:09:30 +01:00
optional.zig spirv: make rusticl the primary testing implementation 2024-02-09 09:27:08 +03:30
packed-struct.zig x86_64: fix packed load 2024-02-12 05:25:07 +01:00
packed-union.zig Fix some comptime packed struct issues 2024-01-29 13:09:17 -08:00
packed_struct_explicit_backing_int.zig std.builtin.Endian: make the tags lower case 2023-10-31 21:37:35 -04:00
pointers.zig spirv: make rusticl the primary testing implementation 2024-02-09 09:27:08 +03:30
popcount.zig test: update behavior to silence 'var is never mutated' errors 2023-11-19 09:57:03 +00:00
prefetch.zig test: update behavior to silence 'var is never mutated' errors 2023-11-19 09:57:03 +00:00
ptrcast.zig Remove all usages of std.mem.copy and remove std.mem.set (#18143) 2023-11-29 16:03:02 -05:00
ptrfromint.zig test: update behavior to silence 'var is never mutated' errors 2023-11-19 09:57:03 +00:00
pub_enum.zig spirv: update tests 2024-02-04 19:09:33 +01:00
ref_var_in_if_after_if_2nd_switch_prong.zig spirv: more passing tests 2023-05-20 17:30:22 +02:00
reflection.zig spirv: more passing tests 2023-05-20 17:30:22 +02:00
return_address.zig enable passing behavior tests 2023-05-31 18:04:33 +02:00
saturating_arithmetic.zig test: update behavior to silence 'var is never mutated' errors 2023-11-19 09:57:03 +00:00
select.zig test: update behavior to silence 'var is never mutated' errors 2023-11-19 09:57:03 +00:00
shuffle.zig spirv: fix shuffle properly 2024-02-04 19:09:32 +01:00
sizeof_and_typeof.zig Sema: replace uses of toUnsignedInt with toUnsignedIntAdvanced 2024-01-20 12:21:05 -08:00
slice.zig test/behavior: fix test type check for multi-ptr slice 2024-01-15 20:55:01 +11:00
slice_sentinel_comptime.zig spirv: update tests 2024-02-04 19:09:33 +01:00
src.zig spirv: update failing / passing tests 2023-10-15 20:08:18 +02:00
stage2_wasm_div.zig Replace @panic with unreachable, add test 2023-08-23 20:34:59 +01:00
string_literals.zig categorize behavior/bugs/<issueno>.zig tests 2024-01-06 16:49:41 -08:00
struct.zig test: skip new failing tests for spirv 2024-02-15 18:44:24 +03:30
struct_contains_null_ptr_itself.zig test: update behavior to silence 'var is never mutated' errors 2023-11-19 09:57:03 +00:00
struct_contains_slice_of_itself.zig Revert "Revert "Merge pull request #17657 from Snektron/spirv-recursive-ptrs"" 2023-10-23 06:27:12 -04:00
switch.zig test/behavior: replace all 'comptime expect' with 'comptime assert' 2024-01-15 20:55:01 +11:00
switch_on_captured_error.zig spirv: update tests 2024-02-04 19:09:33 +01:00
switch_prong_err_enum.zig spirv: update failing / passing tests 2023-10-15 20:08:18 +02:00
switch_prong_implicit_cast.zig spirv: update failing / passing tests 2023-10-15 20:08:18 +02:00
this.zig categorize behavior/bugs/<issueno>.zig tests 2024-01-06 16:49:41 -08:00
threadlocal.zig Remove all usages of std.mem.copy and remove std.mem.set (#18143) 2023-11-29 16:03:02 -05:00
truncate.zig spirv: vectorize int_cast, trunc 2024-02-04 19:09:31 +01:00
try.zig categorize behavior/bugs/<issueno>.zig tests 2024-01-06 16:49:41 -08:00
tuple.zig x86_64+macho: pass more behavior tests 2024-02-06 19:01:17 +01:00
tuple_declarations.zig test: update behavior to silence 'var is never mutated' errors 2023-11-19 09:57:03 +00:00
type.zig Fix failing type reifications 2024-01-07 16:27:50 +01:00
type_info.zig test/behavior: replace all 'comptime expect' with 'comptime assert' 2024-01-15 20:55:01 +11:00
type_info_mul_linksection_addrspace_decls.zig Zir: add missing extra index for linksection_or_addspace 2023-11-25 11:39:37 +00:00
type_info_only_pub_decls.zig spirv: update failing / passing tests 2023-10-15 20:08:18 +02:00
typename.zig spirv: make rusticl the primary testing implementation 2024-02-09 09:27:08 +03:30
undefined.zig x86_64: implement ret_safe 2024-02-12 05:25:07 +01:00
underscore.zig spirv: enable passing tests 2023-09-23 12:36:56 -07:00
union.zig spirv: update tests 2024-02-04 19:09:33 +01:00
union_with_members.zig enable passing behavior tests 2023-05-31 18:04:33 +02:00
usingnamespace.zig categorize behavior/bugs/<issueno>.zig tests 2024-01-06 16:49:41 -08:00
var_args.zig test: update behavior to silence 'var is never mutated' errors 2023-11-19 09:57:03 +00:00
vector.zig x86_64: implement c abi for bool vectors 2024-02-12 05:25:07 +01:00
void.zig test: update behavior to silence 'var is never mutated' errors 2023-11-19 09:57:03 +00:00
wasm.zig test: update behavior to silence 'var is never mutated' errors 2023-11-19 09:57:03 +00:00
while.zig spirv: make rusticl the primary testing implementation 2024-02-09 09:27:08 +03:30
widening.zig x86_64+macho: pass more behavior tests 2024-02-06 19:01:17 +01:00
wrapping_arithmetic.zig spirv: update tests 2024-02-04 19:09:33 +01:00
zero.bin Module: fix @embedFile of files containing zero bytes 2024-02-22 12:33:53 -08:00