ccache/item_test.go

19 lines
325 B
Go
Raw Normal View History

2013-10-19 14:36:33 +02:00
package ccache
import (
2014-10-25 02:46:18 +02:00
. "github.com/karlseguin/expect"
"testing"
2013-10-19 14:36:33 +02:00
)
2014-10-25 02:46:18 +02:00
type ItemTests struct{}
func Test_Item(t *testing.T) {
Expectify(new(ItemTests), t)
}
func (i *ItemTests) Promotability() {
item := &Item{promotions: 4}
2014-10-25 02:46:18 +02:00
Expect(item.shouldPromote(5)).To.Equal(true)
Expect(item.shouldPromote(5)).To.Equal(false)
2013-10-19 14:36:33 +02:00
}