[Piglit] [PATCH 2/9] generated tests: Expand the range of ints and ivecs used in testing.
Paul Berry
stereotype441 at gmail.com
Mon Aug 15 11:45:23 PDT 2011
This patch adds negative and zero values to the set of ints used to
test lessThan, lessThanEqual, greaterThan, greaterThanEqual, and
equal. It also adds ivecs whose elements are all positive to the
tests for operators--these will come in handy when we add tests for %,
which is not defined for negative inputs.
---
generated_tests/builtin_function.py | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/generated_tests/builtin_function.py b/generated_tests/builtin_function.py
index efc4afa..e3ec25d 100644
--- a/generated_tests/builtin_function.py
+++ b/generated_tests/builtin_function.py
@@ -726,7 +726,7 @@ def _make_vector_relational_test_vectors(test_suite_dict):
"""
_default_inputs = {
'v': np.linspace(-1.5, 1.5, 4),
- 'i': np.array([1, 2, 3, 4]),
+ 'i': np.array([-5, -2, -1, 0, 1, 2, 5]),
'b': np.array([False, True])
}
def f(name, arity, glsl_version, python_equivalent, arg_types,
@@ -838,10 +838,14 @@ def _make_vector_or_matrix_test_vectors(test_suite_dict):
ivecs = [
np.array([38, 35]),
np.array([64, -9]),
+ np.array([64, 9]),
np.array([-36, 32, -88]),
+ np.array([36, 32, 88]),
np.array([59, 77, 68]),
np.array([-66, 72, 87, -75]),
- np.array([-24, 40, -23, 74])
+ np.array([66, 72, 87, 75]),
+ np.array([-24, 40, -23, 74]),
+ np.array([24, 40, 23, 74]),
]
nz_floats = [-1.33, 0.85]
floats = [0.0] + nz_floats
--
1.7.6
More information about the Piglit
mailing list