示例#1
0
 def test_coll_small(self):
     self.assertEqual(collatz_fixed.coll(20), 7)
示例#2
0
 def test_coll_big(self):
     self.assertEqual(collatz_fixed.coll(1e+150), 876)
示例#3
0
 def test_coll_irrat(self):
     self.assertEqual(collatz_fixed.coll(math.sqrt(2)), 0)
示例#4
0
 def test_coll_pie(self):
     self.assertEqual(collatz_fixed.coll(math.pi), 7)
示例#5
0
 def test_coll_large(self):
     self.assertEqual(collatz_fixed.coll(1e+500), "Overflow")
示例#6
0
 def test_coll_large_recur(self):
     self.assertEqual(collatz_fixed.coll(1e+309), "Overflow")
示例#7
0
 def test_coll_very_small(self):
     self.assertEqual(collatz_fixed.coll(1e-300), "InvalidInput")
示例#8
0
 def test_coll_neg_infi(self):
     self.assertEqual(collatz_fixed.coll(-(1e+300)), 1245)
示例#9
0
 def test_coll_neg_float(self):
     self.assertEqual(collatz_fixed.coll(-1055.24), 31)
示例#10
0
 def test_coll_float(self):
     self.assertEqual(collatz_fixed.coll(1024.5678), 10)
示例#11
0
 def test_coll_zero(self):
     self.assertEqual(collatz_fixed.coll(0), "InvalidInput")
示例#12
0
 def test_coll_corner_infi(self):
     self.assertEqual(collatz_fixed.coll(1e+300), 1245)
示例#13
0
 def test_coll_negative(self):
     self.assertEqual(collatz_fixed.coll(-20), 7)