diff options
| author | DanielGavin <danielgavin5@hotmail.com> | 2023-06-08 22:17:16 +0200 |
|---|---|---|
| committer | DanielGavin <danielgavin5@hotmail.com> | 2023-06-08 22:17:16 +0200 |
| commit | b13ba1f04b6442b15040b6f0dd1c0d7d3b5ce0f9 (patch) | |
| tree | 8897936fa6ffaa0da2a5d0f8948993a0710c5ccd | |
| parent | 9caba3c2b05a81659a63c43da6b6ae2c606d412c (diff) | |
Add attribute test for odinfmt
| -rw-r--r-- | tools/odinfmt/tests/.snapshots/attributes.odin | 7 | ||||
| -rw-r--r-- | tools/odinfmt/tests/attributes.odin | 9 |
2 files changed, 15 insertions, 1 deletions
diff --git a/tools/odinfmt/tests/.snapshots/attributes.odin b/tools/odinfmt/tests/.snapshots/attributes.odin index 58dd5f8..9911d30 100644 --- a/tools/odinfmt/tests/.snapshots/attributes.odin +++ b/tools/odinfmt/tests/.snapshots/attributes.odin @@ -8,3 +8,10 @@ main :: proc() { } procedure_no_bounds_check :: proc() where 1 == 1 #no_bounds_check {} + +// odinfmt: disable +@(require_results) +foo :: proc() -> int { + return 0 +} +// odinfmt: enable diff --git a/tools/odinfmt/tests/attributes.odin b/tools/odinfmt/tests/attributes.odin index 6e55c21..9911d30 100644 --- a/tools/odinfmt/tests/attributes.odin +++ b/tools/odinfmt/tests/attributes.odin @@ -7,4 +7,11 @@ main :: proc() { #no_bounds_check buf = buf[8:] } -procedure_no_bounds_check :: proc() where 1 == 1 #no_bounds_check {}
\ No newline at end of file +procedure_no_bounds_check :: proc() where 1 == 1 #no_bounds_check {} + +// odinfmt: disable +@(require_results) +foo :: proc() -> int { + return 0 +} +// odinfmt: enable |