Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NewPositiveDecimalFromStrings expects error when value is NaN #1181

Closed
4 tasks
Tracked by #818
ryanchristo opened this issue Jun 10, 2022 · 2 comments · Fixed by #1210
Closed
4 tasks
Tracked by #818

NewPositiveDecimalFromStrings expects error when value is NaN #1181

ryanchristo opened this issue Jun 10, 2022 · 2 comments · Fixed by #1210
Assignees
Labels
Scope: types Issues that update the types module Type: Bug Something isn't working

Comments

@ryanchristo
Copy link
Member

Summary of Bug

Intermittent error in CI when testing NewPositiveDecFromString.

Any form of "NaN" ("NAn", "nAn", etc) doesn't error but the tests expect an error.

https://github.com/regen-network/regen-ledger/runs/6802813188?check_suite_focus=true#step:5:840

=== RUN   TestDec/TestInvalidNewPositiveDecFromString
    dec_test.go:23: [rapid] failed after 8 tests: (*T).FailNow() called
        To reproduce, specify -run="TestDec/TestInvalidNewPositiveDecFromString" -rapid.failfile="TestDec_TestInvalidNewPositiveDecFromString-20220608223342-42708.fail" (or -rapid.seed=3401434366935564329)
        Failed test output:
    dec_test.go:229: [rapid] draw s: "NAn"
    dec_test.go:231: 
        	Error Trace:	dec_test.go:231
        	            				engine.go:276
        	            				engine.go:158
        	            				engine.go:115
        	Error:      	An error is expected but got nil.
        	Test:       	TestDec/TestInvalidNewPositiveDecFromString

Version

master

Steps to Reproduce

Pass "NaN" to NewPositiveDecFromString without receiving an error.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: types Issues that update the types module Type: Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant