From e0b6b9154e886be773497a5b8c4798262a5ccb41 Mon Sep 17 00:00:00 2001 From: Michael Nolan Date: Tue, 31 Mar 2020 16:55:00 -0400 Subject: [PATCH] Cleanup --- src/ieee754/cordic/test/test_sincos.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ieee754/cordic/test/test_sincos.py b/src/ieee754/cordic/test/test_sincos.py index 50d5fd53..f565b1ce 100644 --- a/src/ieee754/cordic/test/test_sincos.py +++ b/src/ieee754/cordic/test/test_sincos.py @@ -8,6 +8,7 @@ import unittest import math import random + class SinCosTestCase(FHDLTestCase): def run_test(self, zin=0, fracbits=8, expected_sin=0, expected_cos=0): @@ -59,12 +60,13 @@ class SinCosTestCase(FHDLTestCase): (sin, cos) = run_cordic(z, fracbits=fracbits, log=False) self.run_test(zin=z, fracbits=fracbits, expected_sin=sin, expected_cos=cos) + def test_0(self): self.run_test_assert(0) def test_neg(self): self.run_test_assert(-6) - + def test_rand(self): fracbits = 16 M = (1 << fracbits) @@ -72,8 +74,7 @@ class SinCosTestCase(FHDLTestCase): for i in range(500): z = random.randrange(-ZMAX, ZMAX-1) self.run_test_assert(z, fracbits=fracbits) - - + if __name__ == "__main__": unittest.main() -- 2.30.2