From ed1a43af18f4cce0cbe18b59e3265a9b495a381f Mon Sep 17 00:00:00 2001 From: Daniel Gavin Date: Mon, 24 Oct 2022 14:32:13 +0200 Subject: adding new tests for odinfmt --- tools/odinfmt/tests/.snapshots/if.odin | 25 +++++++++++++++++++++++++ tools/odinfmt/tests/if.odin | 19 +++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 tools/odinfmt/tests/.snapshots/if.odin create mode 100644 tools/odinfmt/tests/if.odin diff --git a/tools/odinfmt/tests/.snapshots/if.odin b/tools/odinfmt/tests/.snapshots/if.odin new file mode 100644 index 0000000..e1c05d1 --- /dev/null +++ b/tools/odinfmt/tests/.snapshots/if.odin @@ -0,0 +1,25 @@ +package odinfmt_test + + +if_one :: proc() { + if i := strings.index(imp.fullpath, ":"); + i != -1 && i > 1 && i < len(imp.fullpath) - 1 { + } +} + +if_two :: proc() { + if ret := unmarshal( + j[field[:len(field) - 1]], + a, + allocadsdsdsdsdsdsdsdtor, + ); ret != nil { + } +} + +if_three :: proc() { + if position_in_node( + position_context.binary.raaaaaaaaaaaaaaaaaaaight, + position_context.position, + ) { + } +} diff --git a/tools/odinfmt/tests/if.odin b/tools/odinfmt/tests/if.odin new file mode 100644 index 0000000..26ada3d --- /dev/null +++ b/tools/odinfmt/tests/if.odin @@ -0,0 +1,19 @@ +package odinfmt_test + + +if_one :: proc() { + if i := strings.index(imp.fullpath, ":"); i != -1 && i > 1 && i < len(imp.fullpath) - 1 { + } +} + +if_two :: proc() { + if ret := unmarshal(j[field[:len(field) - 1]], a, allocadsdsdsdsdsdsdsdtor); ret != nil { + } +} + +if_three :: proc() { + if position_in_node( + position_context.binary.raaaaaaaaaaaaaaaaaaaight, + position_context.position) { + } +} \ No newline at end of file -- cgit v1.2.3