9
func Test_DefaultsToInteger(t *testing.T) {
11
expected := strconv.Itoa(int(value))
12
actual := Format(value, -1)
14
if actual != expected {
15
t.Error(fmt.Sprintf("Expected {%s} was {%s}", expected, actual))
19
func Test_CanFormatAsInteger(t *testing.T) {
21
expected := strconv.Itoa(int(value))
22
actual := Format(value, U_NO)
24
if actual != expected {
25
t.Error(fmt.Sprintf("Expected {%s} was {%s}", expected, actual))
29
func Test_CanFormatAsBytes(t *testing.T) {
32
actual := Format(value, U_BYTES)
34
if actual != expected {
35
t.Error(fmt.Sprintf("Expected {%s} was {%s}", expected, actual))