[Piglit] [RFC 03/12] gen_builtin_uniform_tests.py: fix docstring formatting

Dylan Baker baker.dylan.c at gmail.com
Mon Dec 8 17:11:24 PST 2014


Replace block comments with a proper docstring.

Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
 generated_tests/gen_builtin_uniform_tests.py | 43 ++++++++++++++--------------
 1 file changed, 21 insertions(+), 22 deletions(-)

diff --git a/generated_tests/gen_builtin_uniform_tests.py b/generated_tests/gen_builtin_uniform_tests.py
index e304166..369db77 100644
--- a/generated_tests/gen_builtin_uniform_tests.py
+++ b/generated_tests/gen_builtin_uniform_tests.py
@@ -21,28 +21,27 @@
 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 # DEALINGS IN THE SOFTWARE.
 
-# Generate a set of shader_runner tests for every overloaded version
-# of every built-in function, based on the test vectors computed by
-# builtin_function.py.
-#
-# In each set of generated tests, one test exercises the built-in
-# function in each type of shader (vertex, geometry, and fragment).
-# In all cases, the inputs to the built-in function come from
-# uniforms, so that the effectiveness of the test won't be
-# circumvented by constant folding in the GLSL compiler.
-#
-# The tests operate by invoking the built-in function in the
-# appropriate shader, applying a scale and offset so that the expected
-# values are in the range [0.25, 0.75], and then outputting the result
-# as a solid rgba color, which is then checked using shader_runner's
-# "probe rgba" command.
-#
-# For built-in functions whose result type is a matrix, the test
-# checks one column at a time.
-#
-# This program outputs, to stdout, the name of each file it generates.
-# With the optional argument --names-only, it only outputs the names
-# of the files; it doesn't generate them.
+"""Generate a set of shader_runner tests for every overloaded version of every
+built-in function, based on the test vectors computed by builtin_function.py.
+
+In each set of generated tests, one test exercises the built-in function in
+each type of shader (vertex, geometry, and fragment).  In all cases, the inputs
+to the built-in function come from uniforms, so that the effectiveness of the
+test won't be circumvented by constant folding in the GLSL compiler.
+
+The tests operate by invoking the built-in function in the appropriate shader,
+applying a scale and offset so that the expected values are in the range [0.25,
+0.75], and then outputting the result as a solid rgba color, which is then
+checked using shader_runner's "probe rgba" command.
+
+For built-in functions whose result type is a matrix, the test checks one
+column at a time.
+
+This program outputs, to stdout, the name of each file it generates.  With the
+optional argument --names-only, it only outputs the names of the files; it
+doesn't generate them.
+
+"""
 
 import abc
 import optparse
-- 
2.2.0



More information about the Piglit mailing list