Page MenuHomePhabricator

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

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

Details

Reviewers
Fabien
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Restricted Project
Commits
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

nakihito created this revision.Wed, Feb 12, 21:45
Owners added a reviewer: Restricted Owners Package.Wed, Feb 12, 21:45
Herald added a reviewer: Restricted Project. · View Herald TranscriptWed, Feb 12, 21:45
teamcity edited the summary of this revision. (Show Details)Wed, Feb 12, 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.

Fabien added a subscriber: Fabien.Thu, Feb 13, 09:30

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

Fabien requested changes to this revision.Thu, Feb 13, 09:31
This revision now requires changes to proceed.Thu, Feb 13, 09:31
nakihito updated this revision to Diff 16361.Thu, Feb 13, 19:26

Added CFeeRate changes.

Fabien requested changes to this revision.Thu, Feb 13, 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.Thu, Feb 13, 20:17
nakihito updated this revision to Diff 16366.Thu, Feb 13, 20:32

Removed type casts.

Fabien accepted this revision.Fri, Feb 14, 09:42
This revision is now accepted and ready to land.Fri, Feb 14, 09:42
This revision was automatically updated to reflect the committed changes.