MCPcopy Create free account
hub / github.com/devaccuracy/ledgerforge / TestApplyPrecision

Function TestApplyPrecision

model/model_test.go:416–424  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

414}
415
416func TestApplyPrecision(t *testing.T) {
417 txn := &Transaction{
418 Amount: 123.45,
419 Precision: 100,
420 }
421 preciseAmount := ApplyPrecision(txn)
422 expected := big.NewInt(12345)
423 assert.Equal(t, expected, preciseAmount)
424}
425
426func TestApplyRate(t *testing.T) {
427 tests := []struct {

Callers

nothing calls this directly

Calls 1

ApplyPrecisionFunction · 0.85

Tested by

no test coverage detected