mirror of
https://github.com/luxfi/oraclevm.git
synced 2026-10-30 15:23:15 +00:00
19 lines
306 B
Go
19 lines
306 B
Go
package utils_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/bianyuanop/oraclevm/utils"
|
|
)
|
|
|
|
func TestStockPriceNormalConversion(t *testing.T) {
|
|
// 100.01
|
|
price := 100.01
|
|
price_restored := utils.StockPriceToUint64(price)
|
|
|
|
if price_restored != 1000100 {
|
|
t.Errorf("Conversion failed: %d", price_restored)
|
|
}
|
|
|
|
}
|