| Input | Output |
|---|---|
python src/totals.py 10 20 12 |
42 |
python src/totals.py 50 -20 12 |
42 |
python src/totals.py |
0 |
The CLI reads integer amounts and prints their sum. The check driver launches the application and compares output with literal expected totals.
- Install VKit and Python.
- Copy this directory to a separate location.
- Initialize and commit a Git repository there.
- Run these commands from that directory:
vkit doctor --project .
vkit accept --project .
vkit check run --project . --check totals-behavior
vkit features --project .
vkit console --project .| Registered check | Cases |
|---|---|
totals-behavior |
Empty cart, one positive amount, several positive amounts, mixed signs, negative amounts, and cancellation to zero. |
- In
src/totals.py, replacerunning += amountwithrunning += amount + 1. - Run
totals-behavioragain. Cases with amounts now produce incorrect totals. - Restore the original line and rerun the check.
See the main README for installation and agent setup.