aboutsummaryrefslogtreecommitdiff
path: root/client/bid_test.go
blob: 52c4c3c752d3dbc2aefdb5a6578dfa7c041644bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package client

import (
	"testing"
)

func TestBitlengthTooLarge(t *testing.T) {
	bid, e := newBid(0xFFFFFF, 70)
	if e == nil {
		t.Fatalf("failure expected, but got bid: %#v", bid)
	}
}

func TestPriceTooLarge(t *testing.T) {
	bid, e := newBid(0xFFFFFF, 8)
	if e == nil {
		t.Fatalf("failure expected, but got bid: %#v", bid)
	}
}

func TestBidOK(t *testing.T) {
	bid, e := newBid(102400, 24)
	if e != nil {
		t.Fatalf("unexpected error: %v", e)
	}
	t.Logf("Bid: %+v", bid)
}