예제 #1
0
 def test_constant(self):
     assert fix(1, 10) == 1
     assert fix(0, 10) == 0
예제 #2
0
 def test_fix_m8(self):
     assert fix(-8, 10) == 3
예제 #3
0
 def test_fix_m13(self):
     assert fix(-13, 10) == -2
예제 #4
0
 def test_fix_m1_nan(self):
     assert isnan(fix(-1, NaN))
예제 #5
0
 def test_fix_m2(self):
     assert fix(-2, 10) == 9
예제 #6
0
 def test_fix_m1(self):
     assert fix(-1, 10) == 10
예제 #7
0
 def test_constant_negative_size2(self):
     assert fix(10, NaN) == 10
예제 #8
0
 def test_constant_negative_size(self):
     assert fix(10, -1) == 10