diff --git a/exercises/practice/two-fer/two_fer_test.odin b/exercises/practice/two-fer/two_fer_test.odin index f774b60..9f72426 100644 --- a/exercises/practice/two-fer/two_fer_test.odin +++ b/exercises/practice/two-fer/two_fer_test.odin @@ -5,17 +5,23 @@ import "core:testing" @(test) /// description = no name given test_no_name_given :: proc(t: ^testing.T) { - testing.expect_value(t, two_fer(), "One for you, one for me.") + str := two_fer() + defer delete(str) + testing.expect_value(t, str, "One for you, one for me.") } @(test) /// description = a name given test_a_name_given :: proc(t: ^testing.T) { - testing.expect_value(t, two_fer("Alice"), "One for Alice, one for me.") + str := two_fer("Alice") + defer delete(str) + testing.expect_value(t, str, "One for Alice, one for me.") } @(test) /// description = another name given test_another_name_given :: proc(t: ^testing.T) { - testing.expect_value(t, two_fer("Bob"), "One for Bob, one for me.") + str := two_fer("Bob") + defer delete(str) + testing.expect_value(t, str, "One for Bob, one for me.") }