From 0541c368070ecfca04fa15082b62cffbc592917b Mon Sep 17 00:00:00 2001 From: Nathan <148575555+nathan-artie@users.noreply.github.com> Date: Tue, 25 Jun 2024 15:43:58 -0700 Subject: [PATCH] More --- lib/debezium/decimal_test.go | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/debezium/decimal_test.go b/lib/debezium/decimal_test.go index 20000a6de..91d239bc1 100644 --- a/lib/debezium/decimal_test.go +++ b/lib/debezium/decimal_test.go @@ -70,23 +70,23 @@ func TestDecimalWithNewExponent(t *testing.T) { } func TestEncodeDecimal(t *testing.T) { - testValue := func(value string, expectedScale int32) { + testEncodeDecimal := func(value string, expectedScale int32) { bytes, scale := EncodeDecimal(mustParseDecimal(value)) result := DecodeDecimal(bytes, nil, int(scale)).String() assert.Equal(t, result, value, value) assert.Equal(t, expectedScale, scale, value) } - testValue("0", 0) - testValue("0.0", 1) - testValue("0.00", 2) - testValue("0.00000", 5) - testValue("1", 0) - testValue("1.0", 1) - testValue("-1", 0) - testValue("-1.0", 1) - testValue("145.183000000000009", 15) - testValue("-145.183000000000009", 15) + testEncodeDecimal("0", 0) + testEncodeDecimal("0.0", 1) + testEncodeDecimal("0.00", 2) + testEncodeDecimal("0.00000", 5) + testEncodeDecimal("1", 0) + testEncodeDecimal("1.0", 1) + testEncodeDecimal("-1", 0) + testEncodeDecimal("-1.0", 1) + testEncodeDecimal("145.183000000000009", 15) + testEncodeDecimal("-145.183000000000009", 15) } func TestEncodeDecimalWithScale(t *testing.T) {