aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormoonz <pmnarimani@gmail.com>2026-01-27 11:22:42 +0100
committermoonz <pmnarimani@gmail.com>2026-01-30 18:03:45 +0100
commit25a0ad1bc36f5ff40b7f17e4240407712a02895f (patch)
treef9b7432a3408603d892849e089cf860611b24953
parent8e5580815af631401dfa46fbf2997e44128681a6 (diff)
refactor: renamed the test file to reflect which code action is being tested
-rw-r--r--tests/action_invert_if_test.odin (renamed from tests/action_test.odin)30
1 files changed, 16 insertions, 14 deletions
diff --git a/tests/action_test.odin b/tests/action_invert_if_test.odin
index f5c57a5..0639b69 100644
--- a/tests/action_test.odin
+++ b/tests/action_invert_if_test.odin
@@ -4,6 +4,8 @@ import "core:testing"
import test "src:testing"
+INVERT_IF_ACTION :: "Invert if"
+
@(test)
action_invert_if_simple :: proc(t: ^testing.T) {
source := test.Source {
@@ -19,7 +21,7 @@ main :: proc() {
packages = {},
}
- test.expect_action(t, &source, {"Invert if"})
+ test.expect_action(t, &source, {INVERT_IF_ACTION})
}
@(test)
@@ -42,7 +44,7 @@ main :: proc() {
foo()
}`
- test.expect_action_with_edit(t, &source, "Invert if", expected)
+ test.expect_action_with_edit(t, &source, INVERT_IF_ACTION, expected)
}
@(test)
@@ -62,7 +64,7 @@ main :: proc() {
packages = {},
}
- test.expect_action(t, &source, {"Invert if"})
+ test.expect_action(t, &source, {INVERT_IF_ACTION})
}
@(test)
@@ -88,7 +90,7 @@ main :: proc() {
foo()
}`
- test.expect_action_with_edit(t, &source, "Invert if", expected)
+ test.expect_action_with_edit(t, &source, INVERT_IF_ACTION, expected)
}
@(test)
@@ -105,7 +107,7 @@ main :: proc() {
packages = {},
}
- test.expect_action(t, &source, {"Invert if"})
+ test.expect_action(t, &source, {INVERT_IF_ACTION})
}
@(test)
@@ -127,7 +129,7 @@ main :: proc() {
bar()
}`
- test.expect_action_with_edit(t, &source, "Invert if", expected)
+ test.expect_action_with_edit(t, &source, INVERT_IF_ACTION, expected)
}
@(test)
@@ -165,7 +167,7 @@ main :: proc() {
foo()
}`
- test.expect_action_with_edit(t, &source, "Invert if", expected)
+ test.expect_action_with_edit(t, &source, INVERT_IF_ACTION, expected)
}
@(test)
@@ -187,7 +189,7 @@ main :: proc() {
foo()
}`
- test.expect_action_with_edit(t, &source, "Invert if", expected)
+ test.expect_action_with_edit(t, &source, INVERT_IF_ACTION, expected)
}
@(test)
@@ -209,7 +211,7 @@ main :: proc() {
foo()
}`
- test.expect_action_with_edit(t, &source, "Invert if", expected)
+ test.expect_action_with_edit(t, &source, INVERT_IF_ACTION, expected)
}
@(test)
@@ -231,7 +233,7 @@ main :: proc() {
foo()
}`
- test.expect_action_with_edit(t, &source, "Invert if", expected)
+ test.expect_action_with_edit(t, &source, INVERT_IF_ACTION, expected)
}
@(test)
@@ -253,7 +255,7 @@ main :: proc() {
foo()
}`
- test.expect_action_with_edit(t, &source, "Invert if", expected)
+ test.expect_action_with_edit(t, &source, INVERT_IF_ACTION, expected)
}
@(test)
@@ -275,7 +277,7 @@ main :: proc() {
foo()
}`
- test.expect_action_with_edit(t, &source, "Invert if", expected)
+ test.expect_action_with_edit(t, &source, INVERT_IF_ACTION, expected)
}
@(test)
@@ -307,7 +309,7 @@ main :: proc() {
statement1()
}`
- test.expect_action_with_edit(t, &source, "Invert if", expected)
+ test.expect_action_with_edit(t, &source, INVERT_IF_ACTION, expected)
}
@(test)
@@ -376,5 +378,5 @@ main :: proc() {
}
// Should have the invert action for an if statement nested inside an else-if body
- test.expect_action(t, &source, {"Invert if"})
+ test.expect_action(t, &source, {INVERT_IF_ACTION})
}