Conversation
Probably we should align the behavior of
Good question. I've never used this target, I assume the variable values are different between in two versions, so if the Probably we can skip this later. |
I am not sure how I could verify this, but if in v3 it is stored as a float I would assume it is represented as |
Signed-off-by: Sebitosh <soloplayerdiablo@gmail.com>
bf9a532 to
ea2b49d
Compare
|
Rebased & regenerated
I was thinking about a feature similar to the |
Description
#27
Test on target DURATION. I wrote this test to demonstrate some capabilities of the framework (it uses both the ACTIONS macro and the before generation feature).
The idea is to set a variable to 0 before starting, and then to check if the current DURATION for the phase (1 to 5) is greater than that. If it is, update the variable to the value of the matched DURATION (using MATCHED_VAR) such that the next check being performed is comparing the duration between phases. In summary, the checks are:
for phase 1: DURATION in phase 1 > 0
for phase 2-5: DURATION in phase N > DURATION in phase N-1
Assessment on V2
The 5 generated unit tests pass with no issues.
Assessment on V3 (using the not yet merged infra in #24 )
The 5 tests fail. The reason I believe is because of the difference of time granularity between V2 and V3. For V2, DURATION is evaluated as an int in microseconds. For V3, DURATION looks like it is evaluated as a float in milliseconds. This means that comparing DURATION with operator gt has a behavior that is not functional and that, to me, could be reconsidered. Here is what I can retrieve from the debug log:
The question is: does the test I wrote correctly assess the DURATION target, and if so should the behavior in V3 be changed ? If not, how should the DURATION target be tested ?