mirror of
https://github.com/wneessen/go-mail.git
synced 2024-11-21 21:30:50 +01:00
Add test for zero input in randNum
This commit introduces a new test case in random_test.go to ensure that the randNum function returns zero when given an input of zero. This helps validate the correctness of edge case handling in the random number generation logic.
This commit is contained in:
parent
0b9a215e7d
commit
3f0ac027e2
1 changed files with 7 additions and 0 deletions
|
@ -62,3 +62,10 @@ func TestRandomNum(t *testing.T) {
|
|||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestRandomNumZero(t *testing.T) {
|
||||
rn := randNum(0)
|
||||
if rn != 0 {
|
||||
t.Errorf("random number generation failed: %d is not zero", rn)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue