Skip to content

Commit

Permalink
improve test
Browse files Browse the repository at this point in the history
  • Loading branch information
felipensp committed Nov 16, 2024
1 parent f3cfeea commit 5e1530f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions vlib/v/tests/fixed_array_2_dims_init_test.v
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,18 @@ struct Uniforms {
}

fn r() [4]f32 {
return [4]f32{}
return [f32(1.1), 1.2, 1.3, 1.4]!
}

fn test_main() {
_ := Uniforms{
v := Uniforms{
lights: [
r(),
r(),
]!
}
assert v.lights[0][0] == f32(1.1)
assert v.lights[0][1] == f32(1.2)
assert v.lights[0][2] == f32(1.3)
assert v.lights[0][3] == f32(1.4)
}

0 comments on commit 5e1530f

Please sign in to comment.