Bitcoin Core  26.99.0
P2P Digital Currency
rpc_util_tests.cpp
Go to the documentation of this file.
1 // Copyright (c) 2022 The Bitcoin Core developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4 
5 #include <wallet/rpc/util.h>
6 
7 #include <boost/test/unit_test.hpp>
8 
9 namespace wallet {
10 
11 BOOST_AUTO_TEST_SUITE(wallet_util_tests)
12 
13 BOOST_AUTO_TEST_CASE(util_ParseISO8601DateTime)
14 {
15  BOOST_CHECK_EQUAL(ParseISO8601DateTime("1970-01-01T00:00:00Z"), 0);
16  BOOST_CHECK_EQUAL(ParseISO8601DateTime("1960-01-01T00:00:00Z"), 0);
17  BOOST_CHECK_EQUAL(ParseISO8601DateTime("2000-01-01T00:00:01Z"), 946684801);
18  BOOST_CHECK_EQUAL(ParseISO8601DateTime("2011-09-30T23:36:17Z"), 1317425777);
19  BOOST_CHECK_EQUAL(ParseISO8601DateTime("2100-12-31T23:59:59Z"), 4133980799);
20 }
21 
23 
24 } // namespace wallet
BOOST_AUTO_TEST_SUITE(cuckoocache_tests)
Test Suite for CuckooCache.
BOOST_AUTO_TEST_SUITE_END()
int64_t ParseISO8601DateTime(const std::string &str)
Definition: util.cpp:22
BOOST_AUTO_TEST_CASE(bnb_search_test)
#define BOOST_CHECK_EQUAL(v1, v2)
Definition: object.cpp:18