Adding test matrix feature#599
Adding test matrix feature#599AJIOB wants to merge 6 commits intoThrowTheSwitch:masterfrom AJIOB:adding_test_matrix_feature
Conversation
Can be helpful for iterating every combination: * for usual TEST_CASE simplification Based on TEST_RANGE implementation
* (DEFINED_VALUE + 1) calls will be correctly detected now * signed numbers should be correctly detected now * regex speed improvements
|
Hello @mvandervoord, Have I lost some requirements for merging that merge? With regards, |
|
Hi Alex: I'm trying to figure out a good way to test all of this. It's going to require tests to make sure the script itself performs the job assigned, as well as that both the code using the new notation and the generated code both actually perform their job and compile without error. Also, we're going to want to make sure the documentation for the new feature gets added. These things don't all have to be on you, necessarily, but they're important for a significant feature like this. |
|
@AJIOB and @mvandervoord Was this abandoned for some other/better solution ? I'm interested in the feature, and was considering adding something to our local fork of Unity, but would rather add it to the upstream project, so if it wasn't dropped due to some other design or an incompatibility, I was contemplating brushing this PR off, getting it updated and looking at what could be done to add tests to it. |
|
I just haven't had time to get back on this, unfortunately. :( |
|
So the idea was not abandoned, so updating it (fix the conflicts) and adding tests wouldn't be a wasted effort. Then I might try and find the time to look at it |
|
@jonhenneberg -- it would not be a wasted effort. In fact, it would be much appreciated. :) |
|
This changes were already merged while PR #685, closing the current PR |
As an analog for
TEST_CASE(...)&TEST_RANGE(...), you can useTEST_MATRIX(...)for defining custom test cases.TEST_MATRIXmacro parsing can be enabled together withTEST_RANGE.Supports almost all found C & C++ literals & expressions (expect array addressing with
[], such asmy_arr[26]). Also supports multiline matrixes, ranges & cases.Examples of some tests with that usage: