codec_test.gno
0.35 Kb · 13 lines
1package standings
2
3import (
4 "testing"
5
6 "gno.land/p/nt/uassert/v0"
7)
8
9func TestLadderKeyOrder(t *testing.T) {
10 uassert.True(t, ladderKey(1016, bob) < ladderKey(1000, alice), "higher rating first")
11 uassert.Equal(t, alice < bob, ladderKey(1000, alice) < ladderKey(1000, bob), "address order within a rating")
12 uassert.Equal(t, 42, len(ladderKey(0, alice)))
13}