mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-11-17 22:23:47 +08:00
13 lines
366 B
Go
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)
|
|
}
|
|
}
|
|
}
|