2026-09-17 18:45:39 +08:00

13 lines
366 B
Go

package model
import "testing"
func TestMsgDocModelGetLimitForSingleDoc(t *testing.T) {
model := new(MsgDocModel)
for _, test := range []struct{ seq, want int64 }{{1, 0}, {99, 98}, {100, 99}, {101, 0}} {
if got := model.GetLimitForSingleDoc(test.seq); got != test.want {
t.Errorf("GetLimitForSingleDoc(%d) = %d, want %d", test.seq, got, test.want)
}
}
}