Page MenuHomePhabricator

Merge #14460: tests: Improve 'CAmount' tests
ClosedPublic

Authored by nakihito on Feb 12 2020, 21:45.

Details

Reviewers
Fabien
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Restricted Project
Commits
rSTAGINGe584d180ab73: Merge #14460: tests: Improve 'CAmount' tests
rABCe584d180ab73: Merge #14460: tests: Improve 'CAmount' tests
Summary

29ed2d64f6 Improve CAmount tests (Hennadii Stepanov)

Pull request description:

This provides:
  - more `MoneyRange` tests;
  - explicit using of the `CAmount` type.

Tree-SHA512: ca0ad6ccb37909a2a5c11034dc07b316a84c32fb40c6f8b6cfc28ebec72a1de157f31d22e767ae80d70ed06d7296f23870cc5ed0689f34a754ae763d50e23d43

Backport of Core PR14460
https://github.com/bitcoin/bitcoin/pull/14460/

Adjusted for our codebase.

Test Plan
ninja check

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Owners added a reviewer: Restricted Owners Package.Feb 12 2020, 21:45

[Bot Message]
One or more PR numbers were detected in the summary.
Links to those Bitcoin Core PRs have been inserted into the summary for reference.

Part of the PR is missing (new cases for the CFeeRate constructor).

Fabien requested changes to this revision.Feb 13 2020, 09:31
This revision now requires changes to proceed.Feb 13 2020, 09:31
Fabien requested changes to this revision.Feb 13 2020, 20:17
Fabien added inline comments.
src/test/feerate_tests.cpp
66 ↗(On Diff #16361)

All these casts are useless, since the multiplication operator int * Amount is defined and returns an Amount.

This revision now requires changes to proceed.Feb 13 2020, 20:17
This revision is now accepted and ready to land.Feb 14 2020, 09:42