From c3b2c9a9b388c355eaa9faa5dfb33e80158966ca Mon Sep 17 00:00:00 2001 From: ARay Date: Thu, 18 Jun 2026 18:05:54 +0300 Subject: [PATCH] add test for the pr --- tests/issues/test_issue_6853.odin | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tests/issues/test_issue_6853.odin diff --git a/tests/issues/test_issue_6853.odin b/tests/issues/test_issue_6853.odin new file mode 100644 index 000000000..af0bcebe5 --- /dev/null +++ b/tests/issues/test_issue_6853.odin @@ -0,0 +1,25 @@ +package test_issues + +import "core:testing" + +@(test) +test_issue_6853 :: proc(t: ^testing.T) { + + test_s :: struct { + a, b, c, d, e: u64, + } + + expected := test_s{1, 2, 3, 4, 5} + + case0 :: proc() -> (u64, u64) {return 1, 2} + test0 := test_s{case0(), 3, 4, 5} + testing.expect_value(t, test0, expected) + + case1 :: proc() -> (u64, u64, u64) {return 1, 2, 3} + test1 := test_s{case1(), 4, 5} + testing.expect_value(t, test1, expected) + + case2 :: proc() -> (u64, u64) {return 2, 3} + test2 := test_s{1, case2(), 4, 5} + testing.expect_value(t, test2, expected) +}