@@ -2,35 +2,35 @@ module big
22
33import rand
44
5- fn test_lshift_in_place () {
5+ fn test_left_shift_in_place () {
66 mut a := [u32 (1 ), 1 , 1 , 1 , 1 ]
7- lshift_in_place (mut a, 1 )
7+ left_shift_in_place (mut a, 1 )
88 assert a == [u32 (2 ), 2 , 2 , 2 , 2 ]
9- lshift_in_place (mut a, 7 )
9+ left_shift_in_place (mut a, 7 )
1010 assert a == [u32 (256 ), 256 , 256 , 256 , 256 ]
1111 mut b := [u32 (0x80000001 ), 0xc0000000 , 0x80000000 , 0x7fffffff ]
12- lshift_in_place (mut b, 1 )
12+ left_shift_in_place (mut b, 1 )
1313 assert b == [u32 (2 ), 0x80000001 , 1 , 0xffffffff ]
1414 mut c := [u32 (0x00ffffff ), 0xf0f0f0f0 , 1 , 0x3fffffff , 1 ]
15- lshift_in_place (mut c, 2 )
15+ left_shift_in_place (mut c, 2 )
1616 assert c == [u32 (0x3fffffc ), 0xc3c3c3c0 , 7 , 0xfffffffc , 4 ]
1717}
1818
19- fn test_rshift_in_place () {
19+ fn test_right_shift_in_place () {
2020 mut a := [u32 (2 ), 2 , 2 , 2 , 2 ]
21- rshift_in_place (mut a, 1 )
21+ right_shift_in_place (mut a, 1 )
2222 assert a == [u32 (1 ), 1 , 1 , 1 , 1 ]
2323 a = [u32 (256 ), 256 , 256 , 256 , 256 ]
24- rshift_in_place (mut a, 7 )
24+ right_shift_in_place (mut a, 7 )
2525 assert a == [u32 (2 ), 2 , 2 , 2 , 2 ]
2626 a = [u32 (0 ), 0 , 1 ]
27- rshift_in_place (mut a, 1 )
27+ right_shift_in_place (mut a, 1 )
2828 assert a == [u32 (0 ), 0x80000000 , 0 ]
2929 mut b := [u32 (3 ), 0x80000001 , 1 , 0xffffffff ]
30- rshift_in_place (mut b, 1 )
30+ right_shift_in_place (mut b, 1 )
3131 assert b == [u32 (0x80000001 ), 0xc0000000 , 0x80000000 , 0x7fffffff ]
3232 mut c := [u32 (0x03ffffff ), 0xc3c3c3c0 , 7 , 0xfffffffc , 4 ]
33- rshift_in_place (mut c, 2 )
33+ right_shift_in_place (mut c, 2 )
3434 assert c == [u32 (0x00ffffff ), 0xf0f0f0f0 , 1 , 0x3fffffff , 1 ]
3535}
3636
0 commit comments