Skip to content

Commit

Permalink
Per-minute count check
Browse files Browse the repository at this point in the history
Signed-off-by: Lazar Cvetković <[email protected]>
  • Loading branch information
cvetkovic committed Nov 28, 2024
1 parent 2c49b49 commit 090e6a6
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions pkg/generator/specification_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,19 @@ func TestSerialGenerateIAT(t *testing.T) {
}
}

if len(test.invocations) != len(perMinuteCount) {
t.Errorf("wrong length of per-minute count, got: %d, expected: %d\n", len(perMinuteCount), len(test.invocations))
}

for i := 0; i < len(test.invocations); i++ {
if perMinuteCount[i] != test.invocations[i] {
log.Debug(fmt.Sprintf("wrong per-minute count - got: %d, expected: %d\n", perMinuteCount[i], test.invocations[i]))

failed = true
// no break statement for debugging purpose
}
}

if failed {
t.Error("Test " + test.testName + " has failed due to incorrectly generated IAT.")
}
Expand Down

0 comments on commit 090e6a6

Please sign in to comment.