aboutsummaryrefslogtreecommitdiff
path: root/test/behavior/enum.zig
AgeCommit message (Collapse)Author
2023-09-23spirv: enable passing testsRobin Voetter
2023-07-01spirv: disable new behavior tests that do not passRobin Voetter
Some new behavior tests have recently been added, and not all of these pass with the SPIR-V backend.
2023-06-24all: migrate code to new cast builtin syntaxmlugg
Most of this migration was performed automatically with `zig fmt`. There were a few exceptions which I had to manually fix: * `@alignCast` and `@addrSpaceCast` cannot be automatically rewritten * `@truncate`'s fixup is incorrect for vectors * Test cases are not formatted, and their error locations change
2023-06-20Sema: fix auto-numbered enums with signed tag typesJacob Young
Closes #16095
2023-06-20Fix @enumToInt and @tagName for auto-numbered enums with signed tag type.IntegratedQuantum
2023-06-19all: zig fmt and rename "@XToY" to "@YFromX"Eric Joldasov
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
2023-06-13all: replace `comptime try` with `try comptime`Eric Joldasov
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
2023-05-31enable passing behavior testsLuuk de Gram
2023-05-20Merge pull request #15753 from Snektron/spirv-more-testsAndrew Kelley
spirv: make more tests pass
2023-05-20spirv: more passing testsRobin Voetter
2023-05-20spirv: use intInfo instead of arithmeticTypeInfo in airIntCastRobin Voetter
This ensures that we can also cast enums and error sets here. In the future this function will need to be changed to support composite and strange integers, but that is fine.
2023-05-20spirv: implement pointer comparison in for air cmpRobin Voetter
It turns out that the Khronos LLVM SPIRV translator does not support OpPtrEqual. Therefore, this instruction is emitted using a series of conversions. This commit breaks intToEnum, because enum was removed from the arithmetic type info. The enum should be converted to an int before this function is called.
2023-05-20spirv: lower get_union_tagAli Chraghi
2023-05-15spirv: implement arithmeticTypeInfo for Enum (`@intToEnum`)Ali Chraghi
2023-05-11setup spirv backend in behavior testsAli Chraghi
2023-05-03x86_64: fix feature confusionJacob Young
2023-05-01x86_64: implement tagNameJacob Young
2023-05-01behavior: update affected tests for the x86_64 backendJacob Young
2023-04-16x86_64: implement packed load and storeJacob Young
2023-04-12wasm: enable `@tagName` behavior testsLuuk de Gram
2023-03-15behavior: enable passing behavior tests on stage2_x86_64Jacob Young
2023-01-05Sema: handle enum expressions referencing local variablesVeikka Tuominen
Closes #12272
2022-12-10stage2: sparc64: Skip unimplemented testsKoakuma
2022-12-01Merge pull request #13715 from Vexu/cbeAndrew Kelley
cbe bug fixes and improvements
2022-11-30wasm: enable behavior tests for packed structsLuuk de Gram
2022-11-30cbe: ensure test and tagName function names are uniqueVeikka Tuominen
2022-11-10dwarf: do not assume unsigned 64bit integer for the enum valueJakub Konka
2022-10-25cbe: implement tag nameJacob Young
2022-10-18Sema: fix runtime int to enum with one possible valueAndrew Kelley
2022-10-13stage1: Skip new tests that never passed in stage1Cody Tapscott
This gets the behavior tests passing for stage1 again.
2022-10-05fix(text): hyphenate "comptime" adjectivesr00ster91
2022-09-09stage2 ARM: implement struct_field_val for registersjoachimschmidt557
2022-09-09stage2 ARM: amend implementation of various AIR instructionsjoachimschmidt557
- unwrap_errunion_err for registers - unwrap_errunion_payload for registers - ptr_slice_len_ptr for all MCValues - ptr_slice_ptr_ptr for all MCValues
2022-09-02Sema: improve behavior of comptime_int backed enumsVeikka Tuominen
2022-08-28Sema: fix handling of non-standard int types in empty non-exhaustive enumsVeikka Tuominen
Closes #12649
2022-08-24stage2: explicitly tagged enums no longer have one possible valueAndrew Kelley
Previously, Zig had inconsistent semantics for an enum like this: `enum(u8){zero = 0}` Although in theory this can only hold one possible value, the tag `zero`, Zig no longer will treat the type this way. It will do loads and stores, as if the type has runtime bits. Closes #12619 Tests passed locally: * test-behavior * test-cases
2022-06-30stage2 llvm: ensure `@tagName` functions are uniqueVeikka Tuominen
2022-06-25stage2 ARM: implement basic intCast and error union wrappingjoachimschmidt557
2022-03-09wasm: Enable passing behavior testsLuuk de Gram
This also adds some float-related instructions to MIR/Emit
2022-03-05stage2 AArch64: add more slice supportjoachimschmidt557
* airSlice * airArrayToSlice * and initial support for airSlicePtr and co
2022-03-02x64: rectify and add missing optionals bitsJakub Konka
Includes changes/additions to: * `wrap_optional` * `optional_payload` * `isNull` helper
2022-03-01stage2: introduce anonymous struct literalsAndrew Kelley
2022-02-28x64: pass more behavior testsJakub Konka
2022-02-27stage2 ARM: enable more behavior testsjoachimschmidt557
2022-02-22Skip unsupported enum behavior testsJakub Konka
2022-02-22Port more behavior testsJakub Konka
2022-02-22Sema: fix comptime coercion of payload to error unionAndrew Kelley
2022-02-22Sema: auto-numbered enums increment from last tag valueAndrew Kelley
This matches stage1 and the existing behavior tests.
2022-01-26Sema: implement struct init is_ref=trueAndrew Kelley
Takes advantage of the pattern already established with array_init_anon. Also upgrades array_init (non-anon) to the pattern. Implements comptime struct value equality and pointer value hashing.
2022-01-26organize behavior testsAndrew Kelley
Every test that is moved in this commit has been checked to see if it is now passing.