From 441a748ffbef68699ec396aee6ae8079b45038c1 Mon Sep 17 00:00:00 2001 From: Arthur Britto Date: Tue, 29 Jan 2013 11:04:45 -0800 Subject: [PATCH] UT: Add a unit test for getQuality. --- src/cpp/ripple/Ledger.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/cpp/ripple/Ledger.cpp b/src/cpp/ripple/Ledger.cpp index 31be1ed682..11f2b2d774 100644 --- a/src/cpp/ripple/Ledger.cpp +++ b/src/cpp/ripple/Ledger.cpp @@ -4,6 +4,7 @@ #include #include +#include #include "../json/writer.h" @@ -1403,4 +1404,15 @@ uint64 Ledger::scaleFeeLoad(uint64 fee) return theApp->getFeeTrack().scaleFeeLoad(fee, mBaseFee, mReferenceFeeUnits); } +BOOST_AUTO_TEST_SUITE(quality) + +BOOST_AUTO_TEST_CASE( getquality ) +{ + uint256 uBig("D2DC44E5DC189318DB36EF87D2104CDF0A0FE3A4B698BEEE55038D7EA4C68000"); + + if (6125895493223874560 != Ledger::getQuality(uBig)) + BOOST_FAIL("Ledger::getQuality fails."); +} + +BOOST_AUTO_TEST_SUITE_END() // vim:ts=4