]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/build/test/qt5/qtpurchasing.cpp
1 // (c) Copyright Juergen Hunold 2016
2 // Use, modification and distribution is subject to the Boost Software
3 // License, Version 1.0. (See accompanying file LICENSE.txt or copy at
4 // https://www.bfgroup.xyz/b2/LICENSE.txt)
6 #define BOOST_TEST_MODULE QtPurchasing
8 #include <QtPurchasing>
10 #include <boost/test/unit_test.hpp>
12 BOOST_AUTO_TEST_CASE (defines
)
14 BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB
), true);
15 BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_PURCHASING_LIB
), true);
18 class DummyProduct
: public QInAppProduct
22 DummyProduct() : QInAppProduct
{QStringLiteral("One"),
26 QStringLiteral("DummyProduct"),
28 void purchase() override
{};
32 operator << (std::ostream
& stream
, QString
const& string
)
34 stream
<< qPrintable(string
);
38 BOOST_AUTO_TEST_CASE (purchase
)
42 BOOST_TEST(product
.price() == QLatin1String("One"));
43 BOOST_TEST(product
.identifier() == QLatin1String("DummyProduct"));