blob: 817a1a26bb8ba2e5807c72255f3bcaed489e8fed (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
// Tests issue #4364 https://github.com/odin-lang/Odin/issues/4364
package test_issues
import "core:testing"
@test
test_const_array_fill_assignment :: proc(t: ^testing.T) {
MAGIC :: 12345
Struct :: struct {x: int}
CONST_ARR : [4]Struct : Struct{MAGIC}
arr := CONST_ARR
testing.expect_value(t, len(arr), 4)
testing.expect_value(t, arr[0], Struct{MAGIC})
testing.expect_value(t, arr[1], Struct{MAGIC})
testing.expect_value(t, arr[2], Struct{MAGIC})
testing.expect_value(t, arr[3], Struct{MAGIC})
}
|