From: Sebastien Bourdeauducq Date: Thu, 17 Sep 2015 09:23:19 +0000 (+0800) Subject: test/size: do not test removed functions X-Git-Tag: 24jan2021_ls180~2099^2~3^2~77 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=049a8f082ab206ac67a01a20de4a99e385351436;p=litex.git test/size: do not test removed functions --- diff --git a/migen/test/test_size.py b/migen/test/test_size.py index 2c29116a..54f9e99d 100644 --- a/migen/test/test_size.py +++ b/migen/test/test_size.py @@ -9,8 +9,8 @@ def _same_slices(a, b): class SignalSizeCase(unittest.TestCase): def setUp(self): - self.i = 0xaa - self.j = -127 + self.i = C(0xaa) + self.j = C(-127) self.s = Signal((13, True)) def test_flen(self): @@ -20,34 +20,3 @@ class SignalSizeCase(unittest.TestCase): def test_flen_type(self): self.assertRaises(TypeError, flen, []) - - def test_fiter(self): - for i, si in enumerate(fiter(self.s)): - self.assertTrue(_same_slices(si, self.s[i])) - self.assertEqual(list(fiter(self.i)), - [(self.i >> i) & 1 for i in range(8)]) - self.assertEqual(list(fiter(self.j)), - [(self.j >> i) & 1 for i in range(8)]) - - def test_fiter_type(self): - self.assertRaises(TypeError, fiter, []) - - def test_fslice(self): - sl = slice(1, None, 2) - fslice(self.s, sl) - self.assertEqual(fslice(self.i, sl), 15) - self.assertEqual(fslice(self.j, sl), 8) - self.assertEqual(fslice(-1, 9), 1) - self.assertEqual(fslice(-1, slice(0, 4)), 0b1) - self.assertEqual(fslice(-7, slice(0, None, 1)), 0b1001) - - def test_fslice_type(self): - self.assertRaises(TypeError, fslice, [], 3) - - def test_freversed(self): - freversed(self.s) - freversed(self.i) - freversed(self.j) - - def test_freveseed_type(self): - self.assertRaises(TypeError, freversed, [])