[Piglit] [PATCH] Fix generated "op-mod" tests to actually test the modulus operator.
Paul Berry
stereotype441 at gmail.com
Sat Sep 3 08:21:22 PDT 2011
Due to a copy-paste bug on my part, the generated "op-mod" tests
actually weren't testing the "%" operator at all. They were testing
the "/" operator (and were thus identical to the "op-div" tests).
This patch fixes the tests to actually test the "%" operator.
---
generated_tests/builtin_function.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/generated_tests/builtin_function.py b/generated_tests/builtin_function.py
index 4eca6c7..690a366 100644
--- a/generated_tests/builtin_function.py
+++ b/generated_tests/builtin_function.py
@@ -1132,7 +1132,7 @@ def _make_vector_or_matrix_test_vectors(test_suite_dict):
f('op-sub', 2, '1.10', lambda x, y: x - y, match_simple_binop, [floats+vecs+mats+ints+ivecs+uints+uvecs, floats+vecs+mats+ints+ivecs+uints+uvecs], template = '({0} - {1})')
f('op-mult', 2, '1.10', _multiply, match_multiply, [floats+vecs+mats+ints+ivecs+uints+uvecs, floats+vecs+mats+ints+ivecs+uints+uvecs], template = '({0} * {1})')
f('op-div', 2, '1.10', _divide, match_simple_binop, [floats+vecs+mats+ints+ivecs+uints+uvecs, floats+vecs+mats+ints+ivecs+uints+uvecs], template = '({0} / {1})')
- f('op-mod', 2, '1.30', _divide, match_simple_binop, [ints+ivecs+uints+uvecs, ints+ivecs+uints+uvecs], template = '({0} / {1})')
+ f('op-mod', 2, '1.30', _modulus, match_simple_binop, [ints+ivecs+uints+uvecs, ints+ivecs+uints+uvecs], template = '({0} % {1})')
f('op-uplus', 1, '1.10', lambda x: +x, None, [floats+vecs+mats+ints+ivecs+uints+uvecs], template = '(+ {0})')
f('op-neg', 1, '1.10', lambda x: -x, None, [floats+vecs+mats+ints+ivecs+uints+uvecs], template = '(- {0})')
f('op-gt', 2, '1.10', lambda x, y: x > y, match_args(0, 1), [ints+uints+floats, ints+uints+floats], template = '({0} > {1})')
--
1.7.6
More information about the Piglit
mailing list