diff options
Diffstat (limited to 'Swiften/Client/UnitTest/XMLBeautifierTest.cpp')
-rw-r--r-- | Swiften/Client/UnitTest/XMLBeautifierTest.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/Swiften/Client/UnitTest/XMLBeautifierTest.cpp b/Swiften/Client/UnitTest/XMLBeautifierTest.cpp index 0188634..2a639ea 100644 --- a/Swiften/Client/UnitTest/XMLBeautifierTest.cpp +++ b/Swiften/Client/UnitTest/XMLBeautifierTest.cpp @@ -1,3 +1,3 @@ /* - * Copyright (c) 2010-2017 Isode Limited. + * Copyright (c) 2010-2018 Isode Limited. * All rights reserved. @@ -10,2 +10,5 @@ +// Clang wrongly things that tests for 0 are using 0 as null. +#pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant" + using namespace Swift; @@ -17,3 +20,3 @@ namespace { TEST(XMLBeautifierTest, testBeautify) { - auto beautifier = std::unique_ptr<XMLBeautifier>(new XMLBeautifier(true, false)); + auto beautifier = std::make_unique<XMLBeautifier>(true, false); @@ -28,3 +31,3 @@ TEST(XMLBeautifierTest, testBeautify) { TEST(XMLBeautifierTest, testBeautifyMultipleChunks) { - auto beautifier = std::unique_ptr<XMLBeautifier>(new XMLBeautifier(true, false)); + auto beautifier = std::make_unique<XMLBeautifier>(true, false); @@ -42,3 +45,3 @@ TEST(XMLBeautifierTest, testBeautifyMultipleChunks) { TEST(XMLBeautifierTest, testBeautifyMultipleChunksMiddleElement) { - auto beautifier = std::unique_ptr<XMLBeautifier>(new XMLBeautifier(true, false)); + auto beautifier = std::make_unique<XMLBeautifier>(true, false); @@ -56,3 +59,3 @@ TEST(XMLBeautifierTest, testBeautifyMultipleChunksMiddleElement) { TEST(XMLBeautifierTest, testBeautifyInvalidMultipleChunks) { - auto beautifier = std::unique_ptr<XMLBeautifier>(new XMLBeautifier(true, false)); + auto beautifier = std::make_unique<XMLBeautifier>(true, false); |