zig/test/behavior
Jay Petacat 484cc15366 Sema: Allow small integer types to coerce to floats
If the float can store all possible values of the integer without
rounding, coercion is allowed. The integer's precision must be less than
or equal to the float's significand precision.

Closes #18614
2026-01-10 22:19:20 +01:00
..
conflicting_externs categorize behavior/bugs/<issueno>.zig tests 2024-01-06 16:49:41 -08:00
hasdecl move behavior tests from test/stage1/ to test/ 2021-04-29 15:54:04 -07:00
import move behavior tests from test/stage1/ to test/ 2021-04-29 15:54:04 -07:00
namespace_depends_on_compile_var move behavior tests from test/stage1/ to test/ 2021-04-29 15:54:04 -07:00
pub_enum move behavior tests from test/stage1/ to test/ 2021-04-29 15:54:04 -07:00
x86_64 all: replace all @Type usages 2025-11-22 22:42:38 +00:00
zon compiler: allow @import of ZON without a result type 2025-04-02 05:53:22 +01:00
abs.zig Return a usize from @abs if given an isize 2025-11-29 21:09:08 +01:00
addrspace_and_linksection.zig rename spirv backend name 2025-06-16 13:22:19 +03:30
align.zig aarch64: enable fixed behavior 2025-09-20 18:33:00 -07:00
alignof.zig rename spirv backend name 2025-06-16 13:22:19 +03:30
array.zig add behavior test: resist alias of explicit copy... 2025-09-20 18:51:26 -07:00
asm.zig test: skip alternative constraints behavior test on LoongArch 2025-09-18 12:42:14 +02:00
atomics.zig llvm: fix atomic widening of packed structs 2025-07-30 09:56:38 +01:00
basic.zig all: replace all @Type usages 2025-11-22 22:42:38 +00:00
bit_shifting.zig all: replace all @Type usages 2025-11-22 22:42:38 +00:00
bitcast.zig test: skip bitcast nan float does not modify signaling bit on powerpc 2025-12-16 06:23:06 +01:00
bitreverse.zig aarch64: add new from scratch self-hosted backend 2025-07-22 19:43:47 -07:00
bool.zig rename spirv backend name 2025-06-16 13:22:19 +03:30
builtin_functions_returning_void_or_noreturn.zig aarch64: add new from scratch self-hosted backend 2025-07-22 19:43:47 -07:00
byteswap.zig aarch64: add new from scratch self-hosted backend 2025-07-22 19:43:47 -07:00
byval_arg_var.zig rename spirv backend name 2025-06-16 13:22:19 +03:30
call.zig all: replace all @Type usages 2025-11-22 22:42:38 +00:00
cast.zig Sema: Allow small integer types to coerce to floats 2026-01-10 22:19:20 +01:00
cast_int.zig behavior tests: update for new requirement 2025-09-05 19:44:54 -07:00
comptime_memory.zig test: skip tests that were not meant to pass for spirv 2025-08-09 13:27:45 +03:30
const_slice_child.zig aarch64: add new from scratch self-hosted backend 2025-07-22 19:43:47 -07:00
decl_literals.zig aarch64: implement more optional/error union/union support 2025-07-26 21:39:50 -04:00
decltest.zig riscv: math progress 2024-05-11 02:17:24 -07:00
defer.zig aarch64: workaround some optional/union issues 2025-07-28 09:03:17 -07:00
destructure.zig rename spirv backend name 2025-06-16 13:22:19 +03:30
duplicated_test_names.zig rename spirv backend name 2025-06-16 13:22:19 +03:30
empty_union.zig riscv: std.fmt.format running 2024-06-13 02:20:47 -07:00
enum.zig stage2_wasm: revival, enabling tests 2025-12-07 07:21:15 +01:00
error.zig sema: fix error_return_trace_index handling in zirCondBr 2025-12-07 07:20:59 +01:00
eval.zig aarch64: add new from scratch self-hosted backend 2025-07-22 19:43:47 -07:00
export_builtin.zig aarch64: add new from scratch self-hosted backend 2025-07-22 19:43:47 -07:00
export_c_keywords.zig lib,test,tools,doc: update usages of @export 2024-08-27 00:44:35 +01:00
export_keyword.zig Coff2: create a new linker from scratch 2025-10-02 17:44:52 -04:00
export_self_referential_type_info.zig std: update std.builtin.Type fields to follow naming conventions 2024-08-28 08:39:59 +01:00
extern.zig Coff2: create a new linker from scratch 2025-10-02 17:44:52 -04: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 stage2_wasm: revival, enabling tests 2025-12-07 07:21:15 +01:00
file_to_embed.txt rename behavior test to better describe what it does 2023-10-23 17:28:10 -07:00
floatop.zig compiler-rt: fix f80 ceil/floor optimization 2026-01-08 00:45:52 +01:00
fn.zig all: replace all @Type usages 2025-11-22 22:42:38 +00:00
fn_delegation.zig riscv: std.fmt.format running 2024-06-13 02:20:47 -07:00
fn_in_struct_in_comptime.zig rename spirv backend name 2025-06-16 13:22:19 +03:30
for.zig aarch64: add new from scratch self-hosted backend 2025-07-22 19:43:47 -07:00
generics.zig all: replace all @Type usages 2025-11-22 22:42:38 +00:00
globals.zig aarch64: enable fixed behavior 2025-09-20 18:33:00 -07:00
hasdecl.zig rename spirv backend name 2025-06-16 13:22:19 +03:30
hasfield.zig Sema: make @hasField support tuples too 2022-03-11 12:59:20 -07:00
if.zig aarch64: add new from scratch self-hosted backend 2025-07-22 19:43:47 -07:00
import.zig remove usingnamespace from the language 2025-07-07 13:39:48 -07:00
import_c_keywords.zig Coff2: create a new linker from scratch 2025-10-02 17:44:52 -04:00
incomplete_struct_param_tld.zig riscv: std.fmt.format running 2024-06-13 02:20:47 -07:00
inline_switch.zig aarch64: implement more optional/error union/union support 2025-07-26 21:39:50 -04:00
int128.zig aarch64: add new from scratch self-hosted backend 2025-07-22 19:43:47 -07:00
int_comparison_elision.zig aarch64: add new from scratch self-hosted backend 2025-07-22 19:43:47 -07:00
ir_block_deps.zig aarch64: add new from scratch self-hosted backend 2025-07-22 19:43:47 -07:00
lower_strlit_to_vector.zig aarch64: add new from scratch self-hosted backend 2025-07-22 19:43:47 -07:00
math.zig Coff2: create a new linker from scratch 2025-10-02 17:44:52 -04:00
maximum_minimum.zig aarch64: add new from scratch self-hosted backend 2025-07-22 19:43:47 -07:00
member_func.zig aarch64: add new from scratch self-hosted backend 2025-07-22 19:43:47 -07:00
memcpy.zig aarch64: add new from scratch self-hosted backend 2025-07-22 19:43:47 -07:00
memmove.zig aarch64: add new from scratch self-hosted backend 2025-07-22 19:43:47 -07:00
memset.zig x86_64: continue hacking around unimplemented linker logic 2025-10-29 19:31:44 -04:00
merge_error_sets.zig riscv: std.fmt.format running 2024-06-13 02:20:47 -07:00
muladd.zig aarch64: add new from scratch self-hosted backend 2025-07-22 19:43:47 -07:00
multiple_externs_with_conflicting_types.zig Coff2: create a new linker from scratch 2025-10-02 17:44:52 -04:00
namespace_depends_on_compile_var.zig rename spirv backend name 2025-06-16 13:22:19 +03:30
nan.zig aarch64: add new from scratch self-hosted backend 2025-07-22 19:43:47 -07:00
null.zig aarch64: add new from scratch self-hosted backend 2025-07-22 19:43:47 -07:00
optional.zig aarch64: implement optional comparisons 2025-10-30 09:31:30 +00:00
packed-struct.zig disable failing stage2_aarch64 behavior tests 2025-09-20 18:33:01 -07:00
packed-union.zig behavior tests: update for new requirement 2025-09-05 19:44:54 -07:00
packed_struct_explicit_backing_int.zig aarch64: add new from scratch self-hosted backend 2025-07-22 19:43:47 -07:00
pointers.zig add behavior test: comptime C pointer to optional pointer 2025-09-20 18:58:32 -07:00
popcount.zig aarch64: add new from scratch self-hosted backend 2025-07-22 19:43:47 -07:00
prefetch.zig rename spirv backend name 2025-06-16 13:22:19 +03:30
ptrcast.zig Sema: exclude sentinel from source array length in pointer cast to slice 2025-07-26 14:54:04 +01:00
ptrfromint.zig test: skip tests that were not meant to pass for spirv 2025-08-09 13:27:45 +03:30
pub_enum.zig rename spirv backend name 2025-06-16 13:22:19 +03:30
ref_var_in_if_after_if_2nd_switch_prong.zig aarch64: add new from scratch self-hosted backend 2025-07-22 19:43:47 -07:00
reflection.zig aarch64: add new from scratch self-hosted backend 2025-07-22 19:43:47 -07:00
return_address.zig aarch64: implement some safety checks 2025-07-26 17:31:04 -04:00
saturating_arithmetic.zig aarch64: add new from scratch self-hosted backend 2025-07-22 19:43:47 -07:00
select.zig aarch64: add new from scratch self-hosted backend 2025-07-22 19:43:47 -07:00
shuffle.zig aarch64: add new from scratch self-hosted backend 2025-07-22 19:43:47 -07:00
sizeof_and_typeof.zig all: replace all @Type usages 2025-11-22 22:42:38 +00:00
slice.zig Dwarf: implement pointers to more comptime values 2026-01-05 11:24:48 +01:00
slice_sentinel_comptime.zig spirv: update tests 2024-02-04 19:09:33 +01:00
src.zig aarch64: add new from scratch self-hosted backend 2025-07-22 19:43:47 -07:00
string_literals.zig aarch64: add new from scratch self-hosted backend 2025-07-22 19:43:47 -07:00
struct.zig Dwarf: implement pointers to more comptime values 2026-01-05 11:24:48 +01:00
struct_contains_null_ptr_itself.zig aarch64: add new from scratch self-hosted backend 2025-07-22 19:43:47 -07:00
struct_contains_slice_of_itself.zig aarch64: workaround some optional/union issues 2025-07-28 09:03:17 -07:00
switch.zig all: replace all @Type usages 2025-11-22 22:42:38 +00:00
switch_loop.zig all: replace all @Type usages 2025-11-22 22:42:38 +00:00
switch_on_captured_error.zig aarch64: fix behavior failures 2025-09-20 18:33:01 -07:00
switch_prong_err_enum.zig aarch64: workaround some optional/union issues 2025-07-28 09:03:17 -07:00
switch_prong_implicit_cast.zig aarch64: add new from scratch self-hosted backend 2025-07-22 19:43:47 -07:00
this.zig aarch64: add new from scratch self-hosted backend 2025-07-22 19:43:47 -07:00
threadlocal.zig represent Mac Catalyst as aarch64-maccatalyst-none rather than aarch64-ios-macabi 2025-11-14 11:33:35 +01:00
truncate.zig aarch64: add new from scratch self-hosted backend 2025-07-22 19:43:47 -07:00
try.zig aarch64: fix behavior failures 2025-09-20 18:33:01 -07:00
tuple.zig all: replace all @Type usages 2025-11-22 22:42:38 +00:00
tuple_declarations.zig aarch64: add new from scratch self-hosted backend 2025-07-22 19:43:47 -07:00
type.zig Sema: initialize OPV comptime allocs correctly 2025-11-29 11:55:36 +00:00
type_info.zig aarch64: add new from scratch self-hosted backend 2025-07-22 19:43:47 -07:00
typename.zig aarch64: add new from scratch self-hosted backend 2025-07-22 19:43:47 -07:00
undefined.zig aarch64: add new from scratch self-hosted backend 2025-07-22 19:43:47 -07:00
underscore.zig riscv: std.fmt.format running 2024-06-13 02:20:47 -07:00
union.zig stage2_wasm: revival, enabling tests 2025-12-07 07:21:15 +01:00
var_args.zig represent Mac Catalyst as aarch64-maccatalyst-none rather than aarch64-ios-macabi 2025-11-14 11:33:35 +01:00
vector.zig stage2_wasm: revival, enabling tests 2025-12-07 07:21:15 +01:00
void.zig aarch64: add new from scratch self-hosted backend 2025-07-22 19:43:47 -07:00
wasm.zig riscv: add stage2_riscv to test matrix and bypass failing tests 2024-05-11 02:17:24 -07:00
while.zig aarch64: fix error union constants 2025-07-27 08:01:07 -04:00
widening.zig aarch64: add new from scratch self-hosted backend 2025-07-22 19:43:47 -07:00
wrapping_arithmetic.zig rename spirv backend name 2025-06-16 13:22:19 +03:30
x86_64.zig x86_64: increase passing test coverage on windows 2025-06-19 18:41:12 -04:00
zero.bin Module: fix @embedFile of files containing zero bytes 2024-02-22 12:33:53 -08:00
zon.zig compiler: allow @import of ZON without a result type 2025-04-02 05:53:22 +01:00