mirror of
https://github.com/AthanorLabs/atomic-swap.git
synced 2026-01-08 21:58:07 -05:00
24 lines
541 B
Go
24 lines
541 B
Go
// Copyright 2023 The AthanorLabs/atomic-swap Authors
|
|
// SPDX-License-Identifier: LGPL-3.0-only
|
|
|
|
package coins
|
|
|
|
import (
|
|
"testing"
|
|
|
|
logging "github.com/ipfs/go-log/v2"
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func init() {
|
|
logging.SetLogLevel("coins", "debug")
|
|
}
|
|
|
|
func TestDecimalCtx(t *testing.T) {
|
|
c := DecimalCtx()
|
|
assert.Equal(t, c.Precision, uint32(MaxCoinPrecision))
|
|
// verify that package variable decimalCtx is unmodified, because c is a copy
|
|
c.Precision = 3
|
|
assert.Equal(t, decimalCtx.Precision, uint32(MaxCoinPrecision))
|
|
}
|