@@ -29,14 +29,14 @@ def test_serialize_record_type(fx_point):
2929
3030def test_serialize_union_type (fx_point , fx_offset , fx_circle_type ,
3131 fx_rectangle_type ):
32- circle = fx_circle_type (fx_point , fx_offset )
32+ circle = fx_circle_type (origin = fx_point , radius = fx_offset )
3333 s = {
3434 '_type' : 'shape' , '_tag' : 'circle' ,
3535 'origin' : serialize_record_type (fx_point ),
3636 'radius' : serialize_unboxed_type (fx_offset )
3737 }
3838 assert serialize_union_type (circle ) == s
39- rectangle = fx_rectangle_type (fx_point , fx_point )
39+ rectangle = fx_rectangle_type (upper_left = fx_point , lower_right = fx_point )
4040 s = {
4141 '_type' : 'shape' , '_tag' : 'rectangle' ,
4242 'upper_left' : serialize_record_type (fx_point ),
@@ -93,8 +93,9 @@ def test_serialize_meta_set(d, expect):
9393
9494
9595def test_serialize_meta_list (fx_record_type , fx_unboxed_type , fx_offset ):
96- record = fx_record_type (fx_offset , fx_offset )
97- record2 = fx_record_type (fx_unboxed_type (1.1 ), fx_unboxed_type (1.2 ))
96+ record = fx_record_type (left = fx_offset , top = fx_offset )
97+ record2 = fx_record_type (left = fx_unboxed_type (1.1 ),
98+ top = fx_unboxed_type (1.2 ))
9899 serialize_result = serialize_meta ([record , record2 ])
99100 assert serialize_result == [
100101 {'_type' : 'point' , 'x' : 1.2 , 'top' : 1.2 },
@@ -105,8 +106,9 @@ def test_serialize_meta_list(fx_record_type, fx_unboxed_type, fx_offset):
105106
106107def test_serialize_meta_set_of_record (fx_record_type , fx_unboxed_type ,
107108 fx_offset ):
108- record = fx_record_type (fx_offset , fx_offset )
109- record2 = fx_record_type (fx_unboxed_type (1.1 ), fx_unboxed_type (1.2 ))
109+ record = fx_record_type (left = fx_offset , top = fx_offset )
110+ record2 = fx_record_type (left = fx_unboxed_type (1.1 ),
111+ top = fx_unboxed_type (1.2 ))
110112 serialize_result = serialize_meta ({record , record2 })
111113 assert record .__nirum_serialize__ () in serialize_result
112114 assert record2 .__nirum_serialize__ () in serialize_result
0 commit comments