mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Fix test_proc_group_type_inference.odin
This commit is contained in:
@@ -109,7 +109,7 @@ test_type_inference_on_literals_for_various_types :: proc(t: ^testing.T) {
|
|||||||
group_union :: proc{proc_nil, proc_union}
|
group_union :: proc{proc_nil, proc_union}
|
||||||
testing.expect_value(t, group_union(int(9)).(int), 9)
|
testing.expect_value(t, group_union(int(9)).(int), 9)
|
||||||
testing.expect_value(t, group_union({}), nil)
|
testing.expect_value(t, group_union({}), nil)
|
||||||
|
|
||||||
proc_map :: proc(a: map[u8]u8) -> map[u8]u8 { return a }
|
proc_map :: proc(a: map[u8]u8) -> map[u8]u8 { return a }
|
||||||
group_map :: proc{proc_nil, proc_map}
|
group_map :: proc{proc_nil, proc_map}
|
||||||
testing.expect_value(t, len(group_map(map[u8]u8{1=1, 2=2})), 2)
|
testing.expect_value(t, len(group_map(map[u8]u8{1=1, 2=2})), 2)
|
||||||
@@ -129,8 +129,8 @@ test_type_inference_on_literals_for_various_types :: proc(t: ^testing.T) {
|
|||||||
group_soa_array :: proc{proc_nil, proc_soa_array}
|
group_soa_array :: proc{proc_nil, proc_soa_array}
|
||||||
testing.expect_value(t, len(group_soa_array(SOA_Array{{}, {}})), 2)
|
testing.expect_value(t, len(group_soa_array(SOA_Array{{}, {}})), 2)
|
||||||
testing.expect_value(t, len(group_soa_array({struct{int, int}{1, 2}, struct{int, int}{1, 2}})), 2)
|
testing.expect_value(t, len(group_soa_array({struct{int, int}{1, 2}, struct{int, int}{1, 2}})), 2)
|
||||||
testing.expect_value(t, len(group_soa_array({})), 0)
|
testing.expect_value(t, len(group_soa_array({})), 2)
|
||||||
testing.expect_value(t, len(soa_zip(a=[]int{1, 2}, b=[]int{3, 4})), 2)
|
testing.expect_value(t, len(soa_zip(a=[]int{1, 2}, b=[]int{3, 4})), 2)
|
||||||
|
|
||||||
proc_matrix :: proc(a: matrix[2,2]f32) -> matrix[2,2]f32 { return a }
|
proc_matrix :: proc(a: matrix[2,2]f32) -> matrix[2,2]f32 { return a }
|
||||||
group_matrix :: proc{proc_nil, proc_matrix}
|
group_matrix :: proc{proc_nil, proc_matrix}
|
||||||
|
|||||||
Reference in New Issue
Block a user