DescriptionCodeGen: refactor unit tests using parameterized tests
CodeGen doesn't do anything fancy like fork() or ptrace(), so it's
safe to test using just plain gtest. That also allows us to convert
the tests to use parameterized tests, so we can easily run each test
independently.
While here, also invert the structure a bit because I expect once I
rewrite and simplify CodeGen, a lot of the ProgramTestFuncs to go
away.
Lastly, for simplicity I'm leaving a lot of statements as ASSERT_TRUE
even if they could use ASSERT_EQ, etc. Again, I'm expecting some of
those to go away, so I'll worry about cleaning them up once the
unneeded asserts are gone.
BUG=414363
Committed: https://crrev.com/531a117bc26a709a89dd1316ebacaf8bb5467e07
Cr-Commit-Position: refs/heads/master@{#302482}
Patch Set 1 #
Total comments: 4
Patch Set 2 : Respond to rickyz@ feedback #Patch Set 3 : Mark gen_ as private #
Total comments: 4
Patch Set 4 : Respond to jln@ feedback #Messages
Total messages: 11 (2 generated)
|