Some new tests (#440)

* Make test run

* Added new tests: sub pow constant_sub

* Fix indentation

* Added one to many lines

* Fix indentation

* Update test_cl_tiler.py

* Delete test_cl_tiler.py
This commit is contained in:
calledit 2023-01-26 00:40:19 +01:00 committed by GitHub
commit a0af1045bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -80,6 +80,22 @@ class TestSpeed(unittest.TestCase):
global prefix
prefix = " " if prefix is None else ""
return super().setUp()
def test_sub(self):
def f(a, b): return a-b
helper_test_generic_square('sub', 4096, f, f)
def test_constant_sub(self):
def f(a, b): return 1.0-a
helper_test_generic_square('sub', 4096, f, f)
def test_constant_zero_sub(self):
def f(a, b): return 0.0-a
helper_test_generic_square('sub', 4096, f, f)
def test_pow(self):
def f(a, b): return a.pow(b)
helper_test_generic_square('pow', 2048, f, f)
def test_sum(self):
def f(a, b): return a.sum()