qtscxml.cpp 827 B

123456789101112131415161718192021222324252627282930313233
  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)
  5. #define BOOST_TEST_MODULE QtScxml
  6. #include <QtScxml>
  7. #include <boost/test/unit_test.hpp>
  8. BOOST_AUTO_TEST_CASE( defines)
  9. {
  10. BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
  11. BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_SCXML_LIB), true);
  12. }
  13. std::ostream&
  14. operator << (std::ostream& stream, QString const& string)
  15. {
  16. stream << qPrintable(string);
  17. return stream;
  18. }
  19. /*!
  20. */
  21. BOOST_AUTO_TEST_CASE( scxml )
  22. {
  23. QString sessionId = QScxmlStateMachine::generateSessionId(QStringLiteral("dummy"));
  24. BOOST_TEST(sessionId.isEmpty() == false);
  25. BOOST_TEST(sessionId == QString{"dummy1"});
  26. }