summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Berry <stereotype441@gmail.com>2011-08-12 17:49:40 -0700
committerPaul Berry <stereotype441@gmail.com>2011-08-18 13:54:06 -0700
commit290324a3634abf4434cd5016a948a7814dd5c66f (patch)
tree15d1319bc1a85350033f9e41f7f9dd1f657382b5
parentdf0dd9a4447ad4d1c0f0d345f74ef56ccf0a95d6 (diff)
generated tests: Expand the range of ints and ivecs used in testing.
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. Reviewed-by: Chad Versace <chad@chad-versace.us>
-rw-r--r--generated_tests/builtin_function.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/generated_tests/builtin_function.py b/generated_tests/builtin_function.py
index efc4afaad..e3ec25d88 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