Skip to content

feat(scenarios): add meter-value-negative to the corpus - #189

Open
wufangyong973 wants to merge 1 commit into
ocpp-debugkit:mainfrom
wufangyong973:feat/meter-value-negative
Open

wufangyong973 wants to merge 1 commit into
ocpp-debugkit:mainfrom
wufangyong973:feat/meter-value-negative

Conversation

@wufangyong973

Copy link
Copy Markdown

closes #182

METER_VALUE_ANOMALY has two branches and only the decreasing one was covered by the corpus, so a change that dropped the negative check would have sailed through the whole suite. This adds meter-value-negative: a cumulative register that reads -50 Wh, which physically can't happen, driving the negative branch directly.

Files: the scenario itself, registered in index.ts and asserted in index.test.ts (count, name order, getScenario, and an engine run that confirms the failure fires). The external fixture test and both READMEs bump 23 to 24. A patch changeset sits in .changeset since a new scenario does add a public export.

METER_VALUE_ANOMALY has two branches and only the decreasing one was
exercised. This trace drives the register to -50 Wh, which a cumulative
register can never read, so the negative check now has a regression guard.
Registers in index.ts and index.test.ts, bumps the external fixture and
both README counts, and adds a patch changeset.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a scenario: meter-value-negative

1 participant