Skip to content

Commit

Permalink
clean up test
Browse files Browse the repository at this point in the history
  • Loading branch information
chenyaoy committed Jun 3, 2024
1 parent 751bae7 commit 5f3e64e
Showing 1 changed file with 6 additions and 16 deletions.
22 changes: 6 additions & 16 deletions protocol/x/vault/keeper/orders_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -694,42 +694,32 @@ func TestGetVaultClobOrderClientId(t *testing.T) {
// Expected client ID.
expectedClientId uint32
}{
"Buy, Block Height Odd, Layer 1": {
"Buy, Layer 1": {
side: clobtypes.Order_SIDE_BUY, // 0<<31
layer: 1, // 1<<23
expectedClientId: 0<<31 | 1<<23,
},
"Buy, Block Height Even, Layer 1": {
side: clobtypes.Order_SIDE_BUY, // 0<<31
layer: 1, // 1<<23
expectedClientId: 0<<31 | 1<<23,
},
"Sell, Block Height Odd, Layer 2": {
side: clobtypes.Order_SIDE_SELL, // 1<<31
layer: 2, // 2<<23
expectedClientId: 1<<31 | 2<<23,
},
"Sell, Block Height Even, Layer 2": {
"Sell, Layer 2": {
side: clobtypes.Order_SIDE_SELL, // 1<<31
layer: 2, // 2<<23
expectedClientId: 1<<31 | 2<<23,
},
"Buy, Block Height Even, Layer Max Uint8": {
"Buy, Layer Max Uint8": {
side: clobtypes.Order_SIDE_BUY, // 0<<31
layer: math.MaxUint8, // 255<<23
expectedClientId: 0<<31 | 255<<23,
},
"Sell, Block Height Odd, Layer 0": {
"Sell, Layer 0": {
side: clobtypes.Order_SIDE_SELL, // 1<<31
layer: 0, // 0<<23
expectedClientId: 1<<31 | 0<<23,
},
"Sell, Block Height Odd (negative), Layer 202": {
"Sell, Layer 202": {
side: clobtypes.Order_SIDE_SELL, // 1<<31
layer: 202, // 202<<23
expectedClientId: 1<<31 | 202<<23,
},
"Buy, Block Height Even (zero), Layer 157": {
"Buy, Layer 157": {
side: clobtypes.Order_SIDE_SELL, // 1<<31
layer: 157, // 157<<23
expectedClientId: 1<<31 | 157<<23,
Expand Down

0 comments on commit 5f3e64e

Please sign in to comment.