alpeb / go-finance

Go library containing a collection of financial functions for time value of money (annuities), cash flow, interest rate conversions, bonds and depreciation calculations.
Mozilla Public License 2.0
177 stars 23 forks source link

Test PriceDiscount() failed #6

Closed mrtomyum closed 2 years ago

mrtomyum commented 3 years ago

Running tool: /usr/local/go/bin/go test -timeout 30s -coverprofile=/var/folders/9r/2trm49kn7vxc6rx_2659xkx80000gn/T/vscode-goGuEEhk/go-code-cover github.com/alpeb/go-finance/fin

--- FAIL: TestPriceDiscount (0.00s) /Users/tom/go/src/github.com/alpeb/go-finance/fin/bonds_test.go:130: PriceDiscount(1203120000, 1204329600, 0.052500, 100.000000, 0) = 99.781250 /Users/tom/go/src/github.com/alpeb/go-finance/fin/bonds_test.go:130: PriceDiscount(1203120000, 1204329600, 0.052500, 100.000000, 4) = 99.781250 FAIL coverage: 93.3% of statements FAIL github.com/alpeb/go-finance/fin 0.004s FAIL

alpeb commented 3 years ago

Thanks for the report @mrtomyum . I'm currently on the road, so I'll give this a check next week :truck: :+1:

alpeb commented 2 years ago

I couldn't reproduce this problem. The project certainly doesn't have 100% test coverage, but still the tests should pass...