]> Git Repo - VerusCoin.git/blame - src/test/main_tests.cpp
Use a typedef for monetary values
[VerusCoin.git] / src / test / main_tests.cpp
CommitLineData
3fc68461
WL
1// Copyright (c) 2014 The Bitcoin Core developers
2// Distributed under the MIT/X11 software license, see the accompanying
3// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
fecba4e2
PW
5#include "core.h"
6#include "main.h"
7
8#include <boost/test/unit_test.hpp>
9
10BOOST_AUTO_TEST_SUITE(main_tests)
11
12BOOST_AUTO_TEST_CASE(subsidy_limit_test)
13{
a372168e 14 CAmount nSum = 0;
5cfd3a70 15 for (int nHeight = 0; nHeight < 14000000; nHeight += 1000) {
a372168e 16 CAmount nSubsidy = GetBlockValue(nHeight, 0);
fecba4e2
PW
17 BOOST_CHECK(nSubsidy <= 50 * COIN);
18 nSum += nSubsidy * 1000;
19 BOOST_CHECK(MoneyRange(nSum));
20 }
21 BOOST_CHECK(nSum == 2099999997690000ULL);
22}
23
24BOOST_AUTO_TEST_SUITE_END()
This page took 0.066112 seconds and 4 git commands to generate.