From db8f550fdaa0b9611235c3949ce7ea83438f1f65 Mon Sep 17 00:00:00 2001 From: Vadim Graboys Date: Sun, 18 Sep 2016 13:06:18 -0700 Subject: [PATCH] make Value() test more realistic --- decimal_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/decimal_test.go b/decimal_test.go index 016e57b..db232eb 100644 --- a/decimal_test.go +++ b/decimal_test.go @@ -879,17 +879,17 @@ func TestDecimal_Value(t *testing.T) { var decimalPtr *Decimal value, err := decimalPtr.Value() if err != nil { - t.Errorf("(*Decimal)() failed with message: %s", err) + t.Errorf("(*Decimal)().Value() failed with message: %s", err) } else if value != nil { t.Errorf("%v is not nil", value) } // check that normal case is handled appropriately - a := New(1234, 2) - expected := "123400" + a := New(1234, -2) + expected := "12.34" value, err = a.Value() if err != nil { - t.Errorf("Decimal(123400).Value() failed with message: %s", err) + t.Errorf("Decimal(12.34).Value() failed with message: %s", err) } else if value.(string) != expected { t.Errorf("%s does not equal to %s", a, expected) }