You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Open-IM-Server/pkg/common/storage/model/msg_test.go

13 lines
366 B

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)
}
}
}