Consistent unit test header inclusion order

This patch consistently changes the inclusion order for unit test files
to the following:

 1. The header of the unit under test (using <> includes).
 2. The unit_test.hpp header (using "" includes).
 3. Any additional auxiliary test headers (using "" includes and sorted alphabetically).
 4. Additional system headers needed for the test (using <> includes and sorted alphabetically).
 5. Conditionally included system headers (using <> includes).

Putting the unit under test's header at the very beginning has the
advantage of also testing that the header is self-contained.  It also
makes it very quick to tell what unit is tested in this file.
This commit is contained in:
Moritz Klammler
2022-09-16 13:16:01 +02:00
parent 81c5ba9082
commit 10fd14f8b9
39 changed files with 126 additions and 101 deletions

View File

@@ -1,15 +1,17 @@
#include <toml.hpp>
#include "unit_test.hpp"
#include <toml.hpp>
#include <map>
#include <unordered_map>
#include <list>
#include <deque>
#include <array>
#include <deque>
#include <list>
#include <map>
#include <tuple>
#include <unordered_map>
#if TOML11_CPLUSPLUS_STANDARD_VERSION >= 201703L
#include <string_view>
#endif
#include <tuple>
using test_value_types = std::tuple<
toml::basic_value<toml::discard_comments>,
@@ -823,4 +825,3 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(test_get_toml_offset_datetime, value_type, test_va
BOOST_TEST(tm.tm_sec == 0);
}
}