mesa/st/tests: unify MockCodeLine* classes
authorGert Wollny <gw.fossdev@gmail.com>
Wed, 11 Oct 2017 17:56:46 +0000 (19:56 +0200)
committerBrian Paul <brianp@vmware.com>
Wed, 24 Jan 2018 17:23:00 +0000 (10:23 -0700)
commit6569b33b6eed94aa8722287344f9f06a9390e0e5
tree1dd103fb5e4657dce30ed5a417600f37e45d6430
parentad1990629e4d855101977f39319db47f51daf536
mesa/st/tests: unify MockCodeLine* classes

 * Merge the classes MockCodeLine and MockCodelineWithSwizzle into
   one, and  refactor tests accordingly.
 * Change memory allocations to use ralloc* interface.

 v2:
 * move the test classes into a conveniance library
 * rename the Mock* classes to Fake* since they are not really
   Mocks
 * Base assertion of correct number of src and dst registers in tests
   on what the operatand actually expects
 * Fix number of destinations in one test

 v6:
 * fix local includes using "..." insteadof <...>

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Gert Wollny <gw.fossdev@gmail.com>
src/mesa/state_tracker/tests/Makefile.am
src/mesa/state_tracker/tests/st_tests_common.cpp [new file with mode: 0644]
src/mesa/state_tracker/tests/st_tests_common.h [new file with mode: 0644]
src/mesa/state_tracker/tests/test_glsl_to_tgsi_lifetime.cpp