diff options
| author | nico-bb <64324649+nico-bb@users.noreply.github.com> | 2022-07-29 10:26:43 +0200 |
|---|---|---|
| committer | nico-bb <64324649+nico-bb@users.noreply.github.com> | 2022-07-29 10:26:43 +0200 |
| commit | 388d0ffe5fd2915eafefb2b5e0ffaae9c88e7aba (patch) | |
| tree | 297d2221931aae030e2770c0652b7cc50df97a75 /tools | |
| parent | 6c824e20abcd41ff02f3f6f296e6170cd77b8ee5 (diff) | |
Fix ternary when expression + added the test to snapshot
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/odinfmt/tests/.snapshots/assignments.odin | 4 | ||||
| -rw-r--r-- | tools/odinfmt/tests/assignments.odin | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/tools/odinfmt/tests/.snapshots/assignments.odin b/tools/odinfmt/tests/.snapshots/assignments.odin index 7b09796..338e33b 100644 --- a/tools/odinfmt/tests/.snapshots/assignments.odin +++ b/tools/odinfmt/tests/.snapshots/assignments.odin @@ -11,3 +11,7 @@ assignments :: proc() { &big.Int{} } + +ternary_when_assignment :: proc() { + a := WGL_CONTEXT_FLAGS_ARB when ODIN_DEBUG else 0 +} diff --git a/tools/odinfmt/tests/assignments.odin b/tools/odinfmt/tests/assignments.odin index c90b04e..9a92866 100644 --- a/tools/odinfmt/tests/assignments.odin +++ b/tools/odinfmt/tests/assignments.odin @@ -4,3 +4,7 @@ assignments :: proc() { a, b, c, d, e, f, res := &big.Int{}, &big.Int{}, &big.Int{}, &big.Int{}, &big.Int{}, &big.Int{}, &big.Int{} } + +ternary_when_assignment :: proc() { + a := WGL_CONTEXT_FLAGS_ARB when ODIN_DEBUG else 0 +} |