MCPcopy Create free account
hub / github.com/DNAProject/DNA / TestFormatOng

Function TestFormatOng

cmd/utils/utils_test.go:29–36  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

27)
28
29func TestFormatOng(t *testing.T) {
30 assert.Equal(t, "1", FormatOng(1000000000))
31 assert.Equal(t, "1.1", FormatOng(1100000000))
32 assert.Equal(t, "1.123456789", FormatOng(1123456789))
33 assert.Equal(t, "1000000000.123456789", FormatOng(1000000000123456789))
34 assert.Equal(t, "1000000000.000001", FormatOng(1000000000000001000))
35 assert.Equal(t, "1000000000.000000001", FormatOng(1000000000000000001))
36}
37
38func TestParseOng(t *testing.T) {
39 assert.Equal(t, uint64(1000000000), ParseOng("1"))

Callers

nothing calls this directly

Calls 1

FormatOngFunction · 0.85

Tested by

no test coverage detected