diff options
author | obscuren <geffobscura@gmail.com> | 2014-02-25 18:20:24 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-02-25 18:20:24 +0800 |
commit | c7e73ba12d747186002433db54d002ab43bed171 (patch) | |
tree | 32ffc1d36bc773f8230012dc6b01db54566fda97 /ethutil/common_test.go | |
parent | b30b9ab8cb13ddbc68a4912c9f06116c0f59bc27 (diff) | |
download | dexon-c7e73ba12d747186002433db54d002ab43bed171.tar dexon-c7e73ba12d747186002433db54d002ab43bed171.tar.gz dexon-c7e73ba12d747186002433db54d002ab43bed171.tar.bz2 dexon-c7e73ba12d747186002433db54d002ab43bed171.tar.lz dexon-c7e73ba12d747186002433db54d002ab43bed171.tar.xz dexon-c7e73ba12d747186002433db54d002ab43bed171.tar.zst dexon-c7e73ba12d747186002433db54d002ab43bed171.zip |
Added currency converting
Diffstat (limited to 'ethutil/common_test.go')
-rw-r--r-- | ethutil/common_test.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/ethutil/common_test.go b/ethutil/common_test.go new file mode 100644 index 000000000..3a6a37ff5 --- /dev/null +++ b/ethutil/common_test.go @@ -0,0 +1,17 @@ +package ethutil + +import ( + "fmt" + "math/big" + "testing" +) + +func TestCommon(t *testing.T) { + fmt.Println(CurrencyToString(BigPow(10, 19))) + fmt.Println(CurrencyToString(BigPow(10, 16))) + fmt.Println(CurrencyToString(BigPow(10, 13))) + fmt.Println(CurrencyToString(BigPow(10, 10))) + fmt.Println(CurrencyToString(BigPow(10, 7))) + fmt.Println(CurrencyToString(BigPow(10, 4))) + fmt.Println(CurrencyToString(big.NewInt(10))) +} |