diff --git a/graph/encoding/dot/encode_test.go b/graph/encoding/dot/encode_test.go index 1b598147..d6c58f6d 100644 --- a/graph/encoding/dot/encode_test.go +++ b/graph/encoding/dot/encode_test.go @@ -388,7 +388,7 @@ func undirectedSubGraphFrom(g []intset, s map[int64][]intset) graph.Graph { sub.SetEdge(ce) } } - subs[i] = subGraph{id: int64(i), Graph: sub} + subs[i] = subGraph{id: i, Graph: sub} base += int64(len(sg)) } diff --git a/graph/encoding/graphql/decode_test.go b/graph/encoding/graphql/decode_test.go index 5db4d5df..647ea364 100644 --- a/graph/encoding/graphql/decode_test.go +++ b/graph/encoding/graphql/decode_test.go @@ -175,7 +175,7 @@ type node struct { } func (n *node) ID() int64 { return int64(n.id) } -func (n *node) DOTID() string { return fmt.Sprintf("0x%016x", uint64(n.id)) } +func (n *node) DOTID() string { return fmt.Sprintf("0x%016x", n.id) } func (n *node) SetIDFromString(uid string) error { if !strings.HasPrefix(uid, "0x") { diff --git a/graph/network/distance_test.go b/graph/network/distance_test.go index a0680d58..38e77b23 100644 --- a/graph/network/distance_test.go +++ b/graph/network/distance_test.go @@ -356,7 +356,7 @@ func TestDistanceCentralityDirected(t *testing.T) { if !scalar.EqualWithinAbsOrRel(got[int64(n)], 1/test.farness[int64(n)], tol, tol) { want := make(map[int64]float64) for n, v := range test.farness { - want[int64(n)] = 1 / v + want[n] = 1 / v } t.Errorf("unexpected closeness centrality for test %d:\ngot: %v\nwant:%v", i, orderedFloats(got, prec), orderedFloats(want, prec)) diff --git a/graph/topo/topo_test.go b/graph/topo/topo_test.go index 9478b2a6..27a5f108 100644 --- a/graph/topo/topo_test.go +++ b/graph/topo/topo_test.go @@ -75,7 +75,7 @@ func TestPathExistsInUndirected(t *testing.T) { g.AddNode(simple.Node(u)) } for v := range e { - if g.Node(int64(v)) == nil { + if g.Node(v) == nil { g.AddNode(simple.Node(v)) } g.SetEdge(simple.Edge{F: simple.Node(u), T: simple.Node(v)}) @@ -114,7 +114,7 @@ func TestPathExistsInDirected(t *testing.T) { g.AddNode(simple.Node(u)) } for v := range e { - if g.Node(int64(v)) == nil { + if g.Node(v) == nil { g.AddNode(simple.Node(v)) } g.SetEdge(simple.Edge{F: simple.Node(u), T: simple.Node(v)}) @@ -151,7 +151,7 @@ func TestConnectedComponents(t *testing.T) { g.AddNode(simple.Node(u)) } for v := range e { - if g.Node(int64(v)) == nil { + if g.Node(v) == nil { g.AddNode(simple.Node(v)) } g.SetEdge(simple.Edge{F: simple.Node(u), T: simple.Node(v)}) diff --git a/internal/asm/c128/stubs_test.go b/internal/asm/c128/stubs_test.go index cce57022..48a137ba 100644 --- a/internal/asm/c128/stubs_test.go +++ b/internal/asm/c128/stubs_test.go @@ -250,8 +250,8 @@ func TestAxpyInc(t *testing.T) { x, y := test.x[xgLn:len(test.x)-xgLn], test.y[ygLn:len(test.y)-ygLn] AxpyInc(test.a, x, y, uintptr(len(test.ex)), uintptr(test.incX), uintptr(test.incY), test.ix, test.iy) for i := range test.ex { - if y[int(test.iy)+i*int(test.incY)] != test.ex[i] { - t.Errorf("Test %d Unexpected result at %d Got: %v Expected: %v", cas, i, y[i*int(test.incY)], test.ex[i]) + if y[int(test.iy)+i*test.incY] != test.ex[i] { + t.Errorf("Test %d Unexpected result at %d Got: %v Expected: %v", cas, i, y[i*test.incY], test.ex[i]) } } checkValidIncGuard(t, test.x, xGdVal, test.incX, xgLn) @@ -269,8 +269,8 @@ func TestAxpyIncTo(t *testing.T) { dst := test.dst[xgLn : len(test.dst)-xgLn] AxpyIncTo(dst, uintptr(test.incDst), test.idst, test.a, x, y, uintptr(len(test.ex)), uintptr(test.incX), uintptr(test.incY), test.ix, test.iy) for i := range test.ex { - if dst[int(test.idst)+i*int(test.incDst)] != test.ex[i] { - t.Errorf("Test %d Unexpected result at %d Got: %v Expected: %v", cas, i, dst[i*int(test.incDst)], test.ex[i]) + if dst[int(test.idst)+i*test.incDst] != test.ex[i] { + t.Errorf("Test %d Unexpected result at %d Got: %v Expected: %v", cas, i, dst[i*test.incDst], test.ex[i]) } } checkValidIncGuard(t, test.x, xGdVal, test.incX, xgLn) diff --git a/internal/asm/c64/stubs_test.go b/internal/asm/c64/stubs_test.go index 0cc08315..bd2f1db4 100644 --- a/internal/asm/c64/stubs_test.go +++ b/internal/asm/c64/stubs_test.go @@ -249,8 +249,8 @@ func TestAxpyInc(t *testing.T) { x, y := test.x[xgLn:len(test.x)-xgLn], test.y[ygLn:len(test.y)-ygLn] AxpyInc(test.a, x, y, uintptr(len(test.ex)), uintptr(test.incX), uintptr(test.incY), test.ix, test.iy) for i := range test.ex { - if y[int(test.iy)+i*int(test.incY)] != test.ex[i] { - t.Errorf("Test %d Unexpected result at %d Got: %v Expected: %v", cas, i, y[i*int(test.incY)], test.ex[i]) + if y[int(test.iy)+i*test.incY] != test.ex[i] { + t.Errorf("Test %d Unexpected result at %d Got: %v Expected: %v", cas, i, y[i*test.incY], test.ex[i]) } } checkValidIncGuard(t, test.x, xGdVal, test.incX, xgLn) @@ -268,8 +268,8 @@ func TestAxpyIncTo(t *testing.T) { dst := test.dst[xgLn : len(test.dst)-xgLn] AxpyIncTo(dst, uintptr(test.incDst), test.idst, test.a, x, y, uintptr(len(test.ex)), uintptr(test.incX), uintptr(test.incY), test.ix, test.iy) for i := range test.ex { - if dst[int(test.idst)+i*int(test.incDst)] != test.ex[i] { - t.Errorf("Test %d Unexpected result at %d Got: %v Expected: %v", cas, i, dst[i*int(test.incDst)], test.ex[i]) + if dst[int(test.idst)+i*test.incDst] != test.ex[i] { + t.Errorf("Test %d Unexpected result at %d Got: %v Expected: %v", cas, i, dst[i*test.incDst], test.ex[i]) } } checkValidIncGuard(t, test.x, xGdVal, test.incX, xgLn) diff --git a/internal/asm/f64/benchScal_test.go b/internal/asm/f64/benchScal_test.go index b9009beb..69355198 100644 --- a/internal/asm/f64/benchScal_test.go +++ b/internal/asm/f64/benchScal_test.go @@ -31,7 +31,7 @@ func BenchmarkScalUnitaryTo(t *testing.B) { tstName := "ScalUnitaryTo" for _, ln := range uniScal { t.Run(fmt.Sprintf("%s-%d", tstName, ln), func(b *testing.B) { - b.SetBytes(int64(64 * ln)) + b.SetBytes(64 * ln) x, y := x[:ln], y[:ln] b.ResetTimer() for i := 0; i < b.N; i++ { diff --git a/lapack/testlapack/test_matrices.go b/lapack/testlapack/test_matrices.go index 39045c23..d779e928 100644 --- a/lapack/testlapack/test_matrices.go +++ b/lapack/testlapack/test_matrices.go @@ -402,7 +402,7 @@ func (h Hanowa) Eigenvalues() []complex128 { if h.N&0x1 != 0 { panic("lapack: matrix order must be even") } - n := int(h.N) + n := h.N ev := make([]complex128, n) for i := 0; i < n/2; i++ { ev[2*i] = complex(h.Alpha, float64(-i-1)) @@ -495,7 +495,7 @@ func (t Tris) Matrix() blas64.General { } func (t Tris) Eigenvalues() []complex128 { - n := int(t.N) + n := t.N ev := make([]complex128, n) for i := range ev { angle := float64(i+1) * math.Pi / float64(n+1) diff --git a/stat/card/card_test.go b/stat/card/card_test.go index ced5c50b..c38c4719 100644 --- a/stat/card/card_test.go +++ b/stat/card/card_test.go @@ -188,7 +188,7 @@ func TestResetCounters(t *testing.T) { var counts [2]float64 for k := range counts { rnd := rand.New(rand.NewSource(1)) - for i := 0; i < int(test.count); i++ { + for i := 0; i < test.count; i++ { dst = strconv.AppendUint(dst[:0], rnd.Uint64(), 16) dst = append(dst, '-') dst = strconv.AppendUint(dst, uint64(i), 16) @@ -280,7 +280,7 @@ func TestBinaryEncoding(t *testing.T) { for _, test := range counterEncoderTests { rnd := rand.New(rand.NewSource(1)) src := test.src() - for i := 0; i < int(test.count); i++ { + for i := 0; i < test.count; i++ { buf := strconv.AppendUint(nil, rnd.Uint64(), 16) buf = append(buf, '-') buf = strconv.AppendUint(buf, uint64(i), 16) @@ -408,7 +408,7 @@ func BenchmarkCounters(b *testing.B) { var dst []byte b.Run(bench.name, func(b *testing.B) { for i := 0; i < b.N; i++ { - for j := 0; j < int(bench.count); j++ { + for j := 0; j < bench.count; j++ { dst = strconv.AppendUint(dst[:0], rnd.Uint64(), 16) dst = append(dst, '-') dst = strconv.AppendUint(dst, uint64(j), 16) diff --git a/unit/absorbedradioactivedose_test.go b/unit/absorbedradioactivedose_test.go index d1c3ee31..8cc1bdad 100644 --- a/unit/absorbedradioactivedose_test.go +++ b/unit/absorbedradioactivedose_test.go @@ -20,7 +20,7 @@ func TestAbsorbedRadioactiveDose(t *testing.T) { t.Errorf("unexpected error for %T conversion: %v", got, err) } if got != AbsorbedRadioactiveDose(value) { - t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, float64(value), got, value) + t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, value, got, value) } if got != got.AbsorbedRadioactiveDose() { t.Errorf("unexpected result from self interface method call: got: %#v want: %#v", got, value) @@ -49,7 +49,7 @@ func TestAbsorbedRadioactiveDoseFormat(t *testing.T) { } { got := fmt.Sprintf(test.format, test.value) if got != test.want { - t.Errorf("Format %q %v: got: %q want: %q", test.format, float64(test.value), got, test.want) + t.Errorf("Format %q %v: got: %q want: %q", test.format, test.value, got, test.want) } } } diff --git a/unit/acceleration_test.go b/unit/acceleration_test.go index fdb42be8..ac27405e 100644 --- a/unit/acceleration_test.go +++ b/unit/acceleration_test.go @@ -20,7 +20,7 @@ func TestAcceleration(t *testing.T) { t.Errorf("unexpected error for %T conversion: %v", got, err) } if got != Acceleration(value) { - t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, float64(value), got, value) + t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, value, got, value) } if got != got.Acceleration() { t.Errorf("unexpected result from self interface method call: got: %#v want: %#v", got, value) @@ -49,7 +49,7 @@ func TestAccelerationFormat(t *testing.T) { } { got := fmt.Sprintf(test.format, test.value) if got != test.want { - t.Errorf("Format %q %v: got: %q want: %q", test.format, float64(test.value), got, test.want) + t.Errorf("Format %q %v: got: %q want: %q", test.format, test.value, got, test.want) } } } diff --git a/unit/angle_test.go b/unit/angle_test.go index faecfae0..e68d2334 100644 --- a/unit/angle_test.go +++ b/unit/angle_test.go @@ -20,7 +20,7 @@ func TestAngle(t *testing.T) { t.Errorf("unexpected error for %T conversion: %v", got, err) } if got != Angle(value) { - t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, float64(value), got, value) + t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, value, got, value) } if got != got.Angle() { t.Errorf("unexpected result from self interface method call: got: %#v want: %#v", got, value) @@ -49,7 +49,7 @@ func TestAngleFormat(t *testing.T) { } { got := fmt.Sprintf(test.format, test.value) if got != test.want { - t.Errorf("Format %q %v: got: %q want: %q", test.format, float64(test.value), got, test.want) + t.Errorf("Format %q %v: got: %q want: %q", test.format, test.value, got, test.want) } } } diff --git a/unit/area_test.go b/unit/area_test.go index 39ab0f01..23ba202e 100644 --- a/unit/area_test.go +++ b/unit/area_test.go @@ -20,7 +20,7 @@ func TestArea(t *testing.T) { t.Errorf("unexpected error for %T conversion: %v", got, err) } if got != Area(value) { - t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, float64(value), got, value) + t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, value, got, value) } if got != got.Area() { t.Errorf("unexpected result from self interface method call: got: %#v want: %#v", got, value) @@ -49,7 +49,7 @@ func TestAreaFormat(t *testing.T) { } { got := fmt.Sprintf(test.format, test.value) if got != test.want { - t.Errorf("Format %q %v: got: %q want: %q", test.format, float64(test.value), got, test.want) + t.Errorf("Format %q %v: got: %q want: %q", test.format, test.value, got, test.want) } } } diff --git a/unit/capacitance_test.go b/unit/capacitance_test.go index 943ac700..90fcfaa3 100644 --- a/unit/capacitance_test.go +++ b/unit/capacitance_test.go @@ -20,7 +20,7 @@ func TestCapacitance(t *testing.T) { t.Errorf("unexpected error for %T conversion: %v", got, err) } if got != Capacitance(value) { - t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, float64(value), got, value) + t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, value, got, value) } if got != got.Capacitance() { t.Errorf("unexpected result from self interface method call: got: %#v want: %#v", got, value) @@ -49,7 +49,7 @@ func TestCapacitanceFormat(t *testing.T) { } { got := fmt.Sprintf(test.format, test.value) if got != test.want { - t.Errorf("Format %q %v: got: %q want: %q", test.format, float64(test.value), got, test.want) + t.Errorf("Format %q %v: got: %q want: %q", test.format, test.value, got, test.want) } } } diff --git a/unit/charge_test.go b/unit/charge_test.go index 049b4dad..e2e634b2 100644 --- a/unit/charge_test.go +++ b/unit/charge_test.go @@ -20,7 +20,7 @@ func TestCharge(t *testing.T) { t.Errorf("unexpected error for %T conversion: %v", got, err) } if got != Charge(value) { - t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, float64(value), got, value) + t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, value, got, value) } if got != got.Charge() { t.Errorf("unexpected result from self interface method call: got: %#v want: %#v", got, value) @@ -49,7 +49,7 @@ func TestChargeFormat(t *testing.T) { } { got := fmt.Sprintf(test.format, test.value) if got != test.want { - t.Errorf("Format %q %v: got: %q want: %q", test.format, float64(test.value), got, test.want) + t.Errorf("Format %q %v: got: %q want: %q", test.format, test.value, got, test.want) } } } diff --git a/unit/conductance_test.go b/unit/conductance_test.go index 57b16eb3..b226e135 100644 --- a/unit/conductance_test.go +++ b/unit/conductance_test.go @@ -20,7 +20,7 @@ func TestConductance(t *testing.T) { t.Errorf("unexpected error for %T conversion: %v", got, err) } if got != Conductance(value) { - t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, float64(value), got, value) + t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, value, got, value) } if got != got.Conductance() { t.Errorf("unexpected result from self interface method call: got: %#v want: %#v", got, value) @@ -49,7 +49,7 @@ func TestConductanceFormat(t *testing.T) { } { got := fmt.Sprintf(test.format, test.value) if got != test.want { - t.Errorf("Format %q %v: got: %q want: %q", test.format, float64(test.value), got, test.want) + t.Errorf("Format %q %v: got: %q want: %q", test.format, test.value, got, test.want) } } } diff --git a/unit/current_test.go b/unit/current_test.go index 80bf94cd..ffca5123 100644 --- a/unit/current_test.go +++ b/unit/current_test.go @@ -20,7 +20,7 @@ func TestCurrent(t *testing.T) { t.Errorf("unexpected error for %T conversion: %v", got, err) } if got != Current(value) { - t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, float64(value), got, value) + t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, value, got, value) } if got != got.Current() { t.Errorf("unexpected result from self interface method call: got: %#v want: %#v", got, value) @@ -49,7 +49,7 @@ func TestCurrentFormat(t *testing.T) { } { got := fmt.Sprintf(test.format, test.value) if got != test.want { - t.Errorf("Format %q %v: got: %q want: %q", test.format, float64(test.value), got, test.want) + t.Errorf("Format %q %v: got: %q want: %q", test.format, test.value, got, test.want) } } } diff --git a/unit/dimless_test.go b/unit/dimless_test.go index 07e4bb6c..77f45c58 100644 --- a/unit/dimless_test.go +++ b/unit/dimless_test.go @@ -20,7 +20,7 @@ func TestDimless(t *testing.T) { t.Errorf("unexpected error for %T conversion: %v", got, err) } if got != Dimless(value) { - t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, float64(value), got, value) + t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, value, got, value) } if got != got.Dimless() { t.Errorf("unexpected result from self interface method call: got: %#v want: %#v", got, value) @@ -49,7 +49,7 @@ func TestDimlessFormat(t *testing.T) { } { got := fmt.Sprintf(test.format, test.value) if got != test.want { - t.Errorf("Format %q %v: got: %q want: %q", test.format, float64(test.value), got, test.want) + t.Errorf("Format %q %v: got: %q want: %q", test.format, test.value, got, test.want) } } } diff --git a/unit/energy_test.go b/unit/energy_test.go index aa2f8103..0dc44701 100644 --- a/unit/energy_test.go +++ b/unit/energy_test.go @@ -20,7 +20,7 @@ func TestEnergy(t *testing.T) { t.Errorf("unexpected error for %T conversion: %v", got, err) } if got != Energy(value) { - t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, float64(value), got, value) + t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, value, got, value) } if got != got.Energy() { t.Errorf("unexpected result from self interface method call: got: %#v want: %#v", got, value) @@ -49,7 +49,7 @@ func TestEnergyFormat(t *testing.T) { } { got := fmt.Sprintf(test.format, test.value) if got != test.want { - t.Errorf("Format %q %v: got: %q want: %q", test.format, float64(test.value), got, test.want) + t.Errorf("Format %q %v: got: %q want: %q", test.format, test.value, got, test.want) } } } diff --git a/unit/equivalentradioactivedose_test.go b/unit/equivalentradioactivedose_test.go index 81ebb49a..ddd7d82b 100644 --- a/unit/equivalentradioactivedose_test.go +++ b/unit/equivalentradioactivedose_test.go @@ -20,7 +20,7 @@ func TestEquivalentRadioactiveDose(t *testing.T) { t.Errorf("unexpected error for %T conversion: %v", got, err) } if got != EquivalentRadioactiveDose(value) { - t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, float64(value), got, value) + t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, value, got, value) } if got != got.EquivalentRadioactiveDose() { t.Errorf("unexpected result from self interface method call: got: %#v want: %#v", got, value) @@ -49,7 +49,7 @@ func TestEquivalentRadioactiveDoseFormat(t *testing.T) { } { got := fmt.Sprintf(test.format, test.value) if got != test.want { - t.Errorf("Format %q %v: got: %q want: %q", test.format, float64(test.value), got, test.want) + t.Errorf("Format %q %v: got: %q want: %q", test.format, test.value, got, test.want) } } } diff --git a/unit/force_test.go b/unit/force_test.go index d4b1bc9f..c5d12911 100644 --- a/unit/force_test.go +++ b/unit/force_test.go @@ -20,7 +20,7 @@ func TestForce(t *testing.T) { t.Errorf("unexpected error for %T conversion: %v", got, err) } if got != Force(value) { - t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, float64(value), got, value) + t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, value, got, value) } if got != got.Force() { t.Errorf("unexpected result from self interface method call: got: %#v want: %#v", got, value) @@ -49,7 +49,7 @@ func TestForceFormat(t *testing.T) { } { got := fmt.Sprintf(test.format, test.value) if got != test.want { - t.Errorf("Format %q %v: got: %q want: %q", test.format, float64(test.value), got, test.want) + t.Errorf("Format %q %v: got: %q want: %q", test.format, test.value, got, test.want) } } } diff --git a/unit/frequency_test.go b/unit/frequency_test.go index 891ab72f..15448cf0 100644 --- a/unit/frequency_test.go +++ b/unit/frequency_test.go @@ -20,7 +20,7 @@ func TestFrequency(t *testing.T) { t.Errorf("unexpected error for %T conversion: %v", got, err) } if got != Frequency(value) { - t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, float64(value), got, value) + t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, value, got, value) } if got != got.Frequency() { t.Errorf("unexpected result from self interface method call: got: %#v want: %#v", got, value) @@ -49,7 +49,7 @@ func TestFrequencyFormat(t *testing.T) { } { got := fmt.Sprintf(test.format, test.value) if got != test.want { - t.Errorf("Format %q %v: got: %q want: %q", test.format, float64(test.value), got, test.want) + t.Errorf("Format %q %v: got: %q want: %q", test.format, test.value, got, test.want) } } } diff --git a/unit/generate_unit.go b/unit/generate_unit.go index 03c2014e..9acb34b2 100644 --- a/unit/generate_unit.go +++ b/unit/generate_unit.go @@ -604,7 +604,7 @@ func Test{{.DimensionName}}(t *testing.T) { t.Errorf("unexpected error for %T conversion: %v", got, err) } if got != {{.DimensionName}}(value) { - t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, float64(value), got, value) + t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, value, got, value) } if got != got.{{.DimensionName}}() { t.Errorf("unexpected result from self interface method call: got: %#v want: %#v", got, value) @@ -633,7 +633,7 @@ func Test{{.DimensionName}}Format(t *testing.T) { } { got := fmt.Sprintf(test.format, test.value) if got != test.want { - t.Errorf("Format %q %v: got: %q want: %q", test.format, float64(test.value), got, test.want) + t.Errorf("Format %q %v: got: %q want: %q", test.format, test.value, got, test.want) } } } diff --git a/unit/inductance_test.go b/unit/inductance_test.go index 019889e8..fa64abc5 100644 --- a/unit/inductance_test.go +++ b/unit/inductance_test.go @@ -20,7 +20,7 @@ func TestInductance(t *testing.T) { t.Errorf("unexpected error for %T conversion: %v", got, err) } if got != Inductance(value) { - t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, float64(value), got, value) + t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, value, got, value) } if got != got.Inductance() { t.Errorf("unexpected result from self interface method call: got: %#v want: %#v", got, value) @@ -49,7 +49,7 @@ func TestInductanceFormat(t *testing.T) { } { got := fmt.Sprintf(test.format, test.value) if got != test.want { - t.Errorf("Format %q %v: got: %q want: %q", test.format, float64(test.value), got, test.want) + t.Errorf("Format %q %v: got: %q want: %q", test.format, test.value, got, test.want) } } } diff --git a/unit/length_test.go b/unit/length_test.go index fa06eadf..a97ebd19 100644 --- a/unit/length_test.go +++ b/unit/length_test.go @@ -20,7 +20,7 @@ func TestLength(t *testing.T) { t.Errorf("unexpected error for %T conversion: %v", got, err) } if got != Length(value) { - t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, float64(value), got, value) + t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, value, got, value) } if got != got.Length() { t.Errorf("unexpected result from self interface method call: got: %#v want: %#v", got, value) @@ -49,7 +49,7 @@ func TestLengthFormat(t *testing.T) { } { got := fmt.Sprintf(test.format, test.value) if got != test.want { - t.Errorf("Format %q %v: got: %q want: %q", test.format, float64(test.value), got, test.want) + t.Errorf("Format %q %v: got: %q want: %q", test.format, test.value, got, test.want) } } } diff --git a/unit/luminousintensity_test.go b/unit/luminousintensity_test.go index d70d3980..4ea850a9 100644 --- a/unit/luminousintensity_test.go +++ b/unit/luminousintensity_test.go @@ -20,7 +20,7 @@ func TestLuminousIntensity(t *testing.T) { t.Errorf("unexpected error for %T conversion: %v", got, err) } if got != LuminousIntensity(value) { - t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, float64(value), got, value) + t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, value, got, value) } if got != got.LuminousIntensity() { t.Errorf("unexpected result from self interface method call: got: %#v want: %#v", got, value) @@ -49,7 +49,7 @@ func TestLuminousIntensityFormat(t *testing.T) { } { got := fmt.Sprintf(test.format, test.value) if got != test.want { - t.Errorf("Format %q %v: got: %q want: %q", test.format, float64(test.value), got, test.want) + t.Errorf("Format %q %v: got: %q want: %q", test.format, test.value, got, test.want) } } } diff --git a/unit/magneticflux_test.go b/unit/magneticflux_test.go index 2d4a4473..1a502a8d 100644 --- a/unit/magneticflux_test.go +++ b/unit/magneticflux_test.go @@ -20,7 +20,7 @@ func TestMagneticFlux(t *testing.T) { t.Errorf("unexpected error for %T conversion: %v", got, err) } if got != MagneticFlux(value) { - t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, float64(value), got, value) + t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, value, got, value) } if got != got.MagneticFlux() { t.Errorf("unexpected result from self interface method call: got: %#v want: %#v", got, value) @@ -49,7 +49,7 @@ func TestMagneticFluxFormat(t *testing.T) { } { got := fmt.Sprintf(test.format, test.value) if got != test.want { - t.Errorf("Format %q %v: got: %q want: %q", test.format, float64(test.value), got, test.want) + t.Errorf("Format %q %v: got: %q want: %q", test.format, test.value, got, test.want) } } } diff --git a/unit/magneticfluxdensity_test.go b/unit/magneticfluxdensity_test.go index 5d121765..65f3b841 100644 --- a/unit/magneticfluxdensity_test.go +++ b/unit/magneticfluxdensity_test.go @@ -20,7 +20,7 @@ func TestMagneticFluxDensity(t *testing.T) { t.Errorf("unexpected error for %T conversion: %v", got, err) } if got != MagneticFluxDensity(value) { - t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, float64(value), got, value) + t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, value, got, value) } if got != got.MagneticFluxDensity() { t.Errorf("unexpected result from self interface method call: got: %#v want: %#v", got, value) @@ -49,7 +49,7 @@ func TestMagneticFluxDensityFormat(t *testing.T) { } { got := fmt.Sprintf(test.format, test.value) if got != test.want { - t.Errorf("Format %q %v: got: %q want: %q", test.format, float64(test.value), got, test.want) + t.Errorf("Format %q %v: got: %q want: %q", test.format, test.value, got, test.want) } } } diff --git a/unit/mass_test.go b/unit/mass_test.go index 3e0d0ea2..a3522cb1 100644 --- a/unit/mass_test.go +++ b/unit/mass_test.go @@ -20,7 +20,7 @@ func TestMass(t *testing.T) { t.Errorf("unexpected error for %T conversion: %v", got, err) } if got != Mass(value) { - t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, float64(value), got, value) + t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, value, got, value) } if got != got.Mass() { t.Errorf("unexpected result from self interface method call: got: %#v want: %#v", got, value) @@ -49,7 +49,7 @@ func TestMassFormat(t *testing.T) { } { got := fmt.Sprintf(test.format, test.value) if got != test.want { - t.Errorf("Format %q %v: got: %q want: %q", test.format, float64(test.value), got, test.want) + t.Errorf("Format %q %v: got: %q want: %q", test.format, test.value, got, test.want) } } } diff --git a/unit/mole_test.go b/unit/mole_test.go index 67add35e..cae6cf05 100644 --- a/unit/mole_test.go +++ b/unit/mole_test.go @@ -20,7 +20,7 @@ func TestMole(t *testing.T) { t.Errorf("unexpected error for %T conversion: %v", got, err) } if got != Mole(value) { - t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, float64(value), got, value) + t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, value, got, value) } if got != got.Mole() { t.Errorf("unexpected result from self interface method call: got: %#v want: %#v", got, value) @@ -49,7 +49,7 @@ func TestMoleFormat(t *testing.T) { } { got := fmt.Sprintf(test.format, test.value) if got != test.want { - t.Errorf("Format %q %v: got: %q want: %q", test.format, float64(test.value), got, test.want) + t.Errorf("Format %q %v: got: %q want: %q", test.format, test.value, got, test.want) } } } diff --git a/unit/power_test.go b/unit/power_test.go index 639f3fc0..cae81862 100644 --- a/unit/power_test.go +++ b/unit/power_test.go @@ -20,7 +20,7 @@ func TestPower(t *testing.T) { t.Errorf("unexpected error for %T conversion: %v", got, err) } if got != Power(value) { - t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, float64(value), got, value) + t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, value, got, value) } if got != got.Power() { t.Errorf("unexpected result from self interface method call: got: %#v want: %#v", got, value) @@ -49,7 +49,7 @@ func TestPowerFormat(t *testing.T) { } { got := fmt.Sprintf(test.format, test.value) if got != test.want { - t.Errorf("Format %q %v: got: %q want: %q", test.format, float64(test.value), got, test.want) + t.Errorf("Format %q %v: got: %q want: %q", test.format, test.value, got, test.want) } } } diff --git a/unit/pressure_test.go b/unit/pressure_test.go index 35345f03..a890c587 100644 --- a/unit/pressure_test.go +++ b/unit/pressure_test.go @@ -20,7 +20,7 @@ func TestPressure(t *testing.T) { t.Errorf("unexpected error for %T conversion: %v", got, err) } if got != Pressure(value) { - t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, float64(value), got, value) + t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, value, got, value) } if got != got.Pressure() { t.Errorf("unexpected result from self interface method call: got: %#v want: %#v", got, value) @@ -49,7 +49,7 @@ func TestPressureFormat(t *testing.T) { } { got := fmt.Sprintf(test.format, test.value) if got != test.want { - t.Errorf("Format %q %v: got: %q want: %q", test.format, float64(test.value), got, test.want) + t.Errorf("Format %q %v: got: %q want: %q", test.format, test.value, got, test.want) } } } diff --git a/unit/radioactivity_test.go b/unit/radioactivity_test.go index 4aaeaa2c..552f5120 100644 --- a/unit/radioactivity_test.go +++ b/unit/radioactivity_test.go @@ -20,7 +20,7 @@ func TestRadioactivity(t *testing.T) { t.Errorf("unexpected error for %T conversion: %v", got, err) } if got != Radioactivity(value) { - t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, float64(value), got, value) + t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, value, got, value) } if got != got.Radioactivity() { t.Errorf("unexpected result from self interface method call: got: %#v want: %#v", got, value) @@ -49,7 +49,7 @@ func TestRadioactivityFormat(t *testing.T) { } { got := fmt.Sprintf(test.format, test.value) if got != test.want { - t.Errorf("Format %q %v: got: %q want: %q", test.format, float64(test.value), got, test.want) + t.Errorf("Format %q %v: got: %q want: %q", test.format, test.value, got, test.want) } } } diff --git a/unit/resistance_test.go b/unit/resistance_test.go index 47c0bd99..9f2d8494 100644 --- a/unit/resistance_test.go +++ b/unit/resistance_test.go @@ -20,7 +20,7 @@ func TestResistance(t *testing.T) { t.Errorf("unexpected error for %T conversion: %v", got, err) } if got != Resistance(value) { - t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, float64(value), got, value) + t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, value, got, value) } if got != got.Resistance() { t.Errorf("unexpected result from self interface method call: got: %#v want: %#v", got, value) @@ -49,7 +49,7 @@ func TestResistanceFormat(t *testing.T) { } { got := fmt.Sprintf(test.format, test.value) if got != test.want { - t.Errorf("Format %q %v: got: %q want: %q", test.format, float64(test.value), got, test.want) + t.Errorf("Format %q %v: got: %q want: %q", test.format, test.value, got, test.want) } } } diff --git a/unit/temperature_test.go b/unit/temperature_test.go index cea1b999..b77bb853 100644 --- a/unit/temperature_test.go +++ b/unit/temperature_test.go @@ -20,7 +20,7 @@ func TestTemperature(t *testing.T) { t.Errorf("unexpected error for %T conversion: %v", got, err) } if got != Temperature(value) { - t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, float64(value), got, value) + t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, value, got, value) } if got != got.Temperature() { t.Errorf("unexpected result from self interface method call: got: %#v want: %#v", got, value) @@ -49,7 +49,7 @@ func TestTemperatureFormat(t *testing.T) { } { got := fmt.Sprintf(test.format, test.value) if got != test.want { - t.Errorf("Format %q %v: got: %q want: %q", test.format, float64(test.value), got, test.want) + t.Errorf("Format %q %v: got: %q want: %q", test.format, test.value, got, test.want) } } } diff --git a/unit/time_test.go b/unit/time_test.go index 3b7fe3d4..a09ca23d 100644 --- a/unit/time_test.go +++ b/unit/time_test.go @@ -20,7 +20,7 @@ func TestTime(t *testing.T) { t.Errorf("unexpected error for %T conversion: %v", got, err) } if got != Time(value) { - t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, float64(value), got, value) + t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, value, got, value) } if got != got.Time() { t.Errorf("unexpected result from self interface method call: got: %#v want: %#v", got, value) @@ -49,7 +49,7 @@ func TestTimeFormat(t *testing.T) { } { got := fmt.Sprintf(test.format, test.value) if got != test.want { - t.Errorf("Format %q %v: got: %q want: %q", test.format, float64(test.value), got, test.want) + t.Errorf("Format %q %v: got: %q want: %q", test.format, test.value, got, test.want) } } } diff --git a/unit/torque_test.go b/unit/torque_test.go index df814550..cee4de3f 100644 --- a/unit/torque_test.go +++ b/unit/torque_test.go @@ -20,7 +20,7 @@ func TestTorque(t *testing.T) { t.Errorf("unexpected error for %T conversion: %v", got, err) } if got != Torque(value) { - t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, float64(value), got, value) + t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, value, got, value) } if got != got.Torque() { t.Errorf("unexpected result from self interface method call: got: %#v want: %#v", got, value) @@ -49,7 +49,7 @@ func TestTorqueFormat(t *testing.T) { } { got := fmt.Sprintf(test.format, test.value) if got != test.want { - t.Errorf("Format %q %v: got: %q want: %q", test.format, float64(test.value), got, test.want) + t.Errorf("Format %q %v: got: %q want: %q", test.format, test.value, got, test.want) } } } diff --git a/unit/velocity_test.go b/unit/velocity_test.go index 599db610..bf257743 100644 --- a/unit/velocity_test.go +++ b/unit/velocity_test.go @@ -20,7 +20,7 @@ func TestVelocity(t *testing.T) { t.Errorf("unexpected error for %T conversion: %v", got, err) } if got != Velocity(value) { - t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, float64(value), got, value) + t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, value, got, value) } if got != got.Velocity() { t.Errorf("unexpected result from self interface method call: got: %#v want: %#v", got, value) @@ -49,7 +49,7 @@ func TestVelocityFormat(t *testing.T) { } { got := fmt.Sprintf(test.format, test.value) if got != test.want { - t.Errorf("Format %q %v: got: %q want: %q", test.format, float64(test.value), got, test.want) + t.Errorf("Format %q %v: got: %q want: %q", test.format, test.value, got, test.want) } } } diff --git a/unit/voltage_test.go b/unit/voltage_test.go index b531e7f1..686e49d1 100644 --- a/unit/voltage_test.go +++ b/unit/voltage_test.go @@ -20,7 +20,7 @@ func TestVoltage(t *testing.T) { t.Errorf("unexpected error for %T conversion: %v", got, err) } if got != Voltage(value) { - t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, float64(value), got, value) + t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, value, got, value) } if got != got.Voltage() { t.Errorf("unexpected result from self interface method call: got: %#v want: %#v", got, value) @@ -49,7 +49,7 @@ func TestVoltageFormat(t *testing.T) { } { got := fmt.Sprintf(test.format, test.value) if got != test.want { - t.Errorf("Format %q %v: got: %q want: %q", test.format, float64(test.value), got, test.want) + t.Errorf("Format %q %v: got: %q want: %q", test.format, test.value, got, test.want) } } } diff --git a/unit/volume_test.go b/unit/volume_test.go index f84a33c2..fb0d36bc 100644 --- a/unit/volume_test.go +++ b/unit/volume_test.go @@ -20,7 +20,7 @@ func TestVolume(t *testing.T) { t.Errorf("unexpected error for %T conversion: %v", got, err) } if got != Volume(value) { - t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, float64(value), got, value) + t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, value, got, value) } if got != got.Volume() { t.Errorf("unexpected result from self interface method call: got: %#v want: %#v", got, value) @@ -49,7 +49,7 @@ func TestVolumeFormat(t *testing.T) { } { got := fmt.Sprintf(test.format, test.value) if got != test.want { - t.Errorf("Format %q %v: got: %q want: %q", test.format, float64(test.value), got, test.want) + t.Errorf("Format %q %v: got: %q want: %q", test.format, test.value, got, test.want) } } }