MCPcopy Create free account
hub / github.com/apache/fory / mustDecimal

Function mustDecimal

go/fory/decimal_test.go:28–34  ·  view source on GitHub ↗
(value string, scale int32)

Source from the content-addressed store, hash-verified

26)
27
28func mustDecimal(value string, scale int32) Decimal {
29 unscaled, ok := new(big.Int).SetString(value, 10)
30 if !ok {
31 panic("invalid decimal test value: " + value)
32 }
33 return NewDecimal(unscaled, scale)
34}
35
36func TestDecimalRoundTrip(t *testing.T) {
37 values := []Decimal{

Callers 3

TestDecimalRoundTripFunction · 0.70
TestDecimalWireEncodingFunction · 0.70

Calls 1

NewDecimalFunction · 0.85

Tested by

no test coverage detected