mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-22 03:55:53 +00:00
Add implicit conversion from STAmount to Number
This commit is contained in:
committed by
Elliot Lee
parent
24fe5f9fd0
commit
c9c54c9799
@@ -20,6 +20,7 @@
|
||||
#include <ripple/basics/IOUAmount.h>
|
||||
#include <ripple/basics/Number.h>
|
||||
#include <ripple/beast/unit_test.h>
|
||||
#include <ripple/protocol/STAmount.h>
|
||||
|
||||
namespace ripple {
|
||||
|
||||
@@ -124,6 +125,10 @@ public:
|
||||
BEAST_EXPECT((y == Number{5, 6}));
|
||||
IOUAmount z{y};
|
||||
BEAST_EXPECT(x == z);
|
||||
XRPAmount xrp{500};
|
||||
STAmount st = xrp;
|
||||
Number n = st;
|
||||
BEAST_EXPECT(XRPAmount{n} == xrp);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user