blob: 3df66bda6e69ba6f0806ac0f561eae623dc82516 [file] [log] [blame]
onqtam15c5f0f2016-08-02 17:31:27 +03001#include "doctest.h"
onqtamcc9e8652016-08-02 14:23:38 +03002
onqtam7cc0e962017-04-17 23:30:36 +03003#include "header.h"
4
onqtamc223b692016-08-02 17:20:06 +03005#include <ostream>
onqtam12d55982017-04-16 22:35:27 +03006#include <sstream>
7
onqtam7cc0e962017-04-17 23:30:36 +03008/*
9
onqtam12d55982017-04-16 22:35:27 +030010#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 6)
onqtam7cc0e962017-04-17 23:30:36 +030011//#pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
onqtam12d55982017-04-16 22:35:27 +030012#endif // > gcc 4.6
13
14#ifndef DOCTEST_CONFIG_DISABLE
onqtamd9bb03a2016-08-02 15:32:49 +030015
onqtam98e12af2017-04-16 22:11:21 +030016TEST_CASE("doctest internals") {
onqtam12d55982017-04-16 22:35:27 +030017 using namespace doctest;
18
onqtam98e12af2017-04-16 22:11:21 +030019 // string stuff
20 doctest::String a(0);
21 const doctest::String const_str("omgomgomg");
22 a = const_str.c_str();
23 CHECK(a.size() == const_str.size());
24 CHECK(a.length() == const_str.length());
25 CHECK(a.compare(const_str, true) == 0);
26 CHECK(a.compare("omgomgomg", false) == 0);
27
28 // toString
29 a += toString("aaa") + toString(0.5f) + toString('c') + toString(true) +
30 toString(static_cast<long double>(0.1)) //
31 + toString(static_cast<unsigned char>(1)) //
32 + toString(static_cast<short>(1)) //
33 + toString(static_cast<long>(1)) //
34 + toString(static_cast<unsigned long>(1)) //
35 + toString(static_cast<unsigned short>(1));
36
37 // others
onqtam12d55982017-04-16 22:35:27 +030038 //a += doctest::detail::fileForOutput("c:\\a");
39 //a += doctest::detail::fileForOutput("c:/a");
40 //a += doctest::detail::fileForOutput("a");
onqtam98e12af2017-04-16 22:11:21 +030041 std::ostringstream oss;
42 oss << a;
43 oss << doctest::detail::getAssertString(static_cast<doctest::detail::assertType::Enum>(3));
44 a += oss.str().c_str();
45 CHECK(doctest::detail::rawMemoryToString(a).length() > 0u);
onqtamd9bb03a2016-08-02 15:32:49 +030046}
47
onqtamc79b7542017-04-19 20:47:13 +030048#endif // DOCTEST_CONFIG_DISABLE
49
onqtam7cc0e962017-04-17 23:30:36 +030050*/