diff options
Diffstat (limited to 'Tests/CMakeLib')
-rw-r--r-- | Tests/CMakeLib/run_compile_commands.cxx | 3 | ||||
-rw-r--r-- | Tests/CMakeLib/testAffinity.cxx | 4 | ||||
-rw-r--r-- | Tests/CMakeLib/testArgumentParser.cxx | 11 | ||||
-rw-r--r-- | Tests/CMakeLib/testEncoding.cxx | 3 | ||||
-rw-r--r-- | Tests/CMakeLib/testGeneratedFileStream.cxx | 6 | ||||
-rw-r--r-- | Tests/CMakeLib/testOptional.cxx | 6 | ||||
-rw-r--r-- | Tests/CMakeLib/testRST.cxx | 9 | ||||
-rw-r--r-- | Tests/CMakeLib/testRange.cxx | 4 | ||||
-rw-r--r-- | Tests/CMakeLib/testString.cxx | 11 | ||||
-rw-r--r-- | Tests/CMakeLib/testStringAlgorithms.cxx | 4 | ||||
-rw-r--r-- | Tests/CMakeLib/testSystemTools.cxx | 3 | ||||
-rw-r--r-- | Tests/CMakeLib/testUTF8.cxx | 3 | ||||
-rw-r--r-- | Tests/CMakeLib/testUVProcessChain.cxx | 18 | ||||
-rw-r--r-- | Tests/CMakeLib/testUVProcessChainHelper.cxx | 5 | ||||
-rw-r--r-- | Tests/CMakeLib/testUVRAII.cxx | 4 | ||||
-rw-r--r-- | Tests/CMakeLib/testUVStreambuf.cxx | 16 | ||||
-rw-r--r-- | Tests/CMakeLib/testVisualStudioSlnParser.cxx | 4 | ||||
-rw-r--r-- | Tests/CMakeLib/testXMLParser.cxx | 4 | ||||
-rw-r--r-- | Tests/CMakeLib/testXMLSafe.cxx | 3 |
19 files changed, 62 insertions, 59 deletions
diff --git a/Tests/CMakeLib/run_compile_commands.cxx b/Tests/CMakeLib/run_compile_commands.cxx index 4a79c80..2c77acc 100644 --- a/Tests/CMakeLib/run_compile_commands.cxx +++ b/Tests/CMakeLib/run_compile_commands.cxx @@ -1,6 +1,5 @@ #include "cmConfigure.h" // IWYU pragma: keep -#include "cmsys/FStream.hxx" #include <cstdlib> #include <iostream> #include <map> @@ -8,6 +7,8 @@ #include <utility> #include <vector> +#include "cmsys/FStream.hxx" + #include "cmSystemTools.h" class CompileCommandParser diff --git a/Tests/CMakeLib/testAffinity.cxx b/Tests/CMakeLib/testAffinity.cxx index 4b82280..6c68570 100644 --- a/Tests/CMakeLib/testAffinity.cxx +++ b/Tests/CMakeLib/testAffinity.cxx @@ -1,11 +1,11 @@ /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ -#include "cmAffinity.h" - #include <cstddef> #include <iostream> #include <set> +#include "cmAffinity.h" + int main() { std::set<size_t> cpus = cmAffinity::GetProcessorsAvailable(); diff --git a/Tests/CMakeLib/testArgumentParser.cxx b/Tests/CMakeLib/testArgumentParser.cxx index 909f71b..20f98c2 100644 --- a/Tests/CMakeLib/testArgumentParser.cxx +++ b/Tests/CMakeLib/testArgumentParser.cxx @@ -1,16 +1,17 @@ /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ -#include "cmArgumentParser.h" - -#include "cm_static_string_view.hxx" -#include <cm/string_view> - #include <initializer_list> #include <iostream> #include <string> #include <vector> +#include <cm/string_view> + +#include "cm_static_string_view.hxx" + +#include "cmArgumentParser.h" + namespace { struct Result diff --git a/Tests/CMakeLib/testEncoding.cxx b/Tests/CMakeLib/testEncoding.cxx index d608e86..4936898 100644 --- a/Tests/CMakeLib/testEncoding.cxx +++ b/Tests/CMakeLib/testEncoding.cxx @@ -1,7 +1,8 @@ -#include "cmsys/FStream.hxx" #include <iostream> #include <string> +#include "cmsys/FStream.hxx" + #ifdef _WIN32 # include "cmsys/ConsoleBuf.hxx" #endif diff --git a/Tests/CMakeLib/testGeneratedFileStream.cxx b/Tests/CMakeLib/testGeneratedFileStream.cxx index 1d2ec32..de44a0b 100644 --- a/Tests/CMakeLib/testGeneratedFileStream.cxx +++ b/Tests/CMakeLib/testGeneratedFileStream.cxx @@ -1,11 +1,11 @@ /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ -#include "cmGeneratedFileStream.h" -#include "cmSystemTools.h" - #include <iostream> #include <string> +#include "cmGeneratedFileStream.h" +#include "cmSystemTools.h" + #define cmFailed(m1, m2) \ std::cout << "FAILED: " << (m1) << (m2) << "\n"; \ failed = 1 diff --git a/Tests/CMakeLib/testOptional.cxx b/Tests/CMakeLib/testOptional.cxx index cefe9fa..3050332 100644 --- a/Tests/CMakeLib/testOptional.cxx +++ b/Tests/CMakeLib/testOptional.cxx @@ -1,10 +1,10 @@ -#include <cm/optional> -#include <cm/utility> - #include <iostream> #include <type_traits> #include <vector> +#include <cm/optional> +#include <cm/utility> + class EventLogger; class Event diff --git a/Tests/CMakeLib/testRST.cxx b/Tests/CMakeLib/testRST.cxx index 8891276..28d80a5 100644 --- a/Tests/CMakeLib/testRST.cxx +++ b/Tests/CMakeLib/testRST.cxx @@ -1,12 +1,13 @@ /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ -#include "cmRST.h" -#include "cmSystemTools.h" - -#include "cmsys/FStream.hxx" #include <iostream> #include <string> +#include "cmsys/FStream.hxx" + +#include "cmRST.h" +#include "cmSystemTools.h" + void reportLine(std::ostream& os, bool ret, std::string const& line, bool eol) { if (ret) { diff --git a/Tests/CMakeLib/testRange.cxx b/Tests/CMakeLib/testRange.cxx index b26b07b..4efe98e 100644 --- a/Tests/CMakeLib/testRange.cxx +++ b/Tests/CMakeLib/testRange.cxx @@ -1,12 +1,12 @@ /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ -#include "cmRange.h" - #include <iostream> #include <string> #include <vector> +#include "cmRange.h" + #define ASSERT_TRUE(x) \ do { \ if (!(x)) { \ diff --git a/Tests/CMakeLib/testString.cxx b/Tests/CMakeLib/testString.cxx index 3b47a9c..d7b3200 100644 --- a/Tests/CMakeLib/testString.cxx +++ b/Tests/CMakeLib/testString.cxx @@ -1,11 +1,6 @@ /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ -#include "cmString.hxx" - -#include "cm_static_string_view.hxx" -#include <cm/string_view> - #include <cstddef> #include <cstring> #include <iostream> @@ -16,6 +11,12 @@ #include <type_traits> #include <utility> +#include <cm/string_view> + +#include "cm_static_string_view.hxx" + +#include "cmString.hxx" + #define ASSERT_TRUE(x) \ do { \ if (!(x)) { \ diff --git a/Tests/CMakeLib/testStringAlgorithms.cxx b/Tests/CMakeLib/testStringAlgorithms.cxx index 4e48f6e..63826cf 100644 --- a/Tests/CMakeLib/testStringAlgorithms.cxx +++ b/Tests/CMakeLib/testStringAlgorithms.cxx @@ -3,13 +3,13 @@ #include <cmConfigure.h> // IWYU pragma: keep -#include <cm/string_view> - #include <iostream> #include <sstream> #include <string> #include <vector> +#include <cm/string_view> + #include "cmStringAlgorithms.h" int testStringAlgorithms(int /*unused*/, char* /*unused*/ []) diff --git a/Tests/CMakeLib/testSystemTools.cxx b/Tests/CMakeLib/testSystemTools.cxx index 0a757df..92f5275 100644 --- a/Tests/CMakeLib/testSystemTools.cxx +++ b/Tests/CMakeLib/testSystemTools.cxx @@ -4,10 +4,11 @@ #include <cmConfigure.h> // IWYU pragma: keep #include <iostream> -#include <stddef.h> #include <string> #include <vector> +#include <stddef.h> + #include "cmSystemTools.h" #define cmPassed(m) std::cout << "Passed: " << (m) << "\n" diff --git a/Tests/CMakeLib/testUTF8.cxx b/Tests/CMakeLib/testUTF8.cxx index a0bb5cd..986f595 100644 --- a/Tests/CMakeLib/testUTF8.cxx +++ b/Tests/CMakeLib/testUTF8.cxx @@ -1,8 +1,9 @@ /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ -#include <cm_utf8.h> #include <stdio.h> +#include <cm_utf8.h> + typedef char test_utf8_char[5]; static void test_utf8_char_print(test_utf8_char const c) diff --git a/Tests/CMakeLib/testUVProcessChain.cxx b/Tests/CMakeLib/testUVProcessChain.cxx index 8cee49d..71a1764 100644 --- a/Tests/CMakeLib/testUVProcessChain.cxx +++ b/Tests/CMakeLib/testUVProcessChain.cxx @@ -1,22 +1,20 @@ -#include "cmUVProcessChain.h" - -#include "cmGetPipes.h" -#include "cmUVHandlePtr.h" -#include "cmUVStreambuf.h" - -#include "cm_uv.h" - #include <algorithm> +#include <csignal> #include <functional> #include <iostream> #include <sstream> #include <string> #include <vector> -#include <csignal> - #include <cm/memory> +#include "cm_uv.h" + +#include "cmGetPipes.h" +#include "cmUVHandlePtr.h" +#include "cmUVProcessChain.h" +#include "cmUVStreambuf.h" + struct ExpectedStatus { bool Finished; diff --git a/Tests/CMakeLib/testUVProcessChainHelper.cxx b/Tests/CMakeLib/testUVProcessChainHelper.cxx index a77ec90..9c25834 100644 --- a/Tests/CMakeLib/testUVProcessChainHelper.cxx +++ b/Tests/CMakeLib/testUVProcessChainHelper.cxx @@ -1,13 +1,12 @@ +#include <cctype> #include <chrono> +#include <cstdlib> #include <iostream> #include <set> #include <sstream> #include <string> #include <thread> -#include <cctype> -#include <cstdlib> - std::string getStdin() { char buffer[1024]; diff --git a/Tests/CMakeLib/testUVRAII.cxx b/Tests/CMakeLib/testUVRAII.cxx index 2aeaf2c..cb05ace 100644 --- a/Tests/CMakeLib/testUVRAII.cxx +++ b/Tests/CMakeLib/testUVRAII.cxx @@ -1,5 +1,3 @@ -#include "cmUVHandlePtr.h" - #include <chrono> #include <iostream> #include <thread> @@ -7,6 +5,8 @@ #include "cm_uv.h" +#include "cmUVHandlePtr.h" + static void signal_reset_fn(uv_async_t* handle) { auto ptr = static_cast<cm::uv_async_ptr*>(handle->data); diff --git a/Tests/CMakeLib/testUVStreambuf.cxx b/Tests/CMakeLib/testUVStreambuf.cxx index 39655f3..cd9c9d4 100644 --- a/Tests/CMakeLib/testUVStreambuf.cxx +++ b/Tests/CMakeLib/testUVStreambuf.cxx @@ -1,18 +1,16 @@ -#include "cmUVStreambuf.h" - -#include "cmGetPipes.h" -#include "cmUVHandlePtr.h" - -#include "cm_uv.h" - +#include <cstring> #include <iostream> #include <string> #include <vector> -#include <cstring> - #include <stdint.h> +#include "cm_uv.h" + +#include "cmGetPipes.h" +#include "cmUVHandlePtr.h" +#include "cmUVStreambuf.h" + #define TEST_STR_LINE_1 "This string must be exactly 128 characters long so" #define TEST_STR_LINE_2 "that we can test CMake's std::streambuf integration" #define TEST_STR_LINE_3 "with libuv's uv_stream_t." diff --git a/Tests/CMakeLib/testVisualStudioSlnParser.cxx b/Tests/CMakeLib/testVisualStudioSlnParser.cxx index c7fd585..3c06960 100644 --- a/Tests/CMakeLib/testVisualStudioSlnParser.cxx +++ b/Tests/CMakeLib/testVisualStudioSlnParser.cxx @@ -1,10 +1,10 @@ #include "testVisualStudioSlnParser.h" +#include <iostream> + #include "cmVisualStudioSlnData.h" #include "cmVisualStudioSlnParser.h" -#include <iostream> - static bool parsedRight(cmVisualStudioSlnParser& parser, const std::string& file, cmSlnData& data, cmVisualStudioSlnParser::ParseResult expected = diff --git a/Tests/CMakeLib/testXMLParser.cxx b/Tests/CMakeLib/testXMLParser.cxx index d5e9764..8617cc1 100644 --- a/Tests/CMakeLib/testXMLParser.cxx +++ b/Tests/CMakeLib/testXMLParser.cxx @@ -1,9 +1,9 @@ #include "testXMLParser.h" -#include "cmXMLParser.h" - #include <iostream> +#include "cmXMLParser.h" + int testXMLParser(int /*unused*/, char* /*unused*/ []) { // TODO: Derive from parser and check attributes. diff --git a/Tests/CMakeLib/testXMLSafe.cxx b/Tests/CMakeLib/testXMLSafe.cxx index 21bb952..dc62eb9 100644 --- a/Tests/CMakeLib/testXMLSafe.cxx +++ b/Tests/CMakeLib/testXMLSafe.cxx @@ -4,9 +4,10 @@ #include "cmConfigure.h" // IWYU pragma: keep #include <sstream> -#include <stdio.h> #include <string> +#include <stdio.h> + #include "cmXMLSafe.h" struct test_pair |