glsl: Add unit tests for lower_jumps.cpp
authorPaul Berry <stereotype441@gmail.com>
Tue, 5 Jul 2011 18:52:06 +0000 (11:52 -0700)
committerPaul Berry <stereotype441@gmail.com>
Fri, 22 Jul 2011 16:45:11 +0000 (09:45 -0700)
commit659cdedb532e675da5676d40ee39278aadd8f0a1
tree75e5affe4434d782ab50ed5fb2591d65ff868925
parentf1f76e157ed1ba554fc3a0172113997344049e07
glsl: Add unit tests for lower_jumps.cpp

These tests invoke do_lower_jumps() in isolation (using the glsl_test
executable) and verify that it transforms the IR in the expected way.

The unit tests may be run from the top level directory using "make
check".

For reference, I've also checked in the Python script
create_test_cases.py, which was used to generate these tests.  It is
not necessary to run this script in order to run the tests.

Acked-by: Chad Versace <chad@chad-versace.us>
54 files changed:
Makefile
src/glsl/tests/compare_ir [new file with mode: 0755]
src/glsl/tests/lower_jumps/.gitignore [new file with mode: 0644]
src/glsl/tests/lower_jumps/create_test_cases.py [new file with mode: 0644]
src/glsl/tests/lower_jumps/lower_breaks_1.opt_test [new file with mode: 0755]
src/glsl/tests/lower_jumps/lower_breaks_1.opt_test.expected [new file with mode: 0644]
src/glsl/tests/lower_jumps/lower_breaks_2.opt_test [new file with mode: 0755]
src/glsl/tests/lower_jumps/lower_breaks_2.opt_test.expected [new file with mode: 0644]
src/glsl/tests/lower_jumps/lower_breaks_3.opt_test [new file with mode: 0755]
src/glsl/tests/lower_jumps/lower_breaks_3.opt_test.expected [new file with mode: 0644]
src/glsl/tests/lower_jumps/lower_breaks_4.opt_test [new file with mode: 0755]
src/glsl/tests/lower_jumps/lower_breaks_4.opt_test.expected [new file with mode: 0644]
src/glsl/tests/lower_jumps/lower_breaks_5.opt_test [new file with mode: 0755]
src/glsl/tests/lower_jumps/lower_breaks_5.opt_test.expected [new file with mode: 0644]
src/glsl/tests/lower_jumps/lower_breaks_6.opt_test [new file with mode: 0755]
src/glsl/tests/lower_jumps/lower_breaks_6.opt_test.expected [new file with mode: 0644]
src/glsl/tests/lower_jumps/lower_guarded_conditional_break.opt_test [new file with mode: 0755]
src/glsl/tests/lower_jumps/lower_guarded_conditional_break.opt_test.expected [new file with mode: 0644]
src/glsl/tests/lower_jumps/lower_pulled_out_jump.opt_test [new file with mode: 0755]
src/glsl/tests/lower_jumps/lower_pulled_out_jump.opt_test.expected [new file with mode: 0644]
src/glsl/tests/lower_jumps/lower_returns_1.opt_test [new file with mode: 0755]
src/glsl/tests/lower_jumps/lower_returns_1.opt_test.expected [new file with mode: 0644]
src/glsl/tests/lower_jumps/lower_returns_2.opt_test [new file with mode: 0755]
src/glsl/tests/lower_jumps/lower_returns_2.opt_test.expected [new file with mode: 0644]
src/glsl/tests/lower_jumps/lower_returns_3.opt_test [new file with mode: 0755]
src/glsl/tests/lower_jumps/lower_returns_3.opt_test.expected [new file with mode: 0644]
src/glsl/tests/lower_jumps/lower_returns_4.opt_test [new file with mode: 0755]
src/glsl/tests/lower_jumps/lower_returns_4.opt_test.expected [new file with mode: 0644]
src/glsl/tests/lower_jumps/lower_returns_main_false.opt_test [new file with mode: 0755]
src/glsl/tests/lower_jumps/lower_returns_main_false.opt_test.expected [new file with mode: 0644]
src/glsl/tests/lower_jumps/lower_returns_main_true.opt_test [new file with mode: 0755]
src/glsl/tests/lower_jumps/lower_returns_main_true.opt_test.expected [new file with mode: 0644]
src/glsl/tests/lower_jumps/lower_returns_sub_false.opt_test [new file with mode: 0755]
src/glsl/tests/lower_jumps/lower_returns_sub_false.opt_test.expected [new file with mode: 0644]
src/glsl/tests/lower_jumps/lower_returns_sub_true.opt_test [new file with mode: 0755]
src/glsl/tests/lower_jumps/lower_returns_sub_true.opt_test.expected [new file with mode: 0644]
src/glsl/tests/lower_jumps/lower_unified_returns.opt_test [new file with mode: 0755]
src/glsl/tests/lower_jumps/lower_unified_returns.opt_test.expected [new file with mode: 0644]
src/glsl/tests/lower_jumps/remove_continue_at_end_of_loop.opt_test [new file with mode: 0755]
src/glsl/tests/lower_jumps/remove_continue_at_end_of_loop.opt_test.expected [new file with mode: 0644]
src/glsl/tests/lower_jumps/return_non_void_at_end_of_loop_lower_nothing.opt_test [new file with mode: 0755]
src/glsl/tests/lower_jumps/return_non_void_at_end_of_loop_lower_nothing.opt_test.expected [new file with mode: 0644]
src/glsl/tests/lower_jumps/return_non_void_at_end_of_loop_lower_return.opt_test [new file with mode: 0755]
src/glsl/tests/lower_jumps/return_non_void_at_end_of_loop_lower_return.opt_test.expected [new file with mode: 0644]
src/glsl/tests/lower_jumps/return_non_void_at_end_of_loop_lower_return_and_break.opt_test [new file with mode: 0755]
src/glsl/tests/lower_jumps/return_non_void_at_end_of_loop_lower_return_and_break.opt_test.expected [new file with mode: 0644]
src/glsl/tests/lower_jumps/return_void_at_end_of_loop_lower_nothing.opt_test [new file with mode: 0755]
src/glsl/tests/lower_jumps/return_void_at_end_of_loop_lower_nothing.opt_test.expected [new file with mode: 0644]
src/glsl/tests/lower_jumps/return_void_at_end_of_loop_lower_return.opt_test [new file with mode: 0755]
src/glsl/tests/lower_jumps/return_void_at_end_of_loop_lower_return.opt_test.expected [new file with mode: 0644]
src/glsl/tests/lower_jumps/return_void_at_end_of_loop_lower_return_and_break.opt_test [new file with mode: 0755]
src/glsl/tests/lower_jumps/return_void_at_end_of_loop_lower_return_and_break.opt_test.expected [new file with mode: 0644]
src/glsl/tests/optimization-test [new file with mode: 0755]
src/glsl/tests/sexps.py [new file with mode: 0644]