diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..6313b56c5 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text=auto eol=lf diff --git a/CMakeLists.txt b/CMakeLists.txt index fb1069ff6..65e154b5a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.23) +cmake_minimum_required(VERSION 3.28) set(CMAKE_EXPORT_COMPILE_COMMANDS ON) @@ -8,6 +8,7 @@ option(REFLECTCPP_INSTALL "Install reflect cpp" OFF) option(REFLECTCPP_ALL_FORMATS "Enable all supported formats" OFF) option(REFLECTCPP_JSON "Enable JSON support" ON) # enabled by default +option(REFLECTCPP_CLI "Enable CLI support" ON) option(REFLECTCPP_AVRO "Enable AVRO support" ${REFLECTCPP_ALL_FORMATS}) option(REFLECTCPP_BSON "Enable BSON support" ${REFLECTCPP_ALL_FORMATS}) option(REFLECTCPP_CAPNPROTO "Enable Cap’n Proto support" ${REFLECTCPP_ALL_FORMATS}) @@ -28,6 +29,11 @@ option(REFLECTCPP_BUILD_BENCHMARKS "Build benchmarks" OFF) option(REFLECTCPP_BUILD_TESTS "Build tests" OFF) option(REFLECTCPP_CHECK_HEADERS "Make sure that all headers are self-contained" OFF) +set(REFLECTCPP_ENUM_RANGE_MIN "-256" CACHE STRING + "Minimum value scanned during enum reflection") +set(REFLECTCPP_ENUM_RANGE_MAX "256" CACHE STRING + "Maximum value scanned during enum reflection") + option(REFLECTCPP_USE_BUNDLED_DEPENDENCIES "Use the bundled dependencies" ON) option(REFLECTCPP_USE_STD_EXPECTED "Use std::expected instead of the built-in Result type (requires C++-23)" OFF) @@ -233,10 +239,26 @@ if(REFLECTCPP_USE_STD_EXPECTED) target_compile_definitions(reflectcpp PUBLIC REFLECTCPP_USE_STD_EXPECTED) endif() +target_compile_definitions(reflectcpp PRIVATE + RFL_ENUM_RANGE_MIN=${REFLECTCPP_ENUM_RANGE_MIN} + RFL_ENUM_RANGE_MAX=${REFLECTCPP_ENUM_RANGE_MAX} +) + set(REFLECT_CPP_SOURCES src/reflectcpp.cpp ) +set(REFLECT_CPP_MODULES + modules/rfl.cppm +) + +if (REFLECTCPP_JSON OR REFLECTCPP_CHECK_HEADERS) + list(APPEND REFLECT_CPP_MODULES + modules/rfl.json.cppm + modules/rfl.c_arrays_and_inheritance.cppm + ) +endif () + target_include_directories( reflectcpp PUBLIC $ @@ -275,13 +297,14 @@ if (_REFLECTCPP_NEEDS_JSON_IMPL) endif () if (REFLECTCPP_AVRO OR REFLECTCPP_CHECK_HEADERS) + list(APPEND REFLECT_CPP_MODULES modules/rfl.avro.cppm) list(APPEND REFLECT_CPP_SOURCES src/reflectcpp_avro.cpp ) find_package(jansson CONFIG REQUIRED) if (REFLECTCPP_USE_VCPKG) target_include_directories(reflectcpp SYSTEM PRIVATE "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include") - if (MSVC) + if (WIN32) set(_AVRO_STATIC_LIB "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/avro${CMAKE_STATIC_LIBRARY_SUFFIX}") if(REFLECTCPP_BUILD_SHARED) message(STATUS "With whole archive ${_AVRO_STATIC_LIB}") @@ -308,6 +331,7 @@ if (REFLECTCPP_AVRO OR REFLECTCPP_CHECK_HEADERS) endif () if (REFLECTCPP_BSON OR REFLECTCPP_CHECK_HEADERS) + list(APPEND REFLECT_CPP_MODULES modules/rfl.bson.cppm) list(APPEND REFLECT_CPP_SOURCES src/reflectcpp_bson.cpp ) @@ -318,6 +342,7 @@ if (REFLECTCPP_BSON OR REFLECTCPP_CHECK_HEADERS) endif () if (REFLECTCPP_CAPNPROTO OR REFLECTCPP_CHECK_HEADERS) + list(APPEND REFLECT_CPP_MODULES modules/rfl.capnproto.cppm) list(APPEND REFLECT_CPP_SOURCES src/reflectcpp_capnproto.cpp ) @@ -333,6 +358,7 @@ if (REFLECTCPP_CAPNPROTO OR REFLECTCPP_CHECK_HEADERS) endif () if (REFLECTCPP_CBOR OR REFLECTCPP_CHECK_HEADERS) + list(APPEND REFLECT_CPP_MODULES modules/rfl.cbor.cppm) list(APPEND REFLECT_CPP_SOURCES src/reflectcpp_cbor.cpp ) @@ -343,6 +369,7 @@ if (REFLECTCPP_CBOR OR REFLECTCPP_CHECK_HEADERS) endif () if (REFLECTCPP_CEREAL OR REFLECTCPP_CHECK_HEADERS) + list(APPEND REFLECT_CPP_MODULES modules/rfl.cereal.cppm) list(APPEND REFLECT_CPP_SOURCES src/reflectcpp_cereal.cpp ) @@ -353,6 +380,7 @@ if (REFLECTCPP_CEREAL OR REFLECTCPP_CHECK_HEADERS) endif() if (REFLECTCPP_CSV OR REFLECTCPP_CHECK_HEADERS) + list(APPEND REFLECT_CPP_MODULES modules/rfl.csv.cppm) if (NOT TARGET Arrow) find_package(Arrow CONFIG REQUIRED) endif() @@ -364,6 +392,7 @@ if (REFLECTCPP_CSV OR REFLECTCPP_CHECK_HEADERS) endif () if (REFLECTCPP_FLEXBUFFERS OR REFLECTCPP_CHECK_HEADERS) + list(APPEND REFLECT_CPP_MODULES modules/rfl.flexbuf.cppm) list(APPEND REFLECT_CPP_SOURCES src/reflectcpp_flexbuf.cpp ) @@ -374,6 +403,7 @@ if (REFLECTCPP_FLEXBUFFERS OR REFLECTCPP_CHECK_HEADERS) endif () if (REFLECTCPP_MSGPACK OR REFLECTCPP_CHECK_HEADERS) + list(APPEND REFLECT_CPP_MODULES modules/rfl.msgpack.cppm) list(APPEND REFLECT_CPP_SOURCES src/reflectcpp_msgpack.cpp ) @@ -384,6 +414,7 @@ if (REFLECTCPP_MSGPACK OR REFLECTCPP_CHECK_HEADERS) endif () if (REFLECTCPP_PARQUET OR REFLECTCPP_CHECK_HEADERS) + list(APPEND REFLECT_CPP_MODULES modules/rfl.parquet.cppm) if (NOT TARGET Arrow) find_package(Arrow CONFIG REQUIRED) endif() @@ -399,6 +430,7 @@ if (REFLECTCPP_PARQUET OR REFLECTCPP_CHECK_HEADERS) endif () if (REFLECTCPP_TOML OR REFLECTCPP_CHECK_HEADERS) + list(APPEND REFLECT_CPP_MODULES modules/rfl.toml.cppm) list(APPEND REFLECT_CPP_SOURCES src/reflectcpp_toml.cpp ) @@ -409,6 +441,7 @@ if (REFLECTCPP_TOML OR REFLECTCPP_CHECK_HEADERS) endif() if (REFLECTCPP_UBJSON OR REFLECTCPP_CHECK_HEADERS) + list(APPEND REFLECT_CPP_MODULES modules/rfl.ubjson.cppm) list(APPEND REFLECT_CPP_SOURCES src/reflectcpp_ubjson.cpp ) @@ -419,6 +452,7 @@ if (REFLECTCPP_UBJSON OR REFLECTCPP_CHECK_HEADERS) endif () if (REFLECTCPP_XML OR REFLECTCPP_CHECK_HEADERS) + list(APPEND REFLECT_CPP_MODULES modules/rfl.xml.cppm) list(APPEND REFLECT_CPP_SOURCES src/reflectcpp_xml.cpp ) @@ -429,6 +463,7 @@ if (REFLECTCPP_XML OR REFLECTCPP_CHECK_HEADERS) endif () if (REFLECTCPP_YAML OR REFLECTCPP_CHECK_HEADERS) + list(APPEND REFLECT_CPP_MODULES modules/rfl.yaml.cppm) list(APPEND REFLECT_CPP_SOURCES src/reflectcpp_yaml.cpp ) @@ -439,6 +474,7 @@ if (REFLECTCPP_YAML OR REFLECTCPP_CHECK_HEADERS) endif () if (REFLECTCPP_BOOST_SERIALIZATION OR REFLECTCPP_CHECK_HEADERS) + list(APPEND REFLECT_CPP_MODULES modules/rfl.boost_serialization.cppm) list(APPEND REFLECT_CPP_SOURCES src/reflectcpp_boost_serialization.cpp ) @@ -449,6 +485,7 @@ if (REFLECTCPP_BOOST_SERIALIZATION OR REFLECTCPP_CHECK_HEADERS) endif () if (REFLECTCPP_YAS OR REFLECTCPP_CHECK_HEADERS) + list(APPEND REFLECT_CPP_MODULES modules/rfl.yas.cppm) list(APPEND REFLECT_CPP_SOURCES src/reflectcpp_yas.cpp ) @@ -456,8 +493,26 @@ if (REFLECTCPP_YAS OR REFLECTCPP_CHECK_HEADERS) target_include_directories(reflectcpp PRIVATE ${YAS_INCLUDE_DIRS}) endif () +if (REFLECTCPP_CLI OR REFLECTCPP_CHECK_HEADERS) + list(APPEND REFLECT_CPP_MODULES modules/rfl.cli.cppm) +endif () + +set_source_files_properties( + ${REFLECT_CPP_MODULES} + PROPERTIES + LANGUAGE CXX + SKIP_PRECOMPILE_HEADERS ON +) + set_target_properties(reflectcpp PROPERTIES LINKER_LANGUAGE CXX) target_sources(reflectcpp PRIVATE ${REFLECT_CPP_SOURCES}) +target_sources(reflectcpp + PUBLIC + FILE_SET rfl_modules + TYPE CXX_MODULES + BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/modules + FILES ${REFLECT_CPP_MODULES} +) target_precompile_headers(reflectcpp PRIVATE [["rfl.hpp"]] ) if (REFLECTCPP_BUILD_TESTS) @@ -528,7 +583,7 @@ if (REFLECTCPP_INSTALL) DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/reflectcpp" ) - file(GLOB_RECURSE RFL_HEADERS RELATIVE ${CMAKE_CURRENT_LIST_DIR} "${CMAKE_CURRENT_LIST_DIR}/include/*" ) + file(GLOB_RECURSE RFL_HEADERS RELATIVE ${CMAKE_CURRENT_LIST_DIR} "${CMAKE_CURRENT_LIST_DIR}/include/*.h" "${CMAKE_CURRENT_LIST_DIR}/include/*.hpp") target_sources(reflectcpp PUBLIC @@ -541,7 +596,8 @@ if (REFLECTCPP_INSTALL) install( TARGETS reflectcpp EXPORT reflectcpp-exports - FILE_SET reflectcpp_headers DESTINATION ${INCLUDE_INSTALL_DIR} + FILE_SET reflectcpp_headers DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + FILE_SET rfl_modules DESTINATION ${CMAKE_INSTALL_DATADIR}/reflectcpp/modules ) install( @@ -586,4 +642,3 @@ include(CPack) if (ament_cmake_FOUND) ament_package() endif() - diff --git a/README.md b/README.md index 921bed8ce..8132ed318 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,7 @@ reflect-cpp and sqlgen fill important gaps in C++ development. They reduce boile - [Serialization formats](#serialization-formats) - [Feature Overview](#feature-overview) - [Simple Example](#simple-example) + - [C++ modules](#c-modules) - [More Comprehensive Example](#more-comprehensive-example) - [Tabular data](#tabular-data) - [CLI argument parsing](#cli-argument-parsing) @@ -179,6 +180,41 @@ rfl::xml::read(xml_string); rfl::yas::read(yas_bytes); ``` +### C++ modules + +In addition to the classic header-based interface, reflect-cpp ships C++20 +named modules. If your toolchain supports modules, you can replace the +`#include` directives with `import`: + +```cpp +import rfl; +import rfl.json; // one submodule per serialization format, e.g. rfl.yaml, rfl.avro, ... + +struct Person { + std::string first_name; + std::string last_name; + int age; +}; + +const auto homer = + Person{.first_name = "Homer", .last_name = "Simpson", .age = 45}; + +const std::string json_string = rfl::json::write(homer); +auto homer2 = rfl::json::read(json_string).value(); +``` + +The public API is identical to the header-based interface; only the way you +bring the names into scope changes. Building the modules requires CMake `>= 3.28` +and a compiler with C++20 modules support. The module interface units live in +the [`modules/`](modules) directory and are enabled per format via the same +`REFLECTCPP_*` CMake options as the headers. + +> **Note:** When consuming reflect-cpp as a module, the enum reflection range is +> baked into the compiled module interface. Configure it with the +> `REFLECTCPP_ENUM_RANGE_MIN` / `REFLECTCPP_ENUM_RANGE_MAX` CMake variables rather +> than the `RFL_ENUM_RANGE_MIN` / `RFL_ENUM_RANGE_MAX` macros. See the +> [enums documentation](https://rfl.getml.com/enums) for details. + ### More Comprehensive Example ```cpp diff --git a/docs/enums.md b/docs/enums.md index b2280f0ac..81747bc2d 100644 --- a/docs/enums.md +++ b/docs/enums.md @@ -54,6 +54,17 @@ However, some limitations apply: #define RFL_ENUM_RANGE_MAX 128 #include ``` + + If you consume reflect-cpp as a C++ module (`import rfl;`), you cannot define these macros in your own + translation units, because the range is baked into the compiled module interface. Instead, set the + `REFLECTCPP_ENUM_RANGE_MIN` and `REFLECTCPP_ENUM_RANGE_MAX` CMake cache variables when configuring the library: + + ``` + cmake -DREFLECTCPP_ENUM_RANGE_MIN=-128 -DREFLECTCPP_ENUM_RANGE_MAX=128 ... + ``` + + Note that these CMake variables only affect the compiled module interface; they have no effect on header-only + consumers, who should use the `RFL_ENUM_RANGE_MIN`/`RFL_ENUM_RANGE_MAX` macros shown above. - You can specify a custom range for a specific enum by defining the specialization `rfl::config::enum_range` for the enum type : ```cpp diff --git a/docs/rfl_tuple.md b/docs/rfl_tuple.md index 3b785d03b..1566b82eb 100644 --- a/docs/rfl_tuple.md +++ b/docs/rfl_tuple.md @@ -13,4 +13,6 @@ functions. You can use the functions `rfl::get`, `rfl::make_tuple`, `rfl::tuple_element_t`, `rfl::tuple_size_v`, `rfl::tuple_cat` or `rfl::apply` to create or access the tuple and they work the same way as their equivalents in the standard library. -In fact, `std::get` will also work on `rfl::Tuple`. + +The legacy `std::get` overload for `rfl::Tuple` is deprecated. Use `rfl::get` +instead. diff --git a/include/rfl/Tuple.hpp b/include/rfl/Tuple.hpp index c08a4c03e..2e037a31e 100644 --- a/include/rfl/Tuple.hpp +++ b/include/rfl/Tuple.hpp @@ -343,6 +343,7 @@ namespace std { /// @param _tup The Tuple to access. /// @return Reference to the element at the specified index. template +[[deprecated("Use rfl::get instead.")]] constexpr auto& get(rfl::Tuple& _tup) { return _tup.template get<_index>(); } @@ -353,6 +354,7 @@ constexpr auto& get(rfl::Tuple& _tup) { /// @param _tup The Tuple to access. /// @return Const reference to the element at the specified index. template +[[deprecated("Use rfl::get instead.")]] constexpr const auto& get(const rfl::Tuple& _tup) { return _tup.template get<_index>(); } diff --git a/include/rfl/internal/copy_flattened_tuple_to_named_tuple.hpp b/include/rfl/internal/copy_flattened_tuple_to_named_tuple.hpp index 543f1e18e..c7f588b66 100644 --- a/include/rfl/internal/copy_flattened_tuple_to_named_tuple.hpp +++ b/include/rfl/internal/copy_flattened_tuple_to_named_tuple.hpp @@ -16,7 +16,7 @@ auto copy_one_element(const auto& _flattened_tuple) { const auto name_literal = FieldNames::template name_of<_i>(); return rfl::make_field< lit_name_v>>( - std::get<_i>(_flattened_tuple)); + rfl::get<_i>(_flattened_tuple)); } template diff --git a/include/rfl/internal/field_index_by_name.hpp b/include/rfl/internal/field_index_by_name.hpp index 52609b517..c3948d3e6 100644 --- a/include/rfl/internal/field_index_by_name.hpp +++ b/include/rfl/internal/field_index_by_name.hpp @@ -24,10 +24,10 @@ consteval std::string_view field_name_at() { template consteval std::size_t field_index_by_name_impl(std::index_sequence) { std::size_t result = static_cast(-1); - ((field_name_at() == Name.string_view() - ? (result = Is, true) - : false) || - ...); + (void)(((field_name_at() == Name.string_view() + ? (result = Is, true) + : false) || + ...)); return result; } diff --git a/include/rfl/internal/field_index_from_ptm.hpp b/include/rfl/internal/field_index_from_ptm.hpp index 22a7366ae..5377d5817 100644 --- a/include/rfl/internal/field_index_from_ptm.hpp +++ b/include/rfl/internal/field_index_from_ptm.hpp @@ -42,11 +42,11 @@ consteval std::size_t field_index_from_ptm_impl(std::index_sequence) { T obj{}; const void* target = static_cast(&(obj.*FieldPtr)); std::size_t result = static_cast(-1); - ((static_cast(get_ith_field_ptr(Is)>(obj)) == - target - ? (result = Is, true) - : false) || - ...); + (void)(((static_cast( + get_ith_field_ptr(Is)>(obj)) == target + ? (result = Is, true) + : false) || + ...)); return result; #else const void* target = diff --git a/include/rfl/internal/move_from_tuple.hpp b/include/rfl/internal/move_from_tuple.hpp index 0905a5671..1d22cb4bb 100644 --- a/include/rfl/internal/move_from_tuple.hpp +++ b/include/rfl/internal/move_from_tuple.hpp @@ -56,7 +56,7 @@ auto unflatten_ptr_tuple(PtrTupleType& _t, Args... _args) { } else { return unflatten_ptr_tuple( - _t, _args..., std::get<_j>(_t)); + _t, _args..., rfl::get<_j>(_t)); } } } @@ -71,7 +71,7 @@ auto move_from_pointers(Pointers& _ptrs, Args&&... _args) { if constexpr (std::is_pointer_v) { return move_from_pointers(_ptrs, std::move(_args)..., - std::move(*std::get(_ptrs))); + std::move(*rfl::get(_ptrs))); } else { using PtrTupleType = ptr_tuple_t>; @@ -80,7 +80,7 @@ auto move_from_pointers(Pointers& _ptrs, Args&&... _args) { tuple_element_t>::Type>; return move_from_pointers(_ptrs, std::move(_args)..., - move_from_pointers(std::get(_ptrs))); + move_from_pointers(rfl::get(_ptrs))); } } } diff --git a/include/rfl/internal/wrap_in_fields.hpp b/include/rfl/internal/wrap_in_fields.hpp index f536779d1..8c20c3b72 100644 --- a/include/rfl/internal/wrap_in_fields.hpp +++ b/include/rfl/internal/wrap_in_fields.hpp @@ -21,7 +21,7 @@ auto wrap_in_fields(auto&& _tuple, Fields&&... _fields) { if constexpr (i == size) { return rfl::make_tuple(std::move(_fields)...); } else { - auto value = std::move(std::get(_tuple)); + auto value = std::move(rfl::get(_tuple)); using Type = std::remove_cvref_t>; if constexpr (is_flatten_field_v) { // The problem here is that the FieldNames are already flattened, but this diff --git a/modules/rfl.avro.cppm b/modules/rfl.avro.cppm new file mode 100644 index 000000000..371237775 --- /dev/null +++ b/modules/rfl.avro.cppm @@ -0,0 +1,17 @@ +module; + +#include "rfl/avro.hpp" + +export module rfl.avro; + +export import rfl; + +export namespace rfl::avro { +using ::rfl::avro::Schema; +using ::rfl::avro::SchemaImpl; +using ::rfl::avro::load; +using ::rfl::avro::read; +using ::rfl::avro::save; +using ::rfl::avro::to_schema; +using ::rfl::avro::write; +} diff --git a/modules/rfl.boost_serialization.cppm b/modules/rfl.boost_serialization.cppm new file mode 100644 index 000000000..c3f85bba4 --- /dev/null +++ b/modules/rfl.boost_serialization.cppm @@ -0,0 +1,14 @@ +module; + +#include "rfl/boost_serialization.hpp" + +export module rfl.boost_serialization; + +export import rfl; + +export namespace rfl::boost_serialization { +using ::rfl::boost_serialization::load; +using ::rfl::boost_serialization::read; +using ::rfl::boost_serialization::save; +using ::rfl::boost_serialization::write; +} diff --git a/modules/rfl.bson.cppm b/modules/rfl.bson.cppm new file mode 100644 index 000000000..7c367c9f7 --- /dev/null +++ b/modules/rfl.bson.cppm @@ -0,0 +1,16 @@ +module; + +#include "rfl/bson.hpp" + +export module rfl.bson; + +export import rfl; + +export using ::bson_oid_t; + +export namespace rfl::bson { +using ::rfl::bson::load; +using ::rfl::bson::read; +using ::rfl::bson::save; +using ::rfl::bson::write; +} diff --git a/modules/rfl.c_arrays_and_inheritance.cppm b/modules/rfl.c_arrays_and_inheritance.cppm new file mode 100644 index 000000000..90e167a0d --- /dev/null +++ b/modules/rfl.c_arrays_and_inheritance.cppm @@ -0,0 +1,22 @@ +module; + +#define REFLECT_CPP_C_ARRAYS_OR_INHERITANCE +#include "rfl.hpp" +#include "rfl/json.hpp" +#include "rfl/num_fields.hpp" + +export module rfl.c_arrays_and_inheritance; + +export namespace rfl { +using ::rfl::make_field; +using ::rfl::named_tuple_t; +using ::rfl::num_fields; +using ::rfl::replace; +using ::rfl::to_view; +using ::rfl::tuple_element_t; +} + +export namespace rfl::json { +using ::rfl::json::read; +using ::rfl::json::write; +} diff --git a/modules/rfl.capnproto.cppm b/modules/rfl.capnproto.cppm new file mode 100644 index 000000000..97465f812 --- /dev/null +++ b/modules/rfl.capnproto.cppm @@ -0,0 +1,16 @@ +module; + +#include "rfl/capnproto.hpp" + +export module rfl.capnproto; + +export import rfl; + +export namespace rfl::capnproto { +using ::rfl::capnproto::Schema; +using ::rfl::capnproto::load; +using ::rfl::capnproto::read; +using ::rfl::capnproto::save; +using ::rfl::capnproto::to_schema; +using ::rfl::capnproto::write; +} diff --git a/modules/rfl.cbor.cppm b/modules/rfl.cbor.cppm new file mode 100644 index 000000000..28df82b06 --- /dev/null +++ b/modules/rfl.cbor.cppm @@ -0,0 +1,14 @@ +module; + +#include "rfl/cbor.hpp" + +export module rfl.cbor; + +export import rfl; + +export namespace rfl::cbor { +using ::rfl::cbor::load; +using ::rfl::cbor::read; +using ::rfl::cbor::save; +using ::rfl::cbor::write; +} diff --git a/modules/rfl.cereal.cppm b/modules/rfl.cereal.cppm new file mode 100644 index 000000000..ebb9125e7 --- /dev/null +++ b/modules/rfl.cereal.cppm @@ -0,0 +1,14 @@ +module; + +#include "rfl/cereal.hpp" + +export module rfl.cereal; + +export import rfl; + +export namespace rfl::cereal { +using ::rfl::cereal::load; +using ::rfl::cereal::read; +using ::rfl::cereal::save; +using ::rfl::cereal::write; +} diff --git a/modules/rfl.cli.cppm b/modules/rfl.cli.cppm new file mode 100644 index 000000000..4a8882b8c --- /dev/null +++ b/modules/rfl.cli.cppm @@ -0,0 +1,11 @@ +module; + +#include "rfl/cli.hpp" + +export module rfl.cli; + +export import rfl; + +export namespace rfl::cli { +using ::rfl::cli::read; +} diff --git a/modules/rfl.cppm b/modules/rfl.cppm new file mode 100644 index 000000000..85fd70158 --- /dev/null +++ b/modules/rfl.cppm @@ -0,0 +1,128 @@ +module; + +#include "rfl.hpp" +#include "rfl/Deprecated.hpp" +#include "rfl/num_fields.hpp" + +export module rfl; + +export namespace rfl { +using ::rfl::AddNamespacedTagsToVariants; +using ::rfl::AddStructName; +using ::rfl::AddTagsToVariants; +using ::rfl::AllOf; +using ::rfl::AllowRawPtrs; +using ::rfl::AlphaNumeric; +using ::rfl::AnyOf; +using ::rfl::Attribute; +using ::rfl::Binary; +using ::rfl::Box; +using ::rfl::Bytestring; +using ::rfl::CamelCaseToSnakeCase; +using ::rfl::Commented; +using ::rfl::CopyableBox; +using ::rfl::DefaultIfMissing; +using ::rfl::DefaultVal; +using ::rfl::Deprecated; +using ::rfl::Description; +using ::rfl::Email; +using ::rfl::EqualTo; +using ::rfl::Error; +using ::rfl::ExtraFields; +using ::rfl::Field; +using ::rfl::Flatten; +using ::rfl::Generic; +using ::rfl::Hex; +using ::rfl::Literal; +using ::rfl::Maximum; +using ::rfl::Minimum; +using ::rfl::NamedTuple; +using ::rfl::NoExtraFields; +using ::rfl::NoFieldNames; +using ::rfl::NoOptionals; +using ::rfl::Object; +using ::rfl::Oct; +using ::rfl::OneOf; +using ::rfl::PatternValidator; +using ::rfl::Positional; +using ::rfl::Processors; +using ::rfl::Ref; +using ::rfl::Reflector; +using ::rfl::Rename; +using ::rfl::Result; +using ::rfl::Short; +using ::rfl::Size; +using ::rfl::Skip; +using ::rfl::SnakeCaseToCamelCase; +using ::rfl::SnakeCaseToPascalCase; +using ::rfl::TaggedUnion; +using ::rfl::Timestamp; +using ::rfl::Tuple; +using ::rfl::UnderlyingEnums; +using ::rfl::UUIDv4; +using ::rfl::Validator; +using ::rfl::Variant; +using ::rfl::Vectorstring; +using ::rfl::as; +using ::rfl::enum_to_string; +using ::rfl::error; +using ::rfl::fields; +using ::rfl::from_generic; +using ::rfl::from_named_tuple; +using ::rfl::get; +using ::rfl::get_enum_range; +using ::rfl::get_enumerator_array; +using ::rfl::get_enumerators; +using ::rfl::get_if; +using ::rfl::get_underlying_enumerator_array; +using ::rfl::get_underlying_enumerators; +using ::rfl::holds_alternative; +using ::rfl::make_box; +using ::rfl::make_field; +using ::rfl::make_named_tuple; +using ::rfl::make_ref; +using ::rfl::named_tuple_t; +using ::rfl::num_fields; +using ::rfl::operator<=>; +using ::rfl::operator*; +using ::rfl::operator==; +using ::rfl::replace; +using ::rfl::string_to_enum; +using ::rfl::to_generic; +using ::rfl::to_named_tuple; +using ::rfl::to_view; +using ::rfl::tuple_element_t; +using ::rfl::visit; +} + +export namespace rfl::atomic { +using ::rfl::atomic::remove_atomic_t; +using ::rfl::atomic::set_atomic; +} + +export namespace rfl::concepts { +using ::rfl::concepts::BackInsertableByteContainer; +using ::rfl::concepts::ByteLike; +using ::rfl::concepts::ContiguousByteContainer; +using ::rfl::concepts::MutableContiguousByteContainer; +} + +export namespace rfl::config { +using ::rfl::config::enum_descriptions; +using ::rfl::config::enum_range; +} + +export namespace rfl::internal { +using ::rfl::internal::Skip; +using ::rfl::internal::StringLiteral; +using ::rfl::internal::has_default_val_v; +} + +export namespace rfl::internal::enums { +using ::rfl::internal::enums::range_defined; +} + +export namespace rfl::parsing { +using ::rfl::parsing::CustomParser; +using ::rfl::parsing::Parser; +} diff --git a/modules/rfl.csv.cppm b/modules/rfl.csv.cppm new file mode 100644 index 000000000..3d345d7c3 --- /dev/null +++ b/modules/rfl.csv.cppm @@ -0,0 +1,15 @@ +module; + +#include "rfl/csv.hpp" + +export module rfl.csv; + +export import rfl; + +export namespace rfl::csv { +using ::rfl::csv::Settings; +using ::rfl::csv::load; +using ::rfl::csv::read; +using ::rfl::csv::save; +using ::rfl::csv::write; +} diff --git a/modules/rfl.flexbuf.cppm b/modules/rfl.flexbuf.cppm new file mode 100644 index 000000000..45cff8956 --- /dev/null +++ b/modules/rfl.flexbuf.cppm @@ -0,0 +1,14 @@ +module; + +#include "rfl/flexbuf.hpp" + +export module rfl.flexbuf; + +export import rfl; + +export namespace rfl::flexbuf { +using ::rfl::flexbuf::load; +using ::rfl::flexbuf::read; +using ::rfl::flexbuf::save; +using ::rfl::flexbuf::write; +} diff --git a/modules/rfl.json.cppm b/modules/rfl.json.cppm new file mode 100644 index 000000000..75747b28a --- /dev/null +++ b/modules/rfl.json.cppm @@ -0,0 +1,18 @@ +module; + +#include "rfl/json.hpp" + +export module rfl.json; + +export import rfl; + +export namespace rfl::json { +using ::rfl::json::Parser; +using ::rfl::json::Reader; +using ::rfl::json::Writer; +using ::rfl::json::load; +using ::rfl::json::read; +using ::rfl::json::save; +using ::rfl::json::to_schema; +using ::rfl::json::write; +} diff --git a/modules/rfl.msgpack.cppm b/modules/rfl.msgpack.cppm new file mode 100644 index 000000000..481f28249 --- /dev/null +++ b/modules/rfl.msgpack.cppm @@ -0,0 +1,14 @@ +module; + +#include "rfl/msgpack.hpp" + +export module rfl.msgpack; + +export import rfl; + +export namespace rfl::msgpack { +using ::rfl::msgpack::load; +using ::rfl::msgpack::read; +using ::rfl::msgpack::save; +using ::rfl::msgpack::write; +} diff --git a/modules/rfl.parquet.cppm b/modules/rfl.parquet.cppm new file mode 100644 index 000000000..43b335898 --- /dev/null +++ b/modules/rfl.parquet.cppm @@ -0,0 +1,16 @@ +module; + +#include "rfl/parquet.hpp" + +export module rfl.parquet; + +export import rfl; + +export namespace rfl::parquet { +using ::rfl::parquet::Compression; +using ::rfl::parquet::Settings; +using ::rfl::parquet::load; +using ::rfl::parquet::read; +using ::rfl::parquet::save; +using ::rfl::parquet::write; +} diff --git a/modules/rfl.toml.cppm b/modules/rfl.toml.cppm new file mode 100644 index 000000000..52ac9995d --- /dev/null +++ b/modules/rfl.toml.cppm @@ -0,0 +1,14 @@ +module; + +#include "rfl/toml.hpp" + +export module rfl.toml; + +export import rfl; + +export namespace rfl::toml { +using ::rfl::toml::load; +using ::rfl::toml::read; +using ::rfl::toml::save; +using ::rfl::toml::write; +} diff --git a/modules/rfl.ubjson.cppm b/modules/rfl.ubjson.cppm new file mode 100644 index 000000000..448b313a5 --- /dev/null +++ b/modules/rfl.ubjson.cppm @@ -0,0 +1,14 @@ +module; + +#include "rfl/ubjson.hpp" + +export module rfl.ubjson; + +export import rfl; + +export namespace rfl::ubjson { +using ::rfl::ubjson::load; +using ::rfl::ubjson::read; +using ::rfl::ubjson::save; +using ::rfl::ubjson::write; +} diff --git a/modules/rfl.xml.cppm b/modules/rfl.xml.cppm new file mode 100644 index 000000000..4a859d7c1 --- /dev/null +++ b/modules/rfl.xml.cppm @@ -0,0 +1,14 @@ +module; + +#include "rfl/xml.hpp" + +export module rfl.xml; + +export import rfl; + +export namespace rfl::xml { +using ::rfl::xml::load; +using ::rfl::xml::read; +using ::rfl::xml::save; +using ::rfl::xml::write; +} diff --git a/modules/rfl.yaml.cppm b/modules/rfl.yaml.cppm new file mode 100644 index 000000000..fefdef8f7 --- /dev/null +++ b/modules/rfl.yaml.cppm @@ -0,0 +1,15 @@ +module; + +#include "rfl/yaml.hpp" + +export module rfl.yaml; + +export import rfl; + +export namespace rfl::yaml { +using ::rfl::yaml::Writer; +using ::rfl::yaml::load; +using ::rfl::yaml::read; +using ::rfl::yaml::save; +using ::rfl::yaml::write; +} diff --git a/modules/rfl.yas.cppm b/modules/rfl.yas.cppm new file mode 100644 index 000000000..1074e77d4 --- /dev/null +++ b/modules/rfl.yas.cppm @@ -0,0 +1,14 @@ +module; + +#include "rfl/yas.hpp" + +export module rfl.yas; + +export import rfl; + +export namespace rfl::yas { +using ::rfl::yas::load; +using ::rfl::yas::read; +using ::rfl::yas::save; +using ::rfl::yas::write; +} diff --git a/reflectcpp-config.cmake.in b/reflectcpp-config.cmake.in index a1ba06899..e25c4da9b 100644 --- a/reflectcpp-config.cmake.in +++ b/reflectcpp-config.cmake.in @@ -1,6 +1,7 @@ @PACKAGE_INIT@ set(REFLECTCPP_JSON @REFLECTCPP_JSON@) +set(REFLECTCPP_CLI @REFLECTCPP_CLI@) set(REFLECTCPP_BOOST_SERIALIZATION @REFLECTCPP_BOOST_SERIALIZATION@) set(REFLECTCPP_BSON @REFLECTCPP_BSON@) set(REFLECTCPP_CAPNPROTO @REFLECTCPP_CAPNPROTO@) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index d68b3a0fa..11fa767f6 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -14,6 +14,9 @@ if (REFLECTCPP_JSON) add_subdirectory(generic) add_subdirectory(json) add_subdirectory(json_c_arrays_and_inheritance) +endif () + +if (REFLECTCPP_CLI) add_subdirectory(cli) endif () diff --git a/tests/avro/CMakeLists.txt b/tests/avro/CMakeLists.txt index bca216303..0686a08ae 100644 --- a/tests/avro/CMakeLists.txt +++ b/tests/avro/CMakeLists.txt @@ -6,7 +6,7 @@ add_executable( reflect-cpp-avro-tests ${SOURCES} ) -target_precompile_headers(reflect-cpp-avro-tests PRIVATE [["rfl.hpp"]] ) +target_precompile_headers(reflect-cpp-avro-tests PRIVATE ) target_link_libraries(reflect-cpp-avro-tests PRIVATE reflectcpp_tests_crt) diff --git a/tests/avro/test_add_struct_name.cpp b/tests/avro/test_add_struct_name.cpp index 87324e61e..658e652d8 100644 --- a/tests/avro/test_add_struct_name.cpp +++ b/tests/avro/test_add_struct_name.cpp @@ -2,6 +2,7 @@ #include #include "write_and_read.hpp" +import rfl.avro; namespace test_add_struct_name { diff --git a/tests/avro/test_array.cpp b/tests/avro/test_array.cpp index 9c8e5e485..45f68665a 100644 --- a/tests/avro/test_array.cpp +++ b/tests/avro/test_array.cpp @@ -1,13 +1,16 @@ #include #include -#include #include // Make sure things still compile when // rfl.hpp is included after rfl/avro.hpp. -#include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.avro; + namespace test_array { diff --git a/tests/avro/test_box.cpp b/tests/avro/test_box.cpp index 151f85830..4e861ad3a 100644 --- a/tests/avro/test_box.cpp +++ b/tests/avro/test_box.cpp @@ -1,7 +1,11 @@ #include -#include #include "write_and_read.hpp" +#include + +import rfl.avro; +import rfl; + namespace test_box { diff --git a/tests/avro/test_bytestring.cpp b/tests/avro/test_bytestring.cpp index 29fe59e86..106c4daf5 100644 --- a/tests/avro/test_bytestring.cpp +++ b/tests/avro/test_bytestring.cpp @@ -1,6 +1,10 @@ -#include #include "write_and_read.hpp" +#include + +import rfl.avro; +import rfl; + namespace test_bytestring { diff --git a/tests/avro/test_combined_processors.cpp b/tests/avro/test_combined_processors.cpp index 354815b42..1c572b2e0 100644 --- a/tests/avro/test_combined_processors.cpp +++ b/tests/avro/test_combined_processors.cpp @@ -2,6 +2,7 @@ #include #include "write_and_read.hpp" +import rfl.avro; namespace test_combined_processors { diff --git a/tests/avro/test_custom_class1.cpp b/tests/avro/test_custom_class1.cpp index bca796ee5..1da15c3cb 100644 --- a/tests/avro/test_custom_class1.cpp +++ b/tests/avro/test_custom_class1.cpp @@ -1,9 +1,11 @@ #include -#include #include #include #include "write_and_read.hpp" +import rfl.avro; +import rfl; + namespace test_custom_class1 { diff --git a/tests/avro/test_custom_class3.cpp b/tests/avro/test_custom_class3.cpp index 715771c65..9554a90f4 100644 --- a/tests/avro/test_custom_class3.cpp +++ b/tests/avro/test_custom_class3.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.avro; +import rfl; + namespace test_custom_class3 { diff --git a/tests/avro/test_custom_class4.cpp b/tests/avro/test_custom_class4.cpp index 0db5f0cad..4a4b73566 100644 --- a/tests/avro/test_custom_class4.cpp +++ b/tests/avro/test_custom_class4.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.avro; +import rfl; + namespace test_custom_class4 { diff --git a/tests/avro/test_default_values.cpp b/tests/avro/test_default_values.cpp index 59a2b8cce..68af5aab8 100644 --- a/tests/avro/test_default_values.cpp +++ b/tests/avro/test_default_values.cpp @@ -1,9 +1,11 @@ #include -#include #include #include #include "write_and_read.hpp" +import rfl.avro; +import rfl; + namespace test_default_values { diff --git a/tests/avro/test_deque.cpp b/tests/avro/test_deque.cpp index a8832f224..054c5a6e0 100644 --- a/tests/avro/test_deque.cpp +++ b/tests/avro/test_deque.cpp @@ -1,7 +1,13 @@ -#include #include #include "write_and_read.hpp" +#include +#include +#include + +import rfl.avro; +import rfl; + namespace test_deque { diff --git a/tests/avro/test_enum.cpp b/tests/avro/test_enum.cpp index bafe9fadf..355d42825 100644 --- a/tests/avro/test_enum.cpp +++ b/tests/avro/test_enum.cpp @@ -1,8 +1,10 @@ #include -#include -#include #include "write_and_read.hpp" +import rfl.avro; +import rfl; +import rfl.json; + namespace test_enum { diff --git a/tests/avro/test_field_variant.cpp b/tests/avro/test_field_variant.cpp index 759280f54..ead6c6d74 100644 --- a/tests/avro/test_field_variant.cpp +++ b/tests/avro/test_field_variant.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.avro; +import rfl; + namespace test_field_variant { diff --git a/tests/avro/test_field_variant_std.cpp b/tests/avro/test_field_variant_std.cpp index 473e3ab79..0237a7301 100644 --- a/tests/avro/test_field_variant_std.cpp +++ b/tests/avro/test_field_variant_std.cpp @@ -1,7 +1,11 @@ #include -#include #include "write_and_read.hpp" +#include + +import rfl.avro; +import rfl; + namespace test_field_variant_std { diff --git a/tests/avro/test_flag_enum.cpp b/tests/avro/test_flag_enum.cpp index 39e62e2be..a0fa270be 100644 --- a/tests/avro/test_flag_enum.cpp +++ b/tests/avro/test_flag_enum.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.avro; +import rfl; + namespace test_flag_enum { diff --git a/tests/avro/test_flag_enum_with_int.cpp b/tests/avro/test_flag_enum_with_int.cpp index 45544b6ad..53c24bb5b 100644 --- a/tests/avro/test_flag_enum_with_int.cpp +++ b/tests/avro/test_flag_enum_with_int.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.avro; +import rfl; + namespace test_flag_enum_with_int { diff --git a/tests/avro/test_flatten.cpp b/tests/avro/test_flatten.cpp index 4325afad1..675f6e960 100644 --- a/tests/avro/test_flatten.cpp +++ b/tests/avro/test_flatten.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.avro; +import rfl; + namespace test_flatten { diff --git a/tests/avro/test_flatten_anonymous.cpp b/tests/avro/test_flatten_anonymous.cpp index 8212f3e8f..fb20815db 100644 --- a/tests/avro/test_flatten_anonymous.cpp +++ b/tests/avro/test_flatten_anonymous.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.avro; +import rfl; + namespace test_flatten_anonymous { diff --git a/tests/avro/test_float_and_int.cpp b/tests/avro/test_float_and_int.cpp index 091dcb3dd..1558e04ee 100644 --- a/tests/avro/test_float_and_int.cpp +++ b/tests/avro/test_float_and_int.cpp @@ -2,6 +2,7 @@ #include #include "write_and_read.hpp" +import rfl.avro; namespace test_float_and_int { diff --git a/tests/avro/test_forward_list.cpp b/tests/avro/test_forward_list.cpp index 9e964779a..9bafab81e 100644 --- a/tests/avro/test_forward_list.cpp +++ b/tests/avro/test_forward_list.cpp @@ -1,7 +1,13 @@ -#include #include #include "write_and_read.hpp" +#include +#include +#include + +import rfl.avro; +import rfl; + namespace test_forward_list { diff --git a/tests/avro/test_literal.cpp b/tests/avro/test_literal.cpp index 6a891e9ad..55535f90a 100644 --- a/tests/avro/test_literal.cpp +++ b/tests/avro/test_literal.cpp @@ -1,9 +1,11 @@ #include -#include -#include #include #include "write_and_read.hpp" +import rfl.avro; +import rfl; +import rfl.json; + namespace test_literal { diff --git a/tests/avro/test_literal_map.cpp b/tests/avro/test_literal_map.cpp index e6c408be0..fca66cda8 100644 --- a/tests/avro/test_literal_map.cpp +++ b/tests/avro/test_literal_map.cpp @@ -1,9 +1,11 @@ #include #include -#include #include #include "write_and_read.hpp" +import rfl.avro; +import rfl; + namespace test_literal_map { diff --git a/tests/avro/test_map.cpp b/tests/avro/test_map.cpp index 55e9cf5df..0217b05d0 100644 --- a/tests/avro/test_map.cpp +++ b/tests/avro/test_map.cpp @@ -1,9 +1,14 @@ #include -#include -#include #include #include "write_and_read.hpp" +#include +#include + +import rfl.avro; +import rfl; +import rfl.json; + namespace test_map { diff --git a/tests/avro/test_map2.cpp b/tests/avro/test_map2.cpp index 852fd58ec..ae781ba62 100644 --- a/tests/avro/test_map2.cpp +++ b/tests/avro/test_map2.cpp @@ -1,9 +1,13 @@ #include -#include -#include #include #include "write_and_read.hpp" +#include + +import rfl.avro; +import rfl; +import rfl.json; + namespace test_map2 { diff --git a/tests/avro/test_monster_example.cpp b/tests/avro/test_monster_example.cpp index ef8ba215b..ebf912b0f 100644 --- a/tests/avro/test_monster_example.cpp +++ b/tests/avro/test_monster_example.cpp @@ -1,8 +1,10 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.avro; +import rfl; + namespace test_monster_example { diff --git a/tests/avro/test_optional_fields.cpp b/tests/avro/test_optional_fields.cpp index 0df4d7e1e..9325cfb0f 100644 --- a/tests/avro/test_optional_fields.cpp +++ b/tests/avro/test_optional_fields.cpp @@ -1,9 +1,13 @@ -#include -#include #include #include #include "write_and_read.hpp" +#include + +import rfl.avro; +import rfl; +import rfl.json; + namespace test_optional_fields { diff --git a/tests/avro/test_readme_example.cpp b/tests/avro/test_readme_example.cpp index 38dc1880c..310aa6848 100644 --- a/tests/avro/test_readme_example.cpp +++ b/tests/avro/test_readme_example.cpp @@ -1,8 +1,10 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.avro; +import rfl; + namespace test_readme_example { diff --git a/tests/avro/test_readme_example2.cpp b/tests/avro/test_readme_example2.cpp index 1fd0cf5a1..635d53ba6 100644 --- a/tests/avro/test_readme_example2.cpp +++ b/tests/avro/test_readme_example2.cpp @@ -1,7 +1,9 @@ -#include #include #include "write_and_read.hpp" +import rfl.avro; +import rfl; + namespace test_readme_example2 { diff --git a/tests/avro/test_readme_example3.cpp b/tests/avro/test_readme_example3.cpp index fbeb3d7bc..a2520ae7e 100644 --- a/tests/avro/test_readme_example3.cpp +++ b/tests/avro/test_readme_example3.cpp @@ -1,8 +1,10 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.avro; +import rfl; + namespace test_readme_example3 { diff --git a/tests/avro/test_ref.cpp b/tests/avro/test_ref.cpp index 892dd9087..d2627475c 100644 --- a/tests/avro/test_ref.cpp +++ b/tests/avro/test_ref.cpp @@ -1,7 +1,11 @@ #include -#include #include "write_and_read.hpp" +#include + +import rfl.avro; +import rfl; + namespace test_ref { diff --git a/tests/avro/test_regression_bugs.cpp b/tests/avro/test_regression_bugs.cpp index 58f75a9f4..e7de26ed0 100644 --- a/tests/avro/test_regression_bugs.cpp +++ b/tests/avro/test_regression_bugs.cpp @@ -2,10 +2,10 @@ #include #include +import rfl; +import rfl.avro; + -#include -#include -#include // avro::SchemaImpl move-assignment — double-decrement / use-after-free // File: src/rfl/avro/SchemaImpl.cpp:34-42 diff --git a/tests/avro/test_rfl_tuple.cpp b/tests/avro/test_rfl_tuple.cpp index f33a84adc..7edac2f33 100644 --- a/tests/avro/test_rfl_tuple.cpp +++ b/tests/avro/test_rfl_tuple.cpp @@ -1,10 +1,14 @@ #include -#include -#include #include #include "write_and_read.hpp" +#include + +import rfl.avro; +import rfl; +import rfl.json; + namespace test_rfl_tuple { diff --git a/tests/avro/test_rfl_variant.cpp b/tests/avro/test_rfl_variant.cpp index f3439b378..77554f4fa 100644 --- a/tests/avro/test_rfl_variant.cpp +++ b/tests/avro/test_rfl_variant.cpp @@ -1,7 +1,11 @@ #include -#include #include "write_and_read.hpp" +#include + +import rfl.avro; +import rfl; + namespace test_variant { diff --git a/tests/avro/test_save_load.cpp b/tests/avro/test_save_load.cpp index a5ba510a1..a2c9adc15 100644 --- a/tests/avro/test_save_load.cpp +++ b/tests/avro/test_save_load.cpp @@ -1,10 +1,11 @@ #include -#include -#include #include #include #include +import rfl; +import rfl.avro; + namespace test_save_load { diff --git a/tests/avro/test_set.cpp b/tests/avro/test_set.cpp index a80b0e445..5a07ded92 100644 --- a/tests/avro/test_set.cpp +++ b/tests/avro/test_set.cpp @@ -1,7 +1,13 @@ -#include #include #include "write_and_read.hpp" +#include +#include +#include + +import rfl.avro; +import rfl; + namespace test_set { diff --git a/tests/avro/test_shared_ptr.cpp b/tests/avro/test_shared_ptr.cpp index 31c91b299..e1558a93a 100644 --- a/tests/avro/test_shared_ptr.cpp +++ b/tests/avro/test_shared_ptr.cpp @@ -1,10 +1,14 @@ #include -#include -#include #include #include #include "write_and_read.hpp" +#include + +import rfl.avro; +import rfl; +import rfl.json; + namespace test_shared_ptr { diff --git a/tests/avro/test_size.cpp b/tests/avro/test_size.cpp index 7ea307269..598ac887a 100644 --- a/tests/avro/test_size.cpp +++ b/tests/avro/test_size.cpp @@ -1,8 +1,10 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.avro; +import rfl; + namespace test_size { diff --git a/tests/avro/test_snake_case_to_camel_case.cpp b/tests/avro/test_snake_case_to_camel_case.cpp index 3a2b10643..8b3e65608 100644 --- a/tests/avro/test_snake_case_to_camel_case.cpp +++ b/tests/avro/test_snake_case_to_camel_case.cpp @@ -2,6 +2,7 @@ #include #include "write_and_read.hpp" +import rfl.avro; namespace test_snake_case_to_camel_case { diff --git a/tests/avro/test_snake_case_to_pascal_case.cpp b/tests/avro/test_snake_case_to_pascal_case.cpp index 7c623d0ba..99fbc5a53 100644 --- a/tests/avro/test_snake_case_to_pascal_case.cpp +++ b/tests/avro/test_snake_case_to_pascal_case.cpp @@ -2,6 +2,7 @@ #include #include "write_and_read.hpp" +import rfl.avro; namespace test_snake_case_to_pascal_case { diff --git a/tests/avro/test_string_map.cpp b/tests/avro/test_string_map.cpp index ad6869d14..16102a787 100644 --- a/tests/avro/test_string_map.cpp +++ b/tests/avro/test_string_map.cpp @@ -1,10 +1,12 @@ #include #include -#include -#include #include #include "write_and_read.hpp" +import rfl.avro; +import rfl; +import rfl.json; + namespace test_string_map { TEST(avro, test_string_map) { diff --git a/tests/avro/test_tagged_union.cpp b/tests/avro/test_tagged_union.cpp index f00617dc0..6bea20742 100644 --- a/tests/avro/test_tagged_union.cpp +++ b/tests/avro/test_tagged_union.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.avro; +import rfl; + namespace test_tagged_union { diff --git a/tests/avro/test_timestamp.cpp b/tests/avro/test_timestamp.cpp index cc13d0bff..c50056e2a 100644 --- a/tests/avro/test_timestamp.cpp +++ b/tests/avro/test_timestamp.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.avro; +import rfl; + namespace test_timestamp { diff --git a/tests/avro/test_tuple.cpp b/tests/avro/test_tuple.cpp index 98dde5d4f..93b2a1f54 100644 --- a/tests/avro/test_tuple.cpp +++ b/tests/avro/test_tuple.cpp @@ -1,11 +1,15 @@ #include -#include -#include #include #include #include "write_and_read.hpp" +#include + +import rfl.avro; +import rfl; +import rfl.json; + namespace test_tuple { diff --git a/tests/avro/test_tutorial_example.cpp b/tests/avro/test_tutorial_example.cpp index 04f36fd46..7c19ede96 100644 --- a/tests/avro/test_tutorial_example.cpp +++ b/tests/avro/test_tutorial_example.cpp @@ -1,8 +1,9 @@ #include -#include -#include #include +import rfl; +import rfl.avro; + /// The basic example from the Avro C tutorial. namespace test_tutorial_example { diff --git a/tests/avro/test_tutorial_example_automated_schema.cpp b/tests/avro/test_tutorial_example_automated_schema.cpp index d67a9959d..a6ac53945 100644 --- a/tests/avro/test_tutorial_example_automated_schema.cpp +++ b/tests/avro/test_tutorial_example_automated_schema.cpp @@ -1,10 +1,11 @@ #include -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.avro; + /// The basic example from the Avro C tutorial. namespace test_tutorial_example_automated_schema { diff --git a/tests/avro/test_unique_ptr.cpp b/tests/avro/test_unique_ptr.cpp index c48ad3867..c28e56a6b 100644 --- a/tests/avro/test_unique_ptr.cpp +++ b/tests/avro/test_unique_ptr.cpp @@ -1,10 +1,14 @@ #include -#include -#include #include #include #include "write_and_read.hpp" +#include + +import rfl.avro; +import rfl; +import rfl.json; + namespace test_unique_ptr { diff --git a/tests/avro/test_unique_ptr2.cpp b/tests/avro/test_unique_ptr2.cpp index b42255faf..7375288a8 100644 --- a/tests/avro/test_unique_ptr2.cpp +++ b/tests/avro/test_unique_ptr2.cpp @@ -1,7 +1,12 @@ #include -#include #include "write_and_read.hpp" +#include +#include + +import rfl.avro; +import rfl; + namespace test_unique_ptr2 { diff --git a/tests/avro/test_variant.cpp b/tests/avro/test_variant.cpp index 80ad28190..18506ccef 100644 --- a/tests/avro/test_variant.cpp +++ b/tests/avro/test_variant.cpp @@ -1,7 +1,12 @@ #include -#include #include "write_and_read.hpp" +#include +#include + +import rfl.avro; +import rfl; + namespace test_variant { diff --git a/tests/avro/test_wstring.cpp b/tests/avro/test_wstring.cpp index 2810272ea..eeee1aea2 100644 --- a/tests/avro/test_wstring.cpp +++ b/tests/avro/test_wstring.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.avro; +import rfl; + struct TestStruct { std::string theNormalString; diff --git a/tests/avro/write_and_read.hpp b/tests/avro/write_and_read.hpp index f60168b7f..fb476b082 100644 --- a/tests/avro/write_and_read.hpp +++ b/tests/avro/write_and_read.hpp @@ -3,9 +3,12 @@ #include -#include -#include #include +#include + +import rfl.json; +import rfl.avro; + template void write_and_read(const auto& _struct) { diff --git a/tests/boost_serialization/CMakeLists.txt b/tests/boost_serialization/CMakeLists.txt index 84c9cab26..566b75493 100644 --- a/tests/boost_serialization/CMakeLists.txt +++ b/tests/boost_serialization/CMakeLists.txt @@ -6,7 +6,7 @@ add_executable( reflect-cpp-boost-serialization-tests ${SOURCES} ) -target_precompile_headers(reflect-cpp-boost-serialization-tests PRIVATE [["rfl.hpp"]] ) +target_precompile_headers(reflect-cpp-boost-serialization-tests PRIVATE ) target_link_libraries(reflect-cpp-boost-serialization-tests PRIVATE reflectcpp_tests_crt) diff --git a/tests/boost_serialization/test_add_struct_name.cpp b/tests/boost_serialization/test_add_struct_name.cpp index 55a4cb4e7..c56bdd8ca 100644 --- a/tests/boost_serialization/test_add_struct_name.cpp +++ b/tests/boost_serialization/test_add_struct_name.cpp @@ -2,6 +2,7 @@ #include #include "write_and_read.hpp" +import rfl.boost_serialization; namespace test_add_struct_name { diff --git a/tests/boost_serialization/test_array.cpp b/tests/boost_serialization/test_array.cpp index 67e286db6..854c3f66a 100644 --- a/tests/boost_serialization/test_array.cpp +++ b/tests/boost_serialization/test_array.cpp @@ -1,13 +1,16 @@ #include #include -#include #include // Make sure things still compile when // rfl.hpp is included after rfl/cbor.hpp. -#include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.boost_serialization; + namespace test_array { diff --git a/tests/boost_serialization/test_box.cpp b/tests/boost_serialization/test_box.cpp index 1afcdff58..c0275ed64 100644 --- a/tests/boost_serialization/test_box.cpp +++ b/tests/boost_serialization/test_box.cpp @@ -1,7 +1,11 @@ #include -#include #include "write_and_read.hpp" +#include + +import rfl.boost_serialization; +import rfl; + namespace test_box { diff --git a/tests/boost_serialization/test_combined_processors.cpp b/tests/boost_serialization/test_combined_processors.cpp index 7f5e041fe..366e9c59e 100644 --- a/tests/boost_serialization/test_combined_processors.cpp +++ b/tests/boost_serialization/test_combined_processors.cpp @@ -2,6 +2,7 @@ #include #include "write_and_read.hpp" +import rfl.boost_serialization; namespace test_combined_processors { diff --git a/tests/boost_serialization/test_custom_class1.cpp b/tests/boost_serialization/test_custom_class1.cpp index b07d3746a..a33582df0 100644 --- a/tests/boost_serialization/test_custom_class1.cpp +++ b/tests/boost_serialization/test_custom_class1.cpp @@ -1,9 +1,11 @@ #include -#include #include #include #include "write_and_read.hpp" +import rfl.boost_serialization; +import rfl; + namespace test_custom_class1 { diff --git a/tests/boost_serialization/test_custom_class3.cpp b/tests/boost_serialization/test_custom_class3.cpp index 79510b45e..9d398c5bb 100644 --- a/tests/boost_serialization/test_custom_class3.cpp +++ b/tests/boost_serialization/test_custom_class3.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.boost_serialization; +import rfl; + namespace test_custom_class3 { diff --git a/tests/boost_serialization/test_custom_class4.cpp b/tests/boost_serialization/test_custom_class4.cpp index 4cb88bc70..124284e0f 100644 --- a/tests/boost_serialization/test_custom_class4.cpp +++ b/tests/boost_serialization/test_custom_class4.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.boost_serialization; +import rfl; + namespace test_custom_class4 { diff --git a/tests/boost_serialization/test_default_values.cpp b/tests/boost_serialization/test_default_values.cpp index 1a55dfd86..44e5ed076 100644 --- a/tests/boost_serialization/test_default_values.cpp +++ b/tests/boost_serialization/test_default_values.cpp @@ -1,9 +1,11 @@ #include -#include #include #include #include "write_and_read.hpp" +import rfl.boost_serialization; +import rfl; + namespace test_default_values { diff --git a/tests/boost_serialization/test_deque.cpp b/tests/boost_serialization/test_deque.cpp index 55a3373a6..8434d8b62 100644 --- a/tests/boost_serialization/test_deque.cpp +++ b/tests/boost_serialization/test_deque.cpp @@ -1,7 +1,13 @@ -#include #include #include "write_and_read.hpp" +#include +#include +#include + +import rfl.boost_serialization; +import rfl; + namespace test_deque { diff --git a/tests/boost_serialization/test_enum.cpp b/tests/boost_serialization/test_enum.cpp index a26019ab8..b5ded05d4 100644 --- a/tests/boost_serialization/test_enum.cpp +++ b/tests/boost_serialization/test_enum.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.boost_serialization; +import rfl; + namespace test_enum { diff --git a/tests/boost_serialization/test_field_variant.cpp b/tests/boost_serialization/test_field_variant.cpp index eb94c59f4..5dedfc3fb 100644 --- a/tests/boost_serialization/test_field_variant.cpp +++ b/tests/boost_serialization/test_field_variant.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.boost_serialization; +import rfl; + namespace test_field_variant { diff --git a/tests/boost_serialization/test_flag_enum.cpp b/tests/boost_serialization/test_flag_enum.cpp index 8d09cdd51..03f07e19b 100644 --- a/tests/boost_serialization/test_flag_enum.cpp +++ b/tests/boost_serialization/test_flag_enum.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.boost_serialization; +import rfl; + namespace test_flag_enum { diff --git a/tests/boost_serialization/test_flag_enum_with_int.cpp b/tests/boost_serialization/test_flag_enum_with_int.cpp index d4e887f08..e3554758d 100644 --- a/tests/boost_serialization/test_flag_enum_with_int.cpp +++ b/tests/boost_serialization/test_flag_enum_with_int.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.boost_serialization; +import rfl; + namespace test_flag_enum_with_int { diff --git a/tests/boost_serialization/test_flatten.cpp b/tests/boost_serialization/test_flatten.cpp index d8a5d6ca7..ce4b4146e 100644 --- a/tests/boost_serialization/test_flatten.cpp +++ b/tests/boost_serialization/test_flatten.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.boost_serialization; +import rfl; + namespace test_flatten { diff --git a/tests/boost_serialization/test_flatten_anonymous.cpp b/tests/boost_serialization/test_flatten_anonymous.cpp index bfad4b0dc..0bfafaf58 100644 --- a/tests/boost_serialization/test_flatten_anonymous.cpp +++ b/tests/boost_serialization/test_flatten_anonymous.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.boost_serialization; +import rfl; + namespace test_flatten_anonymous { diff --git a/tests/boost_serialization/test_forward_list.cpp b/tests/boost_serialization/test_forward_list.cpp index 801c52956..945d6595a 100644 --- a/tests/boost_serialization/test_forward_list.cpp +++ b/tests/boost_serialization/test_forward_list.cpp @@ -1,7 +1,13 @@ -#include #include #include "write_and_read.hpp" +#include +#include +#include + +import rfl.boost_serialization; +import rfl; + namespace test_forward_list { diff --git a/tests/boost_serialization/test_generic.cpp b/tests/boost_serialization/test_generic.cpp index 5a11024b3..3c7079c23 100644 --- a/tests/boost_serialization/test_generic.cpp +++ b/tests/boost_serialization/test_generic.cpp @@ -1,8 +1,9 @@ -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.boost_serialization; + namespace test_generic { diff --git a/tests/boost_serialization/test_literal.cpp b/tests/boost_serialization/test_literal.cpp index 519d85c46..c543ec3f0 100644 --- a/tests/boost_serialization/test_literal.cpp +++ b/tests/boost_serialization/test_literal.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.boost_serialization; +import rfl; + namespace test_literal { diff --git a/tests/boost_serialization/test_literal_map.cpp b/tests/boost_serialization/test_literal_map.cpp index c3335248b..cb033b85c 100644 --- a/tests/boost_serialization/test_literal_map.cpp +++ b/tests/boost_serialization/test_literal_map.cpp @@ -1,9 +1,11 @@ #include #include -#include #include #include "write_and_read.hpp" +import rfl.boost_serialization; +import rfl; + namespace test_literal_map { diff --git a/tests/boost_serialization/test_map.cpp b/tests/boost_serialization/test_map.cpp index d8d463f4e..d0b365a21 100644 --- a/tests/boost_serialization/test_map.cpp +++ b/tests/boost_serialization/test_map.cpp @@ -1,8 +1,12 @@ #include -#include #include #include "write_and_read.hpp" +#include + +import rfl.boost_serialization; +import rfl; + namespace test_map { diff --git a/tests/boost_serialization/test_map_with_key_validation.cpp b/tests/boost_serialization/test_map_with_key_validation.cpp index 4a422b1c2..104abc19d 100644 --- a/tests/boost_serialization/test_map_with_key_validation.cpp +++ b/tests/boost_serialization/test_map_with_key_validation.cpp @@ -1,8 +1,13 @@ #include -#include #include #include "write_and_read.hpp" +#include +#include + +import rfl.boost_serialization; +import rfl; + namespace test_map_with_key_validation { diff --git a/tests/boost_serialization/test_monster_example.cpp b/tests/boost_serialization/test_monster_example.cpp index b3c412ee1..f0ed69ba9 100644 --- a/tests/boost_serialization/test_monster_example.cpp +++ b/tests/boost_serialization/test_monster_example.cpp @@ -1,8 +1,10 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.boost_serialization; +import rfl; + namespace test_monster_example { diff --git a/tests/boost_serialization/test_readme_example.cpp b/tests/boost_serialization/test_readme_example.cpp index 173770538..670d107ac 100644 --- a/tests/boost_serialization/test_readme_example.cpp +++ b/tests/boost_serialization/test_readme_example.cpp @@ -1,8 +1,10 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.boost_serialization; +import rfl; + namespace test_readme_example { diff --git a/tests/boost_serialization/test_readme_example2.cpp b/tests/boost_serialization/test_readme_example2.cpp index 83529ab2d..7179b0f6a 100644 --- a/tests/boost_serialization/test_readme_example2.cpp +++ b/tests/boost_serialization/test_readme_example2.cpp @@ -1,7 +1,9 @@ -#include #include #include "write_and_read.hpp" +import rfl.boost_serialization; +import rfl; + namespace test_readme_example2 { diff --git a/tests/boost_serialization/test_ref.cpp b/tests/boost_serialization/test_ref.cpp index c019a181d..a6f060642 100644 --- a/tests/boost_serialization/test_ref.cpp +++ b/tests/boost_serialization/test_ref.cpp @@ -1,7 +1,11 @@ #include -#include #include "write_and_read.hpp" +#include + +import rfl.boost_serialization; +import rfl; + namespace test_ref { diff --git a/tests/boost_serialization/test_save_load.cpp b/tests/boost_serialization/test_save_load.cpp index e97c6e982..1e75dc5ae 100644 --- a/tests/boost_serialization/test_save_load.cpp +++ b/tests/boost_serialization/test_save_load.cpp @@ -1,10 +1,11 @@ #include #include -#include -#include #include #include +import rfl; +import rfl.boost_serialization; + namespace test_save_load { diff --git a/tests/boost_serialization/test_set.cpp b/tests/boost_serialization/test_set.cpp index f783bb2c7..b4aeb1439 100644 --- a/tests/boost_serialization/test_set.cpp +++ b/tests/boost_serialization/test_set.cpp @@ -1,7 +1,13 @@ -#include #include #include "write_and_read.hpp" +#include +#include +#include + +import rfl.boost_serialization; +import rfl; + namespace test_set { diff --git a/tests/boost_serialization/test_size.cpp b/tests/boost_serialization/test_size.cpp index 3c91004c2..f7d60d3f9 100644 --- a/tests/boost_serialization/test_size.cpp +++ b/tests/boost_serialization/test_size.cpp @@ -1,8 +1,10 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.boost_serialization; +import rfl; + namespace test_size { diff --git a/tests/boost_serialization/test_snake_case_to_camel_case.cpp b/tests/boost_serialization/test_snake_case_to_camel_case.cpp index 20f108a71..bd89d554f 100644 --- a/tests/boost_serialization/test_snake_case_to_camel_case.cpp +++ b/tests/boost_serialization/test_snake_case_to_camel_case.cpp @@ -2,6 +2,7 @@ #include #include "write_and_read.hpp" +import rfl.boost_serialization; namespace test_snake_case_to_camel_case { diff --git a/tests/boost_serialization/test_snake_case_to_pascal_case.cpp b/tests/boost_serialization/test_snake_case_to_pascal_case.cpp index df0a81234..64ec11f37 100644 --- a/tests/boost_serialization/test_snake_case_to_pascal_case.cpp +++ b/tests/boost_serialization/test_snake_case_to_pascal_case.cpp @@ -2,6 +2,7 @@ #include #include "write_and_read.hpp" +import rfl.boost_serialization; namespace test_snake_case_to_pascal_case { diff --git a/tests/boost_serialization/test_string_map.cpp b/tests/boost_serialization/test_string_map.cpp index 14887045b..ecd2619e3 100644 --- a/tests/boost_serialization/test_string_map.cpp +++ b/tests/boost_serialization/test_string_map.cpp @@ -1,9 +1,11 @@ #include #include -#include #include #include "write_and_read.hpp" +import rfl.boost_serialization; +import rfl; + namespace test_string_map { TEST(boost_serialization, test_string_map) { diff --git a/tests/boost_serialization/test_tagged_union.cpp b/tests/boost_serialization/test_tagged_union.cpp index 956292bfa..baa8f9d8e 100644 --- a/tests/boost_serialization/test_tagged_union.cpp +++ b/tests/boost_serialization/test_tagged_union.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.boost_serialization; +import rfl; + namespace test_tagged_union { diff --git a/tests/boost_serialization/test_timestamp.cpp b/tests/boost_serialization/test_timestamp.cpp index dbeb95bf6..2f40706f5 100644 --- a/tests/boost_serialization/test_timestamp.cpp +++ b/tests/boost_serialization/test_timestamp.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.boost_serialization; +import rfl; + namespace test_timestamp { diff --git a/tests/boost_serialization/test_unique_ptr.cpp b/tests/boost_serialization/test_unique_ptr.cpp index 186be2617..16b793960 100644 --- a/tests/boost_serialization/test_unique_ptr.cpp +++ b/tests/boost_serialization/test_unique_ptr.cpp @@ -1,9 +1,13 @@ #include -#include #include #include #include "write_and_read.hpp" +#include + +import rfl.boost_serialization; +import rfl; + namespace test_unique_ptr { diff --git a/tests/boost_serialization/test_unique_ptr2.cpp b/tests/boost_serialization/test_unique_ptr2.cpp index f46107577..cb5a68110 100644 --- a/tests/boost_serialization/test_unique_ptr2.cpp +++ b/tests/boost_serialization/test_unique_ptr2.cpp @@ -1,7 +1,12 @@ #include -#include #include "write_and_read.hpp" +#include +#include + +import rfl.boost_serialization; +import rfl; + namespace test_unique_ptr2 { diff --git a/tests/boost_serialization/test_variant.cpp b/tests/boost_serialization/test_variant.cpp index 4b87ecb76..de9768cac 100644 --- a/tests/boost_serialization/test_variant.cpp +++ b/tests/boost_serialization/test_variant.cpp @@ -1,7 +1,12 @@ #include -#include #include "write_and_read.hpp" +#include +#include + +import rfl.boost_serialization; +import rfl; + namespace test_variant { diff --git a/tests/boost_serialization/write_and_read.hpp b/tests/boost_serialization/write_and_read.hpp index 1714dbc5a..81dac060b 100644 --- a/tests/boost_serialization/write_and_read.hpp +++ b/tests/boost_serialization/write_and_read.hpp @@ -3,9 +3,12 @@ #include -#include -#include #include +#include + +import rfl.json; +import rfl.boost_serialization; + template void write_and_read(const auto& _struct) { diff --git a/tests/bson/CMakeLists.txt b/tests/bson/CMakeLists.txt index ca16dd2c8..ad1961650 100644 --- a/tests/bson/CMakeLists.txt +++ b/tests/bson/CMakeLists.txt @@ -6,7 +6,7 @@ add_executable( reflect-cpp-bson-tests ${SOURCES} ) -target_precompile_headers(reflect-cpp-bson-tests PRIVATE [["rfl.hpp"]] ) +target_precompile_headers(reflect-cpp-bson-tests PRIVATE ) target_include_directories(reflect-cpp-bson-tests SYSTEM PRIVATE "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include") diff --git a/tests/bson/test_add_struct_name.cpp b/tests/bson/test_add_struct_name.cpp index f9d5800d6..695305ace 100644 --- a/tests/bson/test_add_struct_name.cpp +++ b/tests/bson/test_add_struct_name.cpp @@ -2,6 +2,7 @@ #include #include "write_and_read.hpp" +import rfl.bson; namespace test_add_struct_name { diff --git a/tests/bson/test_array.cpp b/tests/bson/test_array.cpp index 5032090a2..f6b2e8b77 100644 --- a/tests/bson/test_array.cpp +++ b/tests/bson/test_array.cpp @@ -1,13 +1,16 @@ #include #include -#include #include // Make sure things still compile when // rfl.hpp is included after rfl/cbor.hpp. -#include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.bson; + namespace test_array { diff --git a/tests/bson/test_box.cpp b/tests/bson/test_box.cpp index 148ff54a1..2c471d2e8 100644 --- a/tests/bson/test_box.cpp +++ b/tests/bson/test_box.cpp @@ -1,7 +1,11 @@ #include -#include #include "write_and_read.hpp" +#include + +import rfl.bson; +import rfl; + namespace test_box { diff --git a/tests/bson/test_bytestring.cpp b/tests/bson/test_bytestring.cpp index 16d5bb7ae..cb548c5d4 100644 --- a/tests/bson/test_bytestring.cpp +++ b/tests/bson/test_bytestring.cpp @@ -1,7 +1,11 @@ -#include #include #include "write_and_read.hpp" +#include + +import rfl.bson; +import rfl; + namespace test_bytestring { diff --git a/tests/bson/test_combined_processors.cpp b/tests/bson/test_combined_processors.cpp index 477a3e789..36c698272 100644 --- a/tests/bson/test_combined_processors.cpp +++ b/tests/bson/test_combined_processors.cpp @@ -2,6 +2,7 @@ #include #include "write_and_read.hpp" +import rfl.bson; namespace test_combined_processors { diff --git a/tests/bson/test_custom_class1.cpp b/tests/bson/test_custom_class1.cpp index a0d103331..f886ba64e 100644 --- a/tests/bson/test_custom_class1.cpp +++ b/tests/bson/test_custom_class1.cpp @@ -1,9 +1,11 @@ #include -#include #include #include #include "write_and_read.hpp" +import rfl.bson; +import rfl; + namespace test_custom_class1 { diff --git a/tests/bson/test_custom_class3.cpp b/tests/bson/test_custom_class3.cpp index 66f364913..bcd3838b7 100644 --- a/tests/bson/test_custom_class3.cpp +++ b/tests/bson/test_custom_class3.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.bson; +import rfl; + namespace test_custom_class3 { diff --git a/tests/bson/test_custom_class4.cpp b/tests/bson/test_custom_class4.cpp index 725eeb1a2..14a2dbc93 100644 --- a/tests/bson/test_custom_class4.cpp +++ b/tests/bson/test_custom_class4.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.bson; +import rfl; + namespace test_custom_class4 { diff --git a/tests/bson/test_default_values.cpp b/tests/bson/test_default_values.cpp index 9db8a2e6d..a22037a10 100644 --- a/tests/bson/test_default_values.cpp +++ b/tests/bson/test_default_values.cpp @@ -1,9 +1,11 @@ #include -#include #include #include #include "write_and_read.hpp" +import rfl.bson; +import rfl; + namespace test_default_values { diff --git a/tests/bson/test_deque.cpp b/tests/bson/test_deque.cpp index fd4661964..378de5cca 100644 --- a/tests/bson/test_deque.cpp +++ b/tests/bson/test_deque.cpp @@ -1,7 +1,13 @@ -#include #include #include "write_and_read.hpp" +#include +#include +#include + +import rfl.bson; +import rfl; + namespace test_deque { diff --git a/tests/bson/test_enum.cpp b/tests/bson/test_enum.cpp index 624aa7e8a..3ed263e86 100644 --- a/tests/bson/test_enum.cpp +++ b/tests/bson/test_enum.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.bson; +import rfl; + namespace test_enum { diff --git a/tests/bson/test_field_variant.cpp b/tests/bson/test_field_variant.cpp index 3d506e921..ba4fa7b6e 100644 --- a/tests/bson/test_field_variant.cpp +++ b/tests/bson/test_field_variant.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.bson; +import rfl; + namespace test_field_variant { diff --git a/tests/bson/test_flag_enum.cpp b/tests/bson/test_flag_enum.cpp index 37aaf9685..85007b7ee 100644 --- a/tests/bson/test_flag_enum.cpp +++ b/tests/bson/test_flag_enum.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.bson; +import rfl; + namespace test_flag_enum { diff --git a/tests/bson/test_flag_enum_with_int.cpp b/tests/bson/test_flag_enum_with_int.cpp index 3c1b3d77f..0b3563fa2 100644 --- a/tests/bson/test_flag_enum_with_int.cpp +++ b/tests/bson/test_flag_enum_with_int.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.bson; +import rfl; + namespace test_flag_enum_with_int { diff --git a/tests/bson/test_flatten.cpp b/tests/bson/test_flatten.cpp index 05447bd9b..69c5379ee 100644 --- a/tests/bson/test_flatten.cpp +++ b/tests/bson/test_flatten.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.bson; +import rfl; + namespace test_flatten { diff --git a/tests/bson/test_flatten_anonymous.cpp b/tests/bson/test_flatten_anonymous.cpp index 890651f04..c39e6bcb6 100644 --- a/tests/bson/test_flatten_anonymous.cpp +++ b/tests/bson/test_flatten_anonymous.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.bson; +import rfl; + namespace test_flatten_anonymous { diff --git a/tests/bson/test_forward_list.cpp b/tests/bson/test_forward_list.cpp index 0ccb0814d..f6ad6f8c3 100644 --- a/tests/bson/test_forward_list.cpp +++ b/tests/bson/test_forward_list.cpp @@ -1,7 +1,13 @@ -#include #include #include "write_and_read.hpp" +#include +#include +#include + +import rfl.bson; +import rfl; + namespace test_forward_list { diff --git a/tests/bson/test_literal.cpp b/tests/bson/test_literal.cpp index a8b4cd1c5..63c852a5a 100644 --- a/tests/bson/test_literal.cpp +++ b/tests/bson/test_literal.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.bson; +import rfl; + namespace test_literal { diff --git a/tests/bson/test_literal_map.cpp b/tests/bson/test_literal_map.cpp index d4285cd5f..b21968d12 100644 --- a/tests/bson/test_literal_map.cpp +++ b/tests/bson/test_literal_map.cpp @@ -1,9 +1,11 @@ #include #include -#include #include #include "write_and_read.hpp" +import rfl.bson; +import rfl; + namespace test_literal_map { diff --git a/tests/bson/test_map.cpp b/tests/bson/test_map.cpp index b40305e23..f895503cf 100644 --- a/tests/bson/test_map.cpp +++ b/tests/bson/test_map.cpp @@ -1,8 +1,12 @@ #include -#include #include #include "write_and_read.hpp" +#include + +import rfl.bson; +import rfl; + namespace test_map { diff --git a/tests/bson/test_map_with_key_validation.cpp b/tests/bson/test_map_with_key_validation.cpp index 82dca8c8f..a503de478 100644 --- a/tests/bson/test_map_with_key_validation.cpp +++ b/tests/bson/test_map_with_key_validation.cpp @@ -1,8 +1,13 @@ #include -#include #include #include "write_and_read.hpp" +#include +#include + +import rfl.bson; +import rfl; + namespace test_map_with_key_validation { diff --git a/tests/bson/test_monster_example.cpp b/tests/bson/test_monster_example.cpp index 55aa804f0..a2cf37380 100644 --- a/tests/bson/test_monster_example.cpp +++ b/tests/bson/test_monster_example.cpp @@ -1,8 +1,10 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.bson; +import rfl; + namespace test_monster_example { diff --git a/tests/bson/test_oid.cpp b/tests/bson/test_oid.cpp index a20cb3357..1da28fb95 100644 --- a/tests/bson/test_oid.cpp +++ b/tests/bson/test_oid.cpp @@ -1,7 +1,11 @@ -#include #include #include "write_and_read.hpp" +#include + +import rfl.bson; +import rfl; + namespace test_oid { diff --git a/tests/bson/test_readme_example.cpp b/tests/bson/test_readme_example.cpp index dd43cea10..c22117b15 100644 --- a/tests/bson/test_readme_example.cpp +++ b/tests/bson/test_readme_example.cpp @@ -1,8 +1,10 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.bson; +import rfl; + namespace test_readme_example { diff --git a/tests/bson/test_readme_example2.cpp b/tests/bson/test_readme_example2.cpp index ac13250ce..113cf587e 100644 --- a/tests/bson/test_readme_example2.cpp +++ b/tests/bson/test_readme_example2.cpp @@ -1,7 +1,9 @@ -#include #include #include "write_and_read.hpp" +import rfl.bson; +import rfl; + namespace test_readme_example2 { diff --git a/tests/bson/test_ref.cpp b/tests/bson/test_ref.cpp index 6f6fc1bc5..6d57418fb 100644 --- a/tests/bson/test_ref.cpp +++ b/tests/bson/test_ref.cpp @@ -1,7 +1,11 @@ #include -#include #include "write_and_read.hpp" +#include + +import rfl.bson; +import rfl; + namespace test_ref { diff --git a/tests/bson/test_regression_bugs.cpp b/tests/bson/test_regression_bugs.cpp index 4f18be78b..94cfabd3c 100644 --- a/tests/bson/test_regression_bugs.cpp +++ b/tests/bson/test_regression_bugs.cpp @@ -5,9 +5,10 @@ #include #include #include +import rfl; +import rfl.bson; + -#include -#include // bson::Reader — float fields reject integer BSON values // File: include/rfl/bson/Reader.hpp:127-132 diff --git a/tests/bson/test_save_load.cpp b/tests/bson/test_save_load.cpp index 620d4969c..8492393c5 100644 --- a/tests/bson/test_save_load.cpp +++ b/tests/bson/test_save_load.cpp @@ -1,10 +1,11 @@ #include -#include -#include #include #include #include +import rfl; +import rfl.bson; + namespace test_save_load { diff --git a/tests/bson/test_set.cpp b/tests/bson/test_set.cpp index de3fc35d7..af3cfcc70 100644 --- a/tests/bson/test_set.cpp +++ b/tests/bson/test_set.cpp @@ -1,7 +1,13 @@ -#include #include #include "write_and_read.hpp" +#include +#include +#include + +import rfl.bson; +import rfl; + namespace test_set { diff --git a/tests/bson/test_size.cpp b/tests/bson/test_size.cpp index 667a5a82f..ac73dc73a 100644 --- a/tests/bson/test_size.cpp +++ b/tests/bson/test_size.cpp @@ -1,8 +1,10 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.bson; +import rfl; + namespace test_size { diff --git a/tests/bson/test_snake_case_to_camel_case.cpp b/tests/bson/test_snake_case_to_camel_case.cpp index 00210d772..005e46e71 100644 --- a/tests/bson/test_snake_case_to_camel_case.cpp +++ b/tests/bson/test_snake_case_to_camel_case.cpp @@ -2,6 +2,7 @@ #include #include "write_and_read.hpp" +import rfl.bson; namespace test_snake_case_to_camel_case { diff --git a/tests/bson/test_snake_case_to_pascal_case.cpp b/tests/bson/test_snake_case_to_pascal_case.cpp index f775e186d..259e667cf 100644 --- a/tests/bson/test_snake_case_to_pascal_case.cpp +++ b/tests/bson/test_snake_case_to_pascal_case.cpp @@ -2,6 +2,7 @@ #include #include "write_and_read.hpp" +import rfl.bson; namespace test_snake_case_to_pascal_case { diff --git a/tests/bson/test_string_map.cpp b/tests/bson/test_string_map.cpp index 715f332cd..186ef9ba9 100644 --- a/tests/bson/test_string_map.cpp +++ b/tests/bson/test_string_map.cpp @@ -1,9 +1,11 @@ #include #include -#include #include #include "write_and_read.hpp" +import rfl.bson; +import rfl; + namespace test_string_map { TEST(bson, test_string_map) { diff --git a/tests/bson/test_tagged_union.cpp b/tests/bson/test_tagged_union.cpp index 549d6f248..fd8c133ea 100644 --- a/tests/bson/test_tagged_union.cpp +++ b/tests/bson/test_tagged_union.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.bson; +import rfl; + namespace test_tagged_union { diff --git a/tests/bson/test_timestamp.cpp b/tests/bson/test_timestamp.cpp index 8ff8b7fb2..b4dfd04ea 100644 --- a/tests/bson/test_timestamp.cpp +++ b/tests/bson/test_timestamp.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.bson; +import rfl; + namespace test_timestamp { diff --git a/tests/bson/test_unique_ptr.cpp b/tests/bson/test_unique_ptr.cpp index 0c829259c..cd0365da5 100644 --- a/tests/bson/test_unique_ptr.cpp +++ b/tests/bson/test_unique_ptr.cpp @@ -1,9 +1,13 @@ #include -#include #include #include #include "write_and_read.hpp" +#include + +import rfl.bson; +import rfl; + namespace test_unique_ptr { diff --git a/tests/bson/test_unique_ptr2.cpp b/tests/bson/test_unique_ptr2.cpp index 7baa452d0..2367af19b 100644 --- a/tests/bson/test_unique_ptr2.cpp +++ b/tests/bson/test_unique_ptr2.cpp @@ -1,7 +1,12 @@ #include -#include #include "write_and_read.hpp" +#include +#include + +import rfl.bson; +import rfl; + namespace test_unique_ptr2 { diff --git a/tests/bson/test_variant.cpp b/tests/bson/test_variant.cpp index d909356bd..76296d464 100644 --- a/tests/bson/test_variant.cpp +++ b/tests/bson/test_variant.cpp @@ -1,7 +1,12 @@ #include -#include #include "write_and_read.hpp" +#include +#include + +import rfl.bson; +import rfl; + namespace test_variant { diff --git a/tests/bson/test_vectorstring.cpp b/tests/bson/test_vectorstring.cpp index db624c353..56794332f 100644 --- a/tests/bson/test_vectorstring.cpp +++ b/tests/bson/test_vectorstring.cpp @@ -1,7 +1,9 @@ -#include #include #include "write_and_read.hpp" +import rfl.bson; +import rfl; + namespace test_vectorstring { diff --git a/tests/bson/test_wstring.cpp b/tests/bson/test_wstring.cpp index 70cabfe60..1bf5dfd48 100644 --- a/tests/bson/test_wstring.cpp +++ b/tests/bson/test_wstring.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.bson; +import rfl; + struct TestStruct { std::string theNormalString; diff --git a/tests/bson/write_and_read.hpp b/tests/bson/write_and_read.hpp index 5f38b0814..d48522514 100644 --- a/tests/bson/write_and_read.hpp +++ b/tests/bson/write_and_read.hpp @@ -2,8 +2,11 @@ #define WRITE_AND_READ_ #include +#include + +import rfl.bson; + -#include template void write_and_read(const auto& _struct) { diff --git a/tests/capnproto/CMakeLists.txt b/tests/capnproto/CMakeLists.txt index a7755b107..c7ecc3c72 100644 --- a/tests/capnproto/CMakeLists.txt +++ b/tests/capnproto/CMakeLists.txt @@ -7,7 +7,7 @@ add_executable( reflect-cpp-capnproto-tests ${SOURCES} ) -target_precompile_headers(reflect-cpp-capnproto-tests PRIVATE [["rfl.hpp"]] ) +target_precompile_headers(reflect-cpp-capnproto-tests PRIVATE ) target_link_libraries(reflect-cpp-capnproto-tests PRIVATE reflectcpp_tests_crt) diff --git a/tests/capnproto/compile_fail/capnproto_read_istream_schema.cpp b/tests/capnproto/compile_fail/capnproto_read_istream_schema.cpp index 0ea5121bd..24aafbbff 100644 --- a/tests/capnproto/compile_fail/capnproto_read_istream_schema.cpp +++ b/tests/capnproto/compile_fail/capnproto_read_istream_schema.cpp @@ -8,9 +8,10 @@ #include #include +import rfl; +import rfl.capnproto; + -#include -#include struct Simple { std::string field1; diff --git a/tests/capnproto/test_add_struct_name.cpp b/tests/capnproto/test_add_struct_name.cpp index 64a93d33c..3b2771bdb 100644 --- a/tests/capnproto/test_add_struct_name.cpp +++ b/tests/capnproto/test_add_struct_name.cpp @@ -2,6 +2,7 @@ #include #include "write_and_read.hpp" +import rfl.capnproto; namespace test_add_struct_name { diff --git a/tests/capnproto/test_array.cpp b/tests/capnproto/test_array.cpp index 3753232c7..658fe5d88 100644 --- a/tests/capnproto/test_array.cpp +++ b/tests/capnproto/test_array.cpp @@ -1,13 +1,16 @@ #include #include -#include #include // Make sure things still compile when // rfl.hpp is included after rfl/capnproto.hpp. -#include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.capnproto; + namespace test_array { diff --git a/tests/capnproto/test_box.cpp b/tests/capnproto/test_box.cpp index 33356d850..104c53932 100644 --- a/tests/capnproto/test_box.cpp +++ b/tests/capnproto/test_box.cpp @@ -1,7 +1,11 @@ #include -#include #include "write_and_read.hpp" +#include + +import rfl.capnproto; +import rfl; + namespace test_box { diff --git a/tests/capnproto/test_bytestring.cpp b/tests/capnproto/test_bytestring.cpp index fa531dc75..c8e96a421 100644 --- a/tests/capnproto/test_bytestring.cpp +++ b/tests/capnproto/test_bytestring.cpp @@ -1,6 +1,10 @@ -#include #include "write_and_read.hpp" +#include + +import rfl.capnproto; +import rfl; + namespace test_bytestring { diff --git a/tests/capnproto/test_custom_class1.cpp b/tests/capnproto/test_custom_class1.cpp index a8ca3dfee..1fc02eda5 100644 --- a/tests/capnproto/test_custom_class1.cpp +++ b/tests/capnproto/test_custom_class1.cpp @@ -1,9 +1,11 @@ #include -#include #include #include #include "write_and_read.hpp" +import rfl.capnproto; +import rfl; + namespace test_custom_class1 { diff --git a/tests/capnproto/test_custom_class3.cpp b/tests/capnproto/test_custom_class3.cpp index 9f47c9cbd..7319cfa9b 100644 --- a/tests/capnproto/test_custom_class3.cpp +++ b/tests/capnproto/test_custom_class3.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.capnproto; +import rfl; + namespace test_custom_class3 { diff --git a/tests/capnproto/test_custom_class4.cpp b/tests/capnproto/test_custom_class4.cpp index 867f6b46e..352a76862 100644 --- a/tests/capnproto/test_custom_class4.cpp +++ b/tests/capnproto/test_custom_class4.cpp @@ -1,8 +1,12 @@ #include -#include #include #include "write_and_read.hpp" +#include + +import rfl.capnproto; +import rfl; + namespace test_custom_class4 { diff --git a/tests/capnproto/test_default_values.cpp b/tests/capnproto/test_default_values.cpp index 756a89d44..86d378d12 100644 --- a/tests/capnproto/test_default_values.cpp +++ b/tests/capnproto/test_default_values.cpp @@ -1,9 +1,11 @@ #include -#include #include #include #include "write_and_read.hpp" +import rfl.capnproto; +import rfl; + namespace test_default_values { diff --git a/tests/capnproto/test_deque.cpp b/tests/capnproto/test_deque.cpp index c26cf2499..9ed955529 100644 --- a/tests/capnproto/test_deque.cpp +++ b/tests/capnproto/test_deque.cpp @@ -1,7 +1,13 @@ -#include #include #include "write_and_read.hpp" +#include +#include +#include + +import rfl.capnproto; +import rfl; + namespace test_deque { diff --git a/tests/capnproto/test_enum.cpp b/tests/capnproto/test_enum.cpp index c21e83af6..a1df7070d 100644 --- a/tests/capnproto/test_enum.cpp +++ b/tests/capnproto/test_enum.cpp @@ -1,8 +1,10 @@ #include -#include -#include #include "write_and_read.hpp" +import rfl.capnproto; +import rfl; +import rfl.json; + namespace test_enum { diff --git a/tests/capnproto/test_field_variant.cpp b/tests/capnproto/test_field_variant.cpp index a6ca27893..8ef576d50 100644 --- a/tests/capnproto/test_field_variant.cpp +++ b/tests/capnproto/test_field_variant.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.capnproto; +import rfl; + namespace test_field_variant { diff --git a/tests/capnproto/test_field_variant_std.cpp b/tests/capnproto/test_field_variant_std.cpp index 0aefd665c..9a6057b20 100644 --- a/tests/capnproto/test_field_variant_std.cpp +++ b/tests/capnproto/test_field_variant_std.cpp @@ -1,7 +1,11 @@ #include -#include #include "write_and_read.hpp" +#include + +import rfl.capnproto; +import rfl; + namespace test_field_variant_std { diff --git a/tests/capnproto/test_flag_enum.cpp b/tests/capnproto/test_flag_enum.cpp index fcb3981bb..d5fabe0df 100644 --- a/tests/capnproto/test_flag_enum.cpp +++ b/tests/capnproto/test_flag_enum.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.capnproto; +import rfl; + namespace test_flag_enum { diff --git a/tests/capnproto/test_flag_enum_with_int.cpp b/tests/capnproto/test_flag_enum_with_int.cpp index dcc044ce4..9d45d847c 100644 --- a/tests/capnproto/test_flag_enum_with_int.cpp +++ b/tests/capnproto/test_flag_enum_with_int.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.capnproto; +import rfl; + namespace test_flag_enum_with_int { diff --git a/tests/capnproto/test_flatten.cpp b/tests/capnproto/test_flatten.cpp index 8392ac5b7..bfd867bed 100644 --- a/tests/capnproto/test_flatten.cpp +++ b/tests/capnproto/test_flatten.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.capnproto; +import rfl; + namespace test_flatten { diff --git a/tests/capnproto/test_flatten_anonymous.cpp b/tests/capnproto/test_flatten_anonymous.cpp index 92cf36d55..6e40eb1f0 100644 --- a/tests/capnproto/test_flatten_anonymous.cpp +++ b/tests/capnproto/test_flatten_anonymous.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.capnproto; +import rfl; + namespace test_flatten_anonymous { diff --git a/tests/capnproto/test_forward_list.cpp b/tests/capnproto/test_forward_list.cpp index a2910bebf..55bf54eaa 100644 --- a/tests/capnproto/test_forward_list.cpp +++ b/tests/capnproto/test_forward_list.cpp @@ -1,7 +1,13 @@ -#include #include #include "write_and_read.hpp" +#include +#include +#include + +import rfl.capnproto; +import rfl; + namespace test_forward_list { diff --git a/tests/capnproto/test_literal.cpp b/tests/capnproto/test_literal.cpp index c1324c638..b024e15ef 100644 --- a/tests/capnproto/test_literal.cpp +++ b/tests/capnproto/test_literal.cpp @@ -1,9 +1,11 @@ #include -#include -#include #include #include "write_and_read.hpp" +import rfl.capnproto; +import rfl; +import rfl.json; + namespace test_literal { diff --git a/tests/capnproto/test_literal_map.cpp b/tests/capnproto/test_literal_map.cpp index 2e5a1cde3..3cb05d045 100644 --- a/tests/capnproto/test_literal_map.cpp +++ b/tests/capnproto/test_literal_map.cpp @@ -1,9 +1,11 @@ #include #include -#include #include #include "write_and_read.hpp" +import rfl.capnproto; +import rfl; + namespace test_literal_map { diff --git a/tests/capnproto/test_map.cpp b/tests/capnproto/test_map.cpp index a43512d35..043caaba9 100644 --- a/tests/capnproto/test_map.cpp +++ b/tests/capnproto/test_map.cpp @@ -1,9 +1,14 @@ #include -#include -#include #include #include "write_and_read.hpp" +#include +#include + +import rfl.capnproto; +import rfl; +import rfl.json; + namespace test_map { diff --git a/tests/capnproto/test_map2.cpp b/tests/capnproto/test_map2.cpp index 82ad9bda2..f47e0b96e 100644 --- a/tests/capnproto/test_map2.cpp +++ b/tests/capnproto/test_map2.cpp @@ -1,9 +1,13 @@ #include -#include -#include #include #include "write_and_read.hpp" +#include + +import rfl.capnproto; +import rfl; +import rfl.json; + namespace test_map2 { diff --git a/tests/capnproto/test_map_value_types.cpp b/tests/capnproto/test_map_value_types.cpp index f53c375ff..d3fe55e1a 100644 --- a/tests/capnproto/test_map_value_types.cpp +++ b/tests/capnproto/test_map_value_types.cpp @@ -1,8 +1,12 @@ #include -#include #include #include "write_and_read.hpp" +#include + +import rfl.capnproto; +import rfl; + namespace test_map_value_types { diff --git a/tests/capnproto/test_monster_example.cpp b/tests/capnproto/test_monster_example.cpp index 9d3e2cac6..43f96bdcf 100644 --- a/tests/capnproto/test_monster_example.cpp +++ b/tests/capnproto/test_monster_example.cpp @@ -1,8 +1,10 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.capnproto; +import rfl; + namespace test_monster_example { diff --git a/tests/capnproto/test_optional_fields.cpp b/tests/capnproto/test_optional_fields.cpp index 05e6f3eab..fd7b5ea0c 100644 --- a/tests/capnproto/test_optional_fields.cpp +++ b/tests/capnproto/test_optional_fields.cpp @@ -1,9 +1,13 @@ -#include -#include #include #include #include "write_and_read.hpp" +#include + +import rfl.capnproto; +import rfl; +import rfl.json; + namespace test_optional_fields { diff --git a/tests/capnproto/test_optionals_in_vectors.cpp b/tests/capnproto/test_optionals_in_vectors.cpp index cfac09ec2..fb2bbdfb7 100644 --- a/tests/capnproto/test_optionals_in_vectors.cpp +++ b/tests/capnproto/test_optionals_in_vectors.cpp @@ -1,9 +1,13 @@ -#include -#include #include #include #include "write_and_read.hpp" +#include + +import rfl.capnproto; +import rfl; +import rfl.json; + namespace test_optionals_in_vectors { diff --git a/tests/capnproto/test_person.cpp b/tests/capnproto/test_person.cpp index dddb48805..72fc40f4b 100644 --- a/tests/capnproto/test_person.cpp +++ b/tests/capnproto/test_person.cpp @@ -1,11 +1,12 @@ #include -#include -#include #include #include #include "write_and_read.hpp" +import rfl; +import rfl.capnproto; + namespace test_tutorial_example { diff --git a/tests/capnproto/test_readme_example.cpp b/tests/capnproto/test_readme_example.cpp index 6e09fd787..2c91bdc1e 100644 --- a/tests/capnproto/test_readme_example.cpp +++ b/tests/capnproto/test_readme_example.cpp @@ -1,8 +1,10 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.capnproto; +import rfl; + namespace test_readme_example { diff --git a/tests/capnproto/test_readme_example2.cpp b/tests/capnproto/test_readme_example2.cpp index ea1087dfc..d1045ffcd 100644 --- a/tests/capnproto/test_readme_example2.cpp +++ b/tests/capnproto/test_readme_example2.cpp @@ -1,7 +1,9 @@ -#include #include #include "write_and_read.hpp" +import rfl.capnproto; +import rfl; + namespace test_readme_example2 { diff --git a/tests/capnproto/test_readme_example3.cpp b/tests/capnproto/test_readme_example3.cpp index dd89ff1e6..b14ba9270 100644 --- a/tests/capnproto/test_readme_example3.cpp +++ b/tests/capnproto/test_readme_example3.cpp @@ -1,8 +1,10 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.capnproto; +import rfl; + namespace test_readme_example3 { diff --git a/tests/capnproto/test_ref.cpp b/tests/capnproto/test_ref.cpp index 4c4a000b4..192c6d626 100644 --- a/tests/capnproto/test_ref.cpp +++ b/tests/capnproto/test_ref.cpp @@ -1,7 +1,11 @@ #include -#include #include "write_and_read.hpp" +#include + +import rfl.capnproto; +import rfl; + namespace test_ref { diff --git a/tests/capnproto/test_rfl_tuple.cpp b/tests/capnproto/test_rfl_tuple.cpp index 6e94f36e7..74af3ea00 100644 --- a/tests/capnproto/test_rfl_tuple.cpp +++ b/tests/capnproto/test_rfl_tuple.cpp @@ -1,10 +1,14 @@ #include -#include -#include #include #include "write_and_read.hpp" +#include + +import rfl.capnproto; +import rfl; +import rfl.json; + namespace test_rfl_tuple { diff --git a/tests/capnproto/test_rfl_variant.cpp b/tests/capnproto/test_rfl_variant.cpp index 81d715f47..8505fd87c 100644 --- a/tests/capnproto/test_rfl_variant.cpp +++ b/tests/capnproto/test_rfl_variant.cpp @@ -1,7 +1,11 @@ #include -#include #include "write_and_read.hpp" +#include + +import rfl.capnproto; +import rfl; + namespace test_variant { diff --git a/tests/capnproto/test_save_load.cpp b/tests/capnproto/test_save_load.cpp index b782517a5..bb9c02ad4 100644 --- a/tests/capnproto/test_save_load.cpp +++ b/tests/capnproto/test_save_load.cpp @@ -1,10 +1,11 @@ #include #include -#include -#include #include #include +import rfl; +import rfl.capnproto; + namespace test_save_load { diff --git a/tests/capnproto/test_set.cpp b/tests/capnproto/test_set.cpp index 0881e460a..d4388480b 100644 --- a/tests/capnproto/test_set.cpp +++ b/tests/capnproto/test_set.cpp @@ -1,7 +1,13 @@ -#include #include #include "write_and_read.hpp" +#include +#include +#include + +import rfl.capnproto; +import rfl; + namespace test_set { diff --git a/tests/capnproto/test_shared_ptr.cpp b/tests/capnproto/test_shared_ptr.cpp index 5639ce5a4..534155371 100644 --- a/tests/capnproto/test_shared_ptr.cpp +++ b/tests/capnproto/test_shared_ptr.cpp @@ -1,10 +1,14 @@ #include -#include -#include #include #include #include "write_and_read.hpp" +#include + +import rfl.capnproto; +import rfl; +import rfl.json; + namespace test_shared_ptr { diff --git a/tests/capnproto/test_size.cpp b/tests/capnproto/test_size.cpp index 53cda167c..487f5c980 100644 --- a/tests/capnproto/test_size.cpp +++ b/tests/capnproto/test_size.cpp @@ -1,8 +1,10 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.capnproto; +import rfl; + namespace test_size { diff --git a/tests/capnproto/test_string_map.cpp b/tests/capnproto/test_string_map.cpp index 6da2173ce..4c4e97803 100644 --- a/tests/capnproto/test_string_map.cpp +++ b/tests/capnproto/test_string_map.cpp @@ -1,10 +1,12 @@ #include #include -#include -#include #include #include "write_and_read.hpp" +import rfl.capnproto; +import rfl; +import rfl.json; + namespace test_string_map { diff --git a/tests/capnproto/test_tagged_union.cpp b/tests/capnproto/test_tagged_union.cpp index 4aa218e99..696a00fa4 100644 --- a/tests/capnproto/test_tagged_union.cpp +++ b/tests/capnproto/test_tagged_union.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.capnproto; +import rfl; + namespace test_tagged_union { diff --git a/tests/capnproto/test_timestamp.cpp b/tests/capnproto/test_timestamp.cpp index 119ec6f43..64f36c1bf 100644 --- a/tests/capnproto/test_timestamp.cpp +++ b/tests/capnproto/test_timestamp.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.capnproto; +import rfl; + namespace test_timestamp { diff --git a/tests/capnproto/test_tuple.cpp b/tests/capnproto/test_tuple.cpp index 0aa9af4dd..8ba959cdf 100644 --- a/tests/capnproto/test_tuple.cpp +++ b/tests/capnproto/test_tuple.cpp @@ -1,11 +1,15 @@ #include -#include -#include #include #include #include "write_and_read.hpp" +#include + +import rfl.capnproto; +import rfl; +import rfl.json; + namespace test_tuple { diff --git a/tests/capnproto/test_tutorial_example.cpp b/tests/capnproto/test_tutorial_example.cpp index 338dc078f..7817f7ff0 100644 --- a/tests/capnproto/test_tutorial_example.cpp +++ b/tests/capnproto/test_tutorial_example.cpp @@ -1,9 +1,10 @@ #include -#include -#include #include #include +import rfl; +import rfl.capnproto; + // #include "write_and_read.hpp" diff --git a/tests/capnproto/test_uint64.cpp b/tests/capnproto/test_uint64.cpp index df43c478f..35173ac41 100644 --- a/tests/capnproto/test_uint64.cpp +++ b/tests/capnproto/test_uint64.cpp @@ -1,9 +1,11 @@ -#include #include #include #include #include "write_and_read.hpp" +import rfl.capnproto; +import rfl; + namespace test_uint64 { diff --git a/tests/capnproto/test_unique_ptr.cpp b/tests/capnproto/test_unique_ptr.cpp index faee7144d..a85ac889e 100644 --- a/tests/capnproto/test_unique_ptr.cpp +++ b/tests/capnproto/test_unique_ptr.cpp @@ -1,10 +1,14 @@ #include -#include -#include #include #include #include "write_and_read.hpp" +#include + +import rfl.capnproto; +import rfl; +import rfl.json; + namespace test_unique_ptr { diff --git a/tests/capnproto/test_unique_ptr2.cpp b/tests/capnproto/test_unique_ptr2.cpp index 2387c5823..1477e0789 100644 --- a/tests/capnproto/test_unique_ptr2.cpp +++ b/tests/capnproto/test_unique_ptr2.cpp @@ -1,7 +1,12 @@ #include -#include #include "write_and_read.hpp" +#include +#include + +import rfl.capnproto; +import rfl; + namespace test_unique_ptr2 { diff --git a/tests/capnproto/test_variant.cpp b/tests/capnproto/test_variant.cpp index 271b852a4..2e755d839 100644 --- a/tests/capnproto/test_variant.cpp +++ b/tests/capnproto/test_variant.cpp @@ -1,7 +1,12 @@ #include -#include #include "write_and_read.hpp" +#include +#include + +import rfl.capnproto; +import rfl; + namespace test_variant { diff --git a/tests/capnproto/test_variants_in_vectors.cpp b/tests/capnproto/test_variants_in_vectors.cpp index 62128caee..64903b5ff 100644 --- a/tests/capnproto/test_variants_in_vectors.cpp +++ b/tests/capnproto/test_variants_in_vectors.cpp @@ -1,9 +1,13 @@ -#include -#include #include #include #include "write_and_read.hpp" +#include + +import rfl.capnproto; +import rfl; +import rfl.json; + namespace test_variants_in_vectors { diff --git a/tests/capnproto/test_wstring.cpp b/tests/capnproto/test_wstring.cpp index 39f4a38bc..581f7cb3c 100644 --- a/tests/capnproto/test_wstring.cpp +++ b/tests/capnproto/test_wstring.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.capnproto; +import rfl; + struct TestStruct { std::string theNormalString; diff --git a/tests/capnproto/write_and_read.hpp b/tests/capnproto/write_and_read.hpp index fab5c65e0..c5bbe34c5 100644 --- a/tests/capnproto/write_and_read.hpp +++ b/tests/capnproto/write_and_read.hpp @@ -2,8 +2,11 @@ #define WRITE_AND_READ_ #include +#include + +import rfl.capnproto; + -#include template void write_and_read(const auto& _struct) { diff --git a/tests/cbor/CMakeLists.txt b/tests/cbor/CMakeLists.txt index 174eed149..74cbd5fb3 100644 --- a/tests/cbor/CMakeLists.txt +++ b/tests/cbor/CMakeLists.txt @@ -6,7 +6,7 @@ add_executable( reflect-cpp-cbor-tests ${SOURCES} ) -target_precompile_headers(reflect-cpp-cbor-tests PRIVATE [["rfl.hpp"]] ) +target_precompile_headers(reflect-cpp-cbor-tests PRIVATE ) target_link_libraries(reflect-cpp-cbor-tests PRIVATE reflectcpp_tests_crt) diff --git a/tests/cbor/test_add_struct_name.cpp b/tests/cbor/test_add_struct_name.cpp index 2d88a7e6c..5b2066352 100644 --- a/tests/cbor/test_add_struct_name.cpp +++ b/tests/cbor/test_add_struct_name.cpp @@ -2,6 +2,7 @@ #include #include "write_and_read.hpp" +import rfl.cbor; namespace test_add_struct_name { diff --git a/tests/cbor/test_array.cpp b/tests/cbor/test_array.cpp index e27b0e75e..966bb11bc 100644 --- a/tests/cbor/test_array.cpp +++ b/tests/cbor/test_array.cpp @@ -1,13 +1,16 @@ #include #include -#include #include // Make sure things still compile when // rfl.hpp is included after rfl/cbor.hpp. -#include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.cbor; + namespace test_array { diff --git a/tests/cbor/test_box.cpp b/tests/cbor/test_box.cpp index 64e7ff16c..f6490008e 100644 --- a/tests/cbor/test_box.cpp +++ b/tests/cbor/test_box.cpp @@ -1,7 +1,11 @@ #include -#include #include "write_and_read.hpp" +#include + +import rfl.cbor; +import rfl; + namespace test_box { diff --git a/tests/cbor/test_bytestring.cpp b/tests/cbor/test_bytestring.cpp index d5f5990b2..d2ce3df09 100644 --- a/tests/cbor/test_bytestring.cpp +++ b/tests/cbor/test_bytestring.cpp @@ -1,6 +1,10 @@ -#include #include "write_and_read.hpp" +#include + +import rfl.cbor; +import rfl; + namespace test_bytestring { diff --git a/tests/cbor/test_combined_processors.cpp b/tests/cbor/test_combined_processors.cpp index eb166cbbc..53ef27526 100644 --- a/tests/cbor/test_combined_processors.cpp +++ b/tests/cbor/test_combined_processors.cpp @@ -2,6 +2,7 @@ #include #include "write_and_read.hpp" +import rfl.cbor; namespace test_combined_processors { diff --git a/tests/cbor/test_custom_class1.cpp b/tests/cbor/test_custom_class1.cpp index dcf09b2a5..2ce8d3870 100644 --- a/tests/cbor/test_custom_class1.cpp +++ b/tests/cbor/test_custom_class1.cpp @@ -1,9 +1,11 @@ #include -#include #include #include #include "write_and_read.hpp" +import rfl.cbor; +import rfl; + namespace test_custom_class1 { diff --git a/tests/cbor/test_custom_class3.cpp b/tests/cbor/test_custom_class3.cpp index c4370cfb8..a2c36426b 100644 --- a/tests/cbor/test_custom_class3.cpp +++ b/tests/cbor/test_custom_class3.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.cbor; +import rfl; + namespace test_custom_class3 { diff --git a/tests/cbor/test_custom_class4.cpp b/tests/cbor/test_custom_class4.cpp index 8539c79a0..ae06833bf 100644 --- a/tests/cbor/test_custom_class4.cpp +++ b/tests/cbor/test_custom_class4.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.cbor; +import rfl; + namespace test_custom_class4 { diff --git a/tests/cbor/test_default_values.cpp b/tests/cbor/test_default_values.cpp index 82b16f662..e74d4658d 100644 --- a/tests/cbor/test_default_values.cpp +++ b/tests/cbor/test_default_values.cpp @@ -1,9 +1,11 @@ #include -#include #include #include #include "write_and_read.hpp" +import rfl.cbor; +import rfl; + namespace test_default_values { diff --git a/tests/cbor/test_deque.cpp b/tests/cbor/test_deque.cpp index e9948149f..4a46ee844 100644 --- a/tests/cbor/test_deque.cpp +++ b/tests/cbor/test_deque.cpp @@ -1,7 +1,13 @@ -#include #include #include "write_and_read.hpp" +#include +#include +#include + +import rfl.cbor; +import rfl; + namespace test_deque { diff --git a/tests/cbor/test_enum.cpp b/tests/cbor/test_enum.cpp index 861bd8b0e..0d5282066 100644 --- a/tests/cbor/test_enum.cpp +++ b/tests/cbor/test_enum.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.cbor; +import rfl; + namespace test_enum { diff --git a/tests/cbor/test_error_messages.cpp b/tests/cbor/test_error_messages.cpp index 8fb063a16..47b3785f3 100644 --- a/tests/cbor/test_error_messages.cpp +++ b/tests/cbor/test_error_messages.cpp @@ -1,10 +1,11 @@ #include -#include -#include -#include #include #include +import rfl; +import rfl.json; +import rfl.cbor; + namespace test_error_messages { diff --git a/tests/cbor/test_extra_fields.cpp b/tests/cbor/test_extra_fields.cpp index fe77536e5..3a6767e42 100644 --- a/tests/cbor/test_extra_fields.cpp +++ b/tests/cbor/test_extra_fields.cpp @@ -1,7 +1,9 @@ -#include #include #include "write_and_read.hpp" +import rfl.cbor; +import rfl; + namespace test_extra_fields { diff --git a/tests/cbor/test_field_variant.cpp b/tests/cbor/test_field_variant.cpp index e85936570..f1e0d3b09 100644 --- a/tests/cbor/test_field_variant.cpp +++ b/tests/cbor/test_field_variant.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.cbor; +import rfl; + namespace test_field_variant { diff --git a/tests/cbor/test_flag_enum.cpp b/tests/cbor/test_flag_enum.cpp index f31a4e2e9..1899ca70e 100644 --- a/tests/cbor/test_flag_enum.cpp +++ b/tests/cbor/test_flag_enum.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.cbor; +import rfl; + namespace test_flag_enum { diff --git a/tests/cbor/test_flag_enum_with_int.cpp b/tests/cbor/test_flag_enum_with_int.cpp index 8978d0968..43b786db9 100644 --- a/tests/cbor/test_flag_enum_with_int.cpp +++ b/tests/cbor/test_flag_enum_with_int.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.cbor; +import rfl; + namespace test_flag_enum_with_int { diff --git a/tests/cbor/test_flatten.cpp b/tests/cbor/test_flatten.cpp index 378915146..3bd34df81 100644 --- a/tests/cbor/test_flatten.cpp +++ b/tests/cbor/test_flatten.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.cbor; +import rfl; + namespace test_flatten { diff --git a/tests/cbor/test_flatten_anonymous.cpp b/tests/cbor/test_flatten_anonymous.cpp index e9a71966a..03760cdfc 100644 --- a/tests/cbor/test_flatten_anonymous.cpp +++ b/tests/cbor/test_flatten_anonymous.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.cbor; +import rfl; + namespace test_flatten_anonymous { diff --git a/tests/cbor/test_forward_list.cpp b/tests/cbor/test_forward_list.cpp index cb5f89e27..8e2252da6 100644 --- a/tests/cbor/test_forward_list.cpp +++ b/tests/cbor/test_forward_list.cpp @@ -1,7 +1,13 @@ -#include #include #include "write_and_read.hpp" +#include +#include +#include + +import rfl.cbor; +import rfl; + namespace test_forward_list { diff --git a/tests/cbor/test_integers.cpp b/tests/cbor/test_integers.cpp index c09cefaad..d7da8663d 100644 --- a/tests/cbor/test_integers.cpp +++ b/tests/cbor/test_integers.cpp @@ -1,7 +1,8 @@ #include -#include #include "write_and_read.hpp" +import rfl.cbor; + namespace test_integers { diff --git a/tests/cbor/test_literal.cpp b/tests/cbor/test_literal.cpp index 591e60815..b50817f28 100644 --- a/tests/cbor/test_literal.cpp +++ b/tests/cbor/test_literal.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.cbor; +import rfl; + namespace test_literal { diff --git a/tests/cbor/test_literal_map.cpp b/tests/cbor/test_literal_map.cpp index ab101abf1..014d75db0 100644 --- a/tests/cbor/test_literal_map.cpp +++ b/tests/cbor/test_literal_map.cpp @@ -1,9 +1,11 @@ #include #include -#include #include #include "write_and_read.hpp" +import rfl.cbor; +import rfl; + namespace test_literal_map { diff --git a/tests/cbor/test_map.cpp b/tests/cbor/test_map.cpp index 25d45e0f5..9aee6c052 100644 --- a/tests/cbor/test_map.cpp +++ b/tests/cbor/test_map.cpp @@ -1,8 +1,12 @@ #include -#include #include #include "write_and_read.hpp" +#include + +import rfl.cbor; +import rfl; + namespace test_map { diff --git a/tests/cbor/test_map_with_key_validation.cpp b/tests/cbor/test_map_with_key_validation.cpp index d7bb1c13c..69bb6a943 100644 --- a/tests/cbor/test_map_with_key_validation.cpp +++ b/tests/cbor/test_map_with_key_validation.cpp @@ -1,8 +1,13 @@ #include -#include #include #include "write_and_read.hpp" +#include +#include + +import rfl.cbor; +import rfl; + namespace test_map_with_key_validation { diff --git a/tests/cbor/test_monster_example.cpp b/tests/cbor/test_monster_example.cpp index 1569def75..5a07b737f 100644 --- a/tests/cbor/test_monster_example.cpp +++ b/tests/cbor/test_monster_example.cpp @@ -1,8 +1,10 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.cbor; +import rfl; + namespace test_monster_example { diff --git a/tests/cbor/test_no_optionals.cpp b/tests/cbor/test_no_optionals.cpp index 552cb9160..fb9862e64 100644 --- a/tests/cbor/test_no_optionals.cpp +++ b/tests/cbor/test_no_optionals.cpp @@ -1,9 +1,12 @@ -#include -#include #include #include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.cbor; + namespace test_no_optionals { diff --git a/tests/cbor/test_optional_fields.cpp b/tests/cbor/test_optional_fields.cpp index 6a4309035..0bc6d3554 100644 --- a/tests/cbor/test_optional_fields.cpp +++ b/tests/cbor/test_optional_fields.cpp @@ -1,9 +1,12 @@ -#include -#include #include #include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.cbor; + namespace test_optional_fields { diff --git a/tests/cbor/test_read_byte_containers.cpp b/tests/cbor/test_read_byte_containers.cpp index ed863b469..fc0291a14 100644 --- a/tests/cbor/test_read_byte_containers.cpp +++ b/tests/cbor/test_read_byte_containers.cpp @@ -2,11 +2,16 @@ #include #include -#include +#include +#include +#include + +import rfl; +import rfl.cbor; + // Make sure things still compile when // rfl.hpp is included after rfl/cbor.hpp. -#include namespace test_read_byte_containers { diff --git a/tests/cbor/test_readme_example.cpp b/tests/cbor/test_readme_example.cpp index c069be9cb..138a0264f 100644 --- a/tests/cbor/test_readme_example.cpp +++ b/tests/cbor/test_readme_example.cpp @@ -1,8 +1,10 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.cbor; +import rfl; + namespace test_readme_example { diff --git a/tests/cbor/test_readme_example2.cpp b/tests/cbor/test_readme_example2.cpp index 54ec6de6a..f16e0bb9f 100644 --- a/tests/cbor/test_readme_example2.cpp +++ b/tests/cbor/test_readme_example2.cpp @@ -1,7 +1,9 @@ -#include #include #include "write_and_read.hpp" +import rfl.cbor; +import rfl; + namespace test_readme_example2 { diff --git a/tests/cbor/test_ref.cpp b/tests/cbor/test_ref.cpp index 60d434b53..89af11d6c 100644 --- a/tests/cbor/test_ref.cpp +++ b/tests/cbor/test_ref.cpp @@ -1,7 +1,11 @@ #include -#include #include "write_and_read.hpp" +#include + +import rfl.cbor; +import rfl; + namespace test_ref { diff --git a/tests/cbor/test_save_load.cpp b/tests/cbor/test_save_load.cpp index 54f3f2b51..99e8f8583 100644 --- a/tests/cbor/test_save_load.cpp +++ b/tests/cbor/test_save_load.cpp @@ -1,10 +1,11 @@ #include -#include -#include #include #include #include +import rfl; +import rfl.cbor; + namespace test_save_load { diff --git a/tests/cbor/test_set.cpp b/tests/cbor/test_set.cpp index 148a0d43e..4ad76496e 100644 --- a/tests/cbor/test_set.cpp +++ b/tests/cbor/test_set.cpp @@ -1,7 +1,13 @@ -#include #include #include "write_and_read.hpp" +#include +#include +#include + +import rfl.cbor; +import rfl; + namespace test_set { diff --git a/tests/cbor/test_size.cpp b/tests/cbor/test_size.cpp index 33b79a21d..5cd66cb8d 100644 --- a/tests/cbor/test_size.cpp +++ b/tests/cbor/test_size.cpp @@ -1,8 +1,10 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.cbor; +import rfl; + namespace test_size { diff --git a/tests/cbor/test_snake_case_to_camel_case.cpp b/tests/cbor/test_snake_case_to_camel_case.cpp index b901b8b28..c4cdbfbc3 100644 --- a/tests/cbor/test_snake_case_to_camel_case.cpp +++ b/tests/cbor/test_snake_case_to_camel_case.cpp @@ -2,6 +2,7 @@ #include #include "write_and_read.hpp" +import rfl.cbor; namespace test_snake_case_to_camel_case { diff --git a/tests/cbor/test_snake_case_to_pascal_case.cpp b/tests/cbor/test_snake_case_to_pascal_case.cpp index 1f072e0c8..de95a59ec 100644 --- a/tests/cbor/test_snake_case_to_pascal_case.cpp +++ b/tests/cbor/test_snake_case_to_pascal_case.cpp @@ -2,6 +2,7 @@ #include #include "write_and_read.hpp" +import rfl.cbor; namespace test_snake_case_to_pascal_case { diff --git a/tests/cbor/test_string_map.cpp b/tests/cbor/test_string_map.cpp index c86a42803..db18b71ac 100644 --- a/tests/cbor/test_string_map.cpp +++ b/tests/cbor/test_string_map.cpp @@ -1,9 +1,11 @@ #include #include -#include #include #include "write_and_read.hpp" +import rfl.cbor; +import rfl; + namespace test_string_map { TEST(cbor, test_string_map) { diff --git a/tests/cbor/test_tagged_union.cpp b/tests/cbor/test_tagged_union.cpp index b4bc688f9..4e370aac5 100644 --- a/tests/cbor/test_tagged_union.cpp +++ b/tests/cbor/test_tagged_union.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.cbor; +import rfl; + namespace test_tagged_union { diff --git a/tests/cbor/test_tagged_union2.cpp b/tests/cbor/test_tagged_union2.cpp index e8c13cec2..9dffbf06d 100644 --- a/tests/cbor/test_tagged_union2.cpp +++ b/tests/cbor/test_tagged_union2.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.cbor; +import rfl; + namespace test_tagged_union2 { diff --git a/tests/cbor/test_timestamp.cpp b/tests/cbor/test_timestamp.cpp index 295a28c2d..d49ac3e19 100644 --- a/tests/cbor/test_timestamp.cpp +++ b/tests/cbor/test_timestamp.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.cbor; +import rfl; + namespace test_timestamp { diff --git a/tests/cbor/test_unique_ptr.cpp b/tests/cbor/test_unique_ptr.cpp index 49129d998..51ce22131 100644 --- a/tests/cbor/test_unique_ptr.cpp +++ b/tests/cbor/test_unique_ptr.cpp @@ -1,9 +1,13 @@ #include -#include #include #include #include "write_and_read.hpp" +#include + +import rfl.cbor; +import rfl; + namespace test_unique_ptr { diff --git a/tests/cbor/test_unique_ptr2.cpp b/tests/cbor/test_unique_ptr2.cpp index 41f2ed914..814e9ba17 100644 --- a/tests/cbor/test_unique_ptr2.cpp +++ b/tests/cbor/test_unique_ptr2.cpp @@ -1,7 +1,12 @@ #include -#include #include "write_and_read.hpp" +#include +#include + +import rfl.cbor; +import rfl; + namespace test_unique_ptr2 { diff --git a/tests/cbor/test_variant.cpp b/tests/cbor/test_variant.cpp index 7ba1c02bc..1f20078f1 100644 --- a/tests/cbor/test_variant.cpp +++ b/tests/cbor/test_variant.cpp @@ -1,8 +1,13 @@ #include -#include #include #include "write_and_read.hpp" +#include +#include + +import rfl.cbor; +import rfl; + namespace test_variant { diff --git a/tests/cbor/test_variant_auto_tagging.cpp b/tests/cbor/test_variant_auto_tagging.cpp index 642304b44..f80c1ffb3 100644 --- a/tests/cbor/test_variant_auto_tagging.cpp +++ b/tests/cbor/test_variant_auto_tagging.cpp @@ -1,9 +1,13 @@ #include -#include #include #include #include "write_and_read.hpp" +#include + +import rfl.cbor; +import rfl; + // NOTE TO MAINTAINERS: // These tests are very similar to the others in diff --git a/tests/cbor/test_vectorstring.cpp b/tests/cbor/test_vectorstring.cpp index 682290d16..b3603b6eb 100644 --- a/tests/cbor/test_vectorstring.cpp +++ b/tests/cbor/test_vectorstring.cpp @@ -1,6 +1,8 @@ -#include #include "write_and_read.hpp" +import rfl.cbor; +import rfl; + namespace test_vectorstring { diff --git a/tests/cbor/test_wstring.cpp b/tests/cbor/test_wstring.cpp index 9c4c11b75..d7a99ae7d 100644 --- a/tests/cbor/test_wstring.cpp +++ b/tests/cbor/test_wstring.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.cbor; +import rfl; + struct TestStruct { std::string theNormalString; diff --git a/tests/cbor/write_and_read.hpp b/tests/cbor/write_and_read.hpp index ea011ea47..a57b470d0 100644 --- a/tests/cbor/write_and_read.hpp +++ b/tests/cbor/write_and_read.hpp @@ -3,9 +3,16 @@ #include +#include +#include #include -#include +#include #include +#include +#include + +import rfl.cbor; + // Helper function to parse hex bytes from CBOR diagnostic output template diff --git a/tests/cereal/CMakeLists.txt b/tests/cereal/CMakeLists.txt index e3b915fb2..2fae68e5c 100644 --- a/tests/cereal/CMakeLists.txt +++ b/tests/cereal/CMakeLists.txt @@ -6,7 +6,7 @@ add_executable( reflect-cpp-cereal-tests ${SOURCES} ) -target_precompile_headers(reflect-cpp-cereal-tests PRIVATE [["rfl.hpp"]] ) +target_precompile_headers(reflect-cpp-cereal-tests PRIVATE ) target_link_libraries(reflect-cpp-cereal-tests PRIVATE reflectcpp_tests_crt) diff --git a/tests/cereal/test_add_struct_name.cpp b/tests/cereal/test_add_struct_name.cpp index 1f8e5ab13..50e44ddfa 100644 --- a/tests/cereal/test_add_struct_name.cpp +++ b/tests/cereal/test_add_struct_name.cpp @@ -2,6 +2,7 @@ #include #include "write_and_read.hpp" +import rfl.cereal; namespace test_add_struct_name { diff --git a/tests/cereal/test_array.cpp b/tests/cereal/test_array.cpp index 81412d435..b47128bdb 100644 --- a/tests/cereal/test_array.cpp +++ b/tests/cereal/test_array.cpp @@ -1,11 +1,14 @@ #include #include -#include #include -#include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.cereal; + namespace test_array { diff --git a/tests/cereal/test_box.cpp b/tests/cereal/test_box.cpp index 06c44cb22..b6669fab9 100644 --- a/tests/cereal/test_box.cpp +++ b/tests/cereal/test_box.cpp @@ -1,10 +1,13 @@ #include -#include -#include #include #include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.cereal; + namespace test_box { diff --git a/tests/cereal/test_bytestring.cpp b/tests/cereal/test_bytestring.cpp index 8a897ca12..66163ae00 100644 --- a/tests/cereal/test_bytestring.cpp +++ b/tests/cereal/test_bytestring.cpp @@ -1,6 +1,10 @@ -#include #include "write_and_read.hpp" +#include + +import rfl.cereal; +import rfl; + namespace test_bytestring { diff --git a/tests/cereal/test_custom_class1.cpp b/tests/cereal/test_custom_class1.cpp index ec1c4aefe..40215098c 100644 --- a/tests/cereal/test_custom_class1.cpp +++ b/tests/cereal/test_custom_class1.cpp @@ -1,9 +1,11 @@ #include -#include #include #include #include "write_and_read.hpp" +import rfl.cereal; +import rfl; + namespace test_custom_class1 { diff --git a/tests/cereal/test_custom_class3.cpp b/tests/cereal/test_custom_class3.cpp index 1876297d3..ba8cb2977 100644 --- a/tests/cereal/test_custom_class3.cpp +++ b/tests/cereal/test_custom_class3.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.cereal; +import rfl; + namespace test_custom_class3 { diff --git a/tests/cereal/test_custom_class4.cpp b/tests/cereal/test_custom_class4.cpp index 97ddd04d7..9fe50d795 100644 --- a/tests/cereal/test_custom_class4.cpp +++ b/tests/cereal/test_custom_class4.cpp @@ -1,8 +1,12 @@ #include -#include #include #include "write_and_read.hpp" +#include + +import rfl.cereal; +import rfl; + namespace test_custom_class4 { diff --git a/tests/cereal/test_default_values.cpp b/tests/cereal/test_default_values.cpp index 3fb3c9160..e95828fd1 100644 --- a/tests/cereal/test_default_values.cpp +++ b/tests/cereal/test_default_values.cpp @@ -1,9 +1,11 @@ #include -#include #include #include #include "write_and_read.hpp" +import rfl.cereal; +import rfl; + namespace test_default_values { diff --git a/tests/cereal/test_deque.cpp b/tests/cereal/test_deque.cpp index a0bcc9474..b94d4ecda 100644 --- a/tests/cereal/test_deque.cpp +++ b/tests/cereal/test_deque.cpp @@ -1,7 +1,13 @@ -#include #include #include "write_and_read.hpp" +#include +#include +#include + +import rfl.cereal; +import rfl; + namespace test_deque { diff --git a/tests/cereal/test_enum.cpp b/tests/cereal/test_enum.cpp index 925200726..b7bc63c32 100644 --- a/tests/cereal/test_enum.cpp +++ b/tests/cereal/test_enum.cpp @@ -1,10 +1,11 @@ #include -#include -#include #include #include #include "write_and_read.hpp" +import rfl; +import rfl.cereal; + namespace test_enum { diff --git a/tests/cereal/test_field_variant.cpp b/tests/cereal/test_field_variant.cpp index 5c0d3d9fd..119ab249d 100644 --- a/tests/cereal/test_field_variant.cpp +++ b/tests/cereal/test_field_variant.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.cereal; +import rfl; + namespace test_field_variant { diff --git a/tests/cereal/test_field_variant_std.cpp b/tests/cereal/test_field_variant_std.cpp index 4932cb24d..35e00b03d 100644 --- a/tests/cereal/test_field_variant_std.cpp +++ b/tests/cereal/test_field_variant_std.cpp @@ -1,7 +1,11 @@ #include -#include #include "write_and_read.hpp" +#include + +import rfl.cereal; +import rfl; + namespace test_field_variant_std { diff --git a/tests/cereal/test_flag_enum.cpp b/tests/cereal/test_flag_enum.cpp index aa7d13965..15f4f2ab3 100644 --- a/tests/cereal/test_flag_enum.cpp +++ b/tests/cereal/test_flag_enum.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.cereal; +import rfl; + namespace test_flag_enum { diff --git a/tests/cereal/test_flag_enum_with_int.cpp b/tests/cereal/test_flag_enum_with_int.cpp index 3605e8cbd..aca530792 100644 --- a/tests/cereal/test_flag_enum_with_int.cpp +++ b/tests/cereal/test_flag_enum_with_int.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.cereal; +import rfl; + namespace test_flag_enum_with_int { diff --git a/tests/cereal/test_flatten.cpp b/tests/cereal/test_flatten.cpp index 50323a912..7d1f1ea89 100644 --- a/tests/cereal/test_flatten.cpp +++ b/tests/cereal/test_flatten.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.cereal; +import rfl; + namespace test_flatten { diff --git a/tests/cereal/test_flatten_anonymous.cpp b/tests/cereal/test_flatten_anonymous.cpp index ec8ea1182..44f0f504d 100644 --- a/tests/cereal/test_flatten_anonymous.cpp +++ b/tests/cereal/test_flatten_anonymous.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.cereal; +import rfl; + namespace test_flatten_anonymous { diff --git a/tests/cereal/test_forward_list.cpp b/tests/cereal/test_forward_list.cpp index 5b1696cbb..a6c97037e 100644 --- a/tests/cereal/test_forward_list.cpp +++ b/tests/cereal/test_forward_list.cpp @@ -1,7 +1,13 @@ -#include #include #include "write_and_read.hpp" +#include +#include +#include + +import rfl.cereal; +import rfl; + namespace test_forward_list { diff --git a/tests/cereal/test_generic.cpp b/tests/cereal/test_generic.cpp index 1dfd789d1..f17f68a88 100644 --- a/tests/cereal/test_generic.cpp +++ b/tests/cereal/test_generic.cpp @@ -1,8 +1,9 @@ -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.cereal; + namespace test_generic { diff --git a/tests/cereal/test_literal.cpp b/tests/cereal/test_literal.cpp index 873bece8e..37cd81423 100644 --- a/tests/cereal/test_literal.cpp +++ b/tests/cereal/test_literal.cpp @@ -1,9 +1,11 @@ #include -#include -#include #include #include "write_and_read.hpp" +import rfl.cereal; +import rfl; +import rfl.json; + namespace test_literal { diff --git a/tests/cereal/test_literal_map.cpp b/tests/cereal/test_literal_map.cpp index f3baa931c..693e791b6 100644 --- a/tests/cereal/test_literal_map.cpp +++ b/tests/cereal/test_literal_map.cpp @@ -1,9 +1,11 @@ #include #include -#include #include #include "write_and_read.hpp" +import rfl.cereal; +import rfl; + namespace test_literal_map { diff --git a/tests/cereal/test_map.cpp b/tests/cereal/test_map.cpp index 3b8aad9c1..28a291f49 100644 --- a/tests/cereal/test_map.cpp +++ b/tests/cereal/test_map.cpp @@ -1,11 +1,15 @@ #include #include -#include -#include #include #include #include "write_and_read.hpp" +#include +#include + +import rfl; +import rfl.cereal; + namespace test_map { diff --git a/tests/cereal/test_map2.cpp b/tests/cereal/test_map2.cpp index dddc2b456..9a7013b3c 100644 --- a/tests/cereal/test_map2.cpp +++ b/tests/cereal/test_map2.cpp @@ -1,9 +1,13 @@ #include -#include -#include #include #include "write_and_read.hpp" +#include + +import rfl.cereal; +import rfl; +import rfl.json; + namespace test_map2 { diff --git a/tests/cereal/test_monster_example.cpp b/tests/cereal/test_monster_example.cpp index 3bf66f849..9fea3ea8e 100644 --- a/tests/cereal/test_monster_example.cpp +++ b/tests/cereal/test_monster_example.cpp @@ -1,8 +1,10 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.cereal; +import rfl; + namespace test_monster_example { diff --git a/tests/cereal/test_optional_fields.cpp b/tests/cereal/test_optional_fields.cpp index c1ce79a23..13708ddf1 100644 --- a/tests/cereal/test_optional_fields.cpp +++ b/tests/cereal/test_optional_fields.cpp @@ -1,9 +1,12 @@ #include -#include -#include #include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.cereal; + namespace test_optional_fields { diff --git a/tests/cereal/test_optionals_in_vectors.cpp b/tests/cereal/test_optionals_in_vectors.cpp index 70c952a33..549c53775 100644 --- a/tests/cereal/test_optionals_in_vectors.cpp +++ b/tests/cereal/test_optionals_in_vectors.cpp @@ -1,9 +1,13 @@ -#include -#include #include #include #include "write_and_read.hpp" +#include + +import rfl.cereal; +import rfl; +import rfl.json; + namespace test_optionals_in_vectors { diff --git a/tests/cereal/test_person.cpp b/tests/cereal/test_person.cpp index aa33cd539..85d0e14d0 100644 --- a/tests/cereal/test_person.cpp +++ b/tests/cereal/test_person.cpp @@ -1,11 +1,12 @@ #include -#include -#include #include #include #include "write_and_read.hpp" +import rfl; +import rfl.cereal; + namespace test_person { diff --git a/tests/cereal/test_readme_example.cpp b/tests/cereal/test_readme_example.cpp index 6cc2baaae..197be5ffb 100644 --- a/tests/cereal/test_readme_example.cpp +++ b/tests/cereal/test_readme_example.cpp @@ -1,9 +1,10 @@ -#include -#include #include #include #include "write_and_read.hpp" +import rfl; +import rfl.cereal; + namespace test_readme_example { diff --git a/tests/cereal/test_readme_example2.cpp b/tests/cereal/test_readme_example2.cpp index b912b2be1..fa449e6cb 100644 --- a/tests/cereal/test_readme_example2.cpp +++ b/tests/cereal/test_readme_example2.cpp @@ -1,7 +1,9 @@ -#include #include #include "write_and_read.hpp" +import rfl.cereal; +import rfl; + namespace test_readme_example2 { diff --git a/tests/cereal/test_readme_example3.cpp b/tests/cereal/test_readme_example3.cpp index 4c9873c22..9f7c9b4d0 100644 --- a/tests/cereal/test_readme_example3.cpp +++ b/tests/cereal/test_readme_example3.cpp @@ -1,8 +1,10 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.cereal; +import rfl; + namespace test_readme_example3 { diff --git a/tests/cereal/test_ref.cpp b/tests/cereal/test_ref.cpp index 0e4a2f2ec..5d0ced880 100644 --- a/tests/cereal/test_ref.cpp +++ b/tests/cereal/test_ref.cpp @@ -1,7 +1,11 @@ #include -#include #include "write_and_read.hpp" +#include + +import rfl.cereal; +import rfl; + namespace test_ref { diff --git a/tests/cereal/test_rfl_tuple.cpp b/tests/cereal/test_rfl_tuple.cpp index 5729a867e..c43ab731a 100644 --- a/tests/cereal/test_rfl_tuple.cpp +++ b/tests/cereal/test_rfl_tuple.cpp @@ -1,10 +1,14 @@ #include -#include -#include #include #include "write_and_read.hpp" +#include + +import rfl.cereal; +import rfl; +import rfl.json; + namespace test_rfl_tuple { diff --git a/tests/cereal/test_rfl_variant.cpp b/tests/cereal/test_rfl_variant.cpp index 4be257c94..e37073333 100644 --- a/tests/cereal/test_rfl_variant.cpp +++ b/tests/cereal/test_rfl_variant.cpp @@ -1,7 +1,11 @@ #include -#include #include "write_and_read.hpp" +#include + +import rfl.cereal; +import rfl; + namespace test_variant { diff --git a/tests/cereal/test_save_load.cpp b/tests/cereal/test_save_load.cpp index c719d434b..e8cddb9d8 100644 --- a/tests/cereal/test_save_load.cpp +++ b/tests/cereal/test_save_load.cpp @@ -1,10 +1,11 @@ #include -#include -#include #include #include #include "write_and_read.hpp" +import rfl; +import rfl.cereal; + namespace test_save_load { struct Person { diff --git a/tests/cereal/test_set.cpp b/tests/cereal/test_set.cpp index bf8aa128b..362e65152 100644 --- a/tests/cereal/test_set.cpp +++ b/tests/cereal/test_set.cpp @@ -1,7 +1,13 @@ -#include #include #include "write_and_read.hpp" +#include +#include +#include + +import rfl.cereal; +import rfl; + namespace test_set { diff --git a/tests/cereal/test_shared_ptr.cpp b/tests/cereal/test_shared_ptr.cpp index f9a870a04..326a24a51 100644 --- a/tests/cereal/test_shared_ptr.cpp +++ b/tests/cereal/test_shared_ptr.cpp @@ -1,10 +1,14 @@ #include -#include -#include #include #include #include "write_and_read.hpp" +#include + +import rfl.cereal; +import rfl; +import rfl.json; + namespace test_shared_ptr { diff --git a/tests/cereal/test_size.cpp b/tests/cereal/test_size.cpp index 4d6741465..061b23274 100644 --- a/tests/cereal/test_size.cpp +++ b/tests/cereal/test_size.cpp @@ -1,8 +1,10 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.cereal; +import rfl; + namespace test_size { diff --git a/tests/cereal/test_string_map.cpp b/tests/cereal/test_string_map.cpp index b0e16ec77..3b37fa951 100644 --- a/tests/cereal/test_string_map.cpp +++ b/tests/cereal/test_string_map.cpp @@ -1,10 +1,12 @@ #include #include -#include -#include #include #include "write_and_read.hpp" +import rfl.cereal; +import rfl; +import rfl.json; + namespace test_string_map { diff --git a/tests/cereal/test_tagged_union.cpp b/tests/cereal/test_tagged_union.cpp index 00eb5baf2..770bdcdc1 100644 --- a/tests/cereal/test_tagged_union.cpp +++ b/tests/cereal/test_tagged_union.cpp @@ -1,10 +1,11 @@ #include -#include -#include #include #include #include "write_and_read.hpp" +import rfl; +import rfl.cereal; + namespace test_tagged_union { diff --git a/tests/cereal/test_timestamp.cpp b/tests/cereal/test_timestamp.cpp index 42cbe3ade..a6cfc2eba 100644 --- a/tests/cereal/test_timestamp.cpp +++ b/tests/cereal/test_timestamp.cpp @@ -1,10 +1,11 @@ #include -#include -#include #include #include #include "write_and_read.hpp" +import rfl; +import rfl.cereal; + namespace test_timestamp { diff --git a/tests/cereal/test_tuple.cpp b/tests/cereal/test_tuple.cpp index c7dfcfe24..9cc3dd11a 100644 --- a/tests/cereal/test_tuple.cpp +++ b/tests/cereal/test_tuple.cpp @@ -1,11 +1,12 @@ #include -#include -#include #include #include #include #include "write_and_read.hpp" +import rfl; +import rfl.cereal; + namespace test_tuple { diff --git a/tests/cereal/test_unique_ptr.cpp b/tests/cereal/test_unique_ptr.cpp index 588643ccc..17c60d5ed 100644 --- a/tests/cereal/test_unique_ptr.cpp +++ b/tests/cereal/test_unique_ptr.cpp @@ -1,11 +1,14 @@ #include #include -#include -#include #include #include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.cereal; + namespace test_unique_ptr { diff --git a/tests/cereal/test_unique_ptr2.cpp b/tests/cereal/test_unique_ptr2.cpp index 31d5d72db..2757745af 100644 --- a/tests/cereal/test_unique_ptr2.cpp +++ b/tests/cereal/test_unique_ptr2.cpp @@ -1,7 +1,12 @@ #include -#include #include "write_and_read.hpp" +#include +#include + +import rfl.cereal; +import rfl; + namespace test_unique_ptr2 { diff --git a/tests/cereal/test_variant.cpp b/tests/cereal/test_variant.cpp index b2c7e3d13..c254d60c3 100644 --- a/tests/cereal/test_variant.cpp +++ b/tests/cereal/test_variant.cpp @@ -1,10 +1,13 @@ #include -#include -#include #include #include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.cereal; + namespace test_variant { diff --git a/tests/cereal/test_variants_in_vectors.cpp b/tests/cereal/test_variants_in_vectors.cpp index 0f1a3d891..aa8d3c0e6 100644 --- a/tests/cereal/test_variants_in_vectors.cpp +++ b/tests/cereal/test_variants_in_vectors.cpp @@ -1,9 +1,13 @@ -#include -#include #include #include #include "write_and_read.hpp" +#include + +import rfl.cereal; +import rfl; +import rfl.json; + namespace test_variants_in_vectors { diff --git a/tests/cereal/test_wstring.cpp b/tests/cereal/test_wstring.cpp index aef3725bf..c0298d3f3 100644 --- a/tests/cereal/test_wstring.cpp +++ b/tests/cereal/test_wstring.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.cereal; +import rfl; + struct TestStruct { std::string theNormalString; diff --git a/tests/cereal/write_and_read.hpp b/tests/cereal/write_and_read.hpp index fc84a002a..42c2adb77 100644 --- a/tests/cereal/write_and_read.hpp +++ b/tests/cereal/write_and_read.hpp @@ -2,8 +2,11 @@ #define WRITE_AND_READ_ #include +#include + +import rfl.cereal; + -#include template void write_and_read(const auto& _struct) { diff --git a/tests/cli/CMakeLists.txt b/tests/cli/CMakeLists.txt index 73bd38ddf..a20df4584 100644 --- a/tests/cli/CMakeLists.txt +++ b/tests/cli/CMakeLists.txt @@ -6,7 +6,7 @@ add_executable( reflect-cpp-cli-tests ${SOURCES} ) -target_precompile_headers(reflect-cpp-cli-tests PRIVATE [["rfl.hpp"]] ) +target_precompile_headers(reflect-cpp-cli-tests PRIVATE ) target_include_directories(reflect-cpp-cli-tests SYSTEM PRIVATE "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include") diff --git a/tests/cli/test_basic.cpp b/tests/cli/test_basic.cpp index 615f2d09d..2064a113c 100644 --- a/tests/cli/test_basic.cpp +++ b/tests/cli/test_basic.cpp @@ -1,7 +1,8 @@ #include -#include -#include #include +import rfl; +import rfl.cli; + namespace test_basic { diff --git a/tests/cli/test_bool_short_positional.cpp b/tests/cli/test_bool_short_positional.cpp index 55a84aee3..cc6b8e8cd 100644 --- a/tests/cli/test_bool_short_positional.cpp +++ b/tests/cli/test_bool_short_positional.cpp @@ -1,7 +1,8 @@ #include -#include -#include #include +import rfl; +import rfl.cli; + namespace test_bool_short_positional { diff --git a/tests/cli/test_enum.cpp b/tests/cli/test_enum.cpp index 29c6f033b..663ca4776 100644 --- a/tests/cli/test_enum.cpp +++ b/tests/cli/test_enum.cpp @@ -1,7 +1,8 @@ #include -#include -#include #include +import rfl; +import rfl.cli; + namespace test_enum { diff --git a/tests/cli/test_errors.cpp b/tests/cli/test_errors.cpp index 0570191c0..3fe871ce2 100644 --- a/tests/cli/test_errors.cpp +++ b/tests/cli/test_errors.cpp @@ -1,7 +1,8 @@ #include -#include -#include #include +import rfl; +import rfl.cli; + namespace test_errors { diff --git a/tests/cli/test_flatten.cpp b/tests/cli/test_flatten.cpp index 53f763a05..ed8400e49 100644 --- a/tests/cli/test_flatten.cpp +++ b/tests/cli/test_flatten.cpp @@ -1,7 +1,8 @@ #include -#include -#include #include +import rfl; +import rfl.cli; + namespace test_flatten { diff --git a/tests/cli/test_kebab_case.cpp b/tests/cli/test_kebab_case.cpp index 33a18a067..c3b4ea848 100644 --- a/tests/cli/test_kebab_case.cpp +++ b/tests/cli/test_kebab_case.cpp @@ -1,7 +1,8 @@ #include -#include -#include #include +import rfl; +import rfl.cli; + namespace test_kebab_case { diff --git a/tests/cli/test_nested.cpp b/tests/cli/test_nested.cpp index a09f80e4e..76fa146ac 100644 --- a/tests/cli/test_nested.cpp +++ b/tests/cli/test_nested.cpp @@ -1,7 +1,8 @@ #include -#include -#include #include +import rfl; +import rfl.cli; + namespace test_nested { diff --git a/tests/cli/test_optional.cpp b/tests/cli/test_optional.cpp index 1a5e12178..50ea6d12e 100644 --- a/tests/cli/test_optional.cpp +++ b/tests/cli/test_optional.cpp @@ -1,8 +1,9 @@ #include -#include -#include #include #include +import rfl; +import rfl.cli; + namespace test_optional { diff --git a/tests/cli/test_positional.cpp b/tests/cli/test_positional.cpp index da1d41726..0fe377f49 100644 --- a/tests/cli/test_positional.cpp +++ b/tests/cli/test_positional.cpp @@ -1,7 +1,10 @@ #include -#include -#include #include +#include + +import rfl; +import rfl.cli; + namespace test_positional { diff --git a/tests/cli/test_positional_and_short.cpp b/tests/cli/test_positional_and_short.cpp index 2b5caea0e..63f1d5c5e 100644 --- a/tests/cli/test_positional_and_short.cpp +++ b/tests/cli/test_positional_and_short.cpp @@ -1,7 +1,8 @@ #include -#include -#include #include +import rfl; +import rfl.cli; + namespace test_positional_and_short { diff --git a/tests/cli/test_regression_bugs.cpp b/tests/cli/test_regression_bugs.cpp index d3e68ff0a..00fb6764c 100644 --- a/tests/cli/test_regression_bugs.cpp +++ b/tests/cli/test_regression_bugs.cpp @@ -3,9 +3,10 @@ #include #include #include +import rfl; +import rfl.cli; + -#include -#include // cli::Reader stoull accepts negative numbers for unsigned types // File: include/rfl/cli/Reader.hpp:77 diff --git a/tests/cli/test_rename.cpp b/tests/cli/test_rename.cpp index 39fe709e2..c5c5118b8 100644 --- a/tests/cli/test_rename.cpp +++ b/tests/cli/test_rename.cpp @@ -1,7 +1,8 @@ #include -#include -#include #include +import rfl; +import rfl.cli; + namespace test_rename { diff --git a/tests/cli/test_settings_macro.cpp b/tests/cli/test_settings_macro.cpp index d30d28e27..23d716f9d 100644 --- a/tests/cli/test_settings_macro.cpp +++ b/tests/cli/test_settings_macro.cpp @@ -1,6 +1,10 @@ #include #include #include +#include + +import rfl; + namespace test_settings_macro { diff --git a/tests/cli/test_short.cpp b/tests/cli/test_short.cpp index e018c72d3..ad9de61b7 100644 --- a/tests/cli/test_short.cpp +++ b/tests/cli/test_short.cpp @@ -1,7 +1,8 @@ #include -#include -#include #include +import rfl; +import rfl.cli; + namespace test_short { diff --git a/tests/cli/test_vector.cpp b/tests/cli/test_vector.cpp index cd672fbf8..b53f1c49c 100644 --- a/tests/cli/test_vector.cpp +++ b/tests/cli/test_vector.cpp @@ -1,8 +1,9 @@ #include -#include -#include #include #include +import rfl; +import rfl.cli; + namespace test_vector { diff --git a/tests/csv/CMakeLists.txt b/tests/csv/CMakeLists.txt index 085e39b49..9a42b6a23 100644 --- a/tests/csv/CMakeLists.txt +++ b/tests/csv/CMakeLists.txt @@ -6,7 +6,7 @@ add_executable( reflect-cpp-csv-tests ${SOURCES} ) -target_precompile_headers(reflect-cpp-csv-tests PRIVATE [["rfl.hpp"]] ) +target_precompile_headers(reflect-cpp-csv-tests PRIVATE ) target_include_directories(reflect-cpp-csv-tests SYSTEM PRIVATE "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include") diff --git a/tests/csv/test_boolean.cpp b/tests/csv/test_boolean.cpp index 39ad77c1b..ed3235901 100644 --- a/tests/csv/test_boolean.cpp +++ b/tests/csv/test_boolean.cpp @@ -1,8 +1,9 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.csv; + namespace test_boolean { diff --git a/tests/csv/test_box.cpp b/tests/csv/test_box.cpp index 507a707af..bd096bcba 100644 --- a/tests/csv/test_box.cpp +++ b/tests/csv/test_box.cpp @@ -1,8 +1,9 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.csv; + namespace test_box { diff --git a/tests/csv/test_bytestring.cpp b/tests/csv/test_bytestring.cpp index 465d135d4..d923a3ebd 100644 --- a/tests/csv/test_bytestring.cpp +++ b/tests/csv/test_bytestring.cpp @@ -1,7 +1,10 @@ -#include #include #include "write_and_read.hpp" +#include + +import rfl.csv; + namespace test_bytestring { diff --git a/tests/csv/test_camel_case.cpp b/tests/csv/test_camel_case.cpp index fe1de9330..41d312755 100644 --- a/tests/csv/test_camel_case.cpp +++ b/tests/csv/test_camel_case.cpp @@ -1,8 +1,9 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.csv; + namespace test_camel_case { diff --git a/tests/csv/test_deque.cpp b/tests/csv/test_deque.cpp index fb02306d5..e38935e90 100644 --- a/tests/csv/test_deque.cpp +++ b/tests/csv/test_deque.cpp @@ -1,8 +1,9 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.csv; + namespace test_deque { diff --git a/tests/csv/test_enums.cpp b/tests/csv/test_enums.cpp index cb7897dff..8f24b40d8 100644 --- a/tests/csv/test_enums.cpp +++ b/tests/csv/test_enums.cpp @@ -1,8 +1,9 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.csv; + namespace test_enums { diff --git a/tests/csv/test_flatten.cpp b/tests/csv/test_flatten.cpp index a5dca5360..fa4d712e7 100644 --- a/tests/csv/test_flatten.cpp +++ b/tests/csv/test_flatten.cpp @@ -1,8 +1,9 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.csv; + namespace test_flatten { diff --git a/tests/csv/test_literal.cpp b/tests/csv/test_literal.cpp index 3c3f16949..0724e4dfe 100644 --- a/tests/csv/test_literal.cpp +++ b/tests/csv/test_literal.cpp @@ -1,8 +1,9 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.csv; + namespace test_literal { diff --git a/tests/csv/test_optionals.cpp b/tests/csv/test_optionals.cpp index fac02974c..71a640a99 100644 --- a/tests/csv/test_optionals.cpp +++ b/tests/csv/test_optionals.cpp @@ -1,9 +1,10 @@ #include -#include #include #include #include "write_and_read.hpp" +import rfl.csv; + namespace test_optionals { diff --git a/tests/csv/test_readme_example.cpp b/tests/csv/test_readme_example.cpp index 3d39b54f8..87ba286cc 100644 --- a/tests/csv/test_readme_example.cpp +++ b/tests/csv/test_readme_example.cpp @@ -1,8 +1,9 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.csv; + namespace test_readme_example { diff --git a/tests/csv/test_ref.cpp b/tests/csv/test_ref.cpp index b48f36ac9..b366d3f07 100644 --- a/tests/csv/test_ref.cpp +++ b/tests/csv/test_ref.cpp @@ -1,8 +1,9 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.csv; + namespace test_ref { diff --git a/tests/csv/test_save_load.cpp b/tests/csv/test_save_load.cpp index 43abf314e..9918a63d3 100644 --- a/tests/csv/test_save_load.cpp +++ b/tests/csv/test_save_load.cpp @@ -1,10 +1,11 @@ #include #include -#include -#include #include #include +import rfl; +import rfl.csv; + namespace test_save_load { diff --git a/tests/csv/test_settings.cpp b/tests/csv/test_settings.cpp index 03ad02985..9696f80cb 100644 --- a/tests/csv/test_settings.cpp +++ b/tests/csv/test_settings.cpp @@ -1,8 +1,9 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.csv; + namespace test_settings { diff --git a/tests/csv/test_shared_ptr.cpp b/tests/csv/test_shared_ptr.cpp index 88b7ec714..492a7132c 100644 --- a/tests/csv/test_shared_ptr.cpp +++ b/tests/csv/test_shared_ptr.cpp @@ -1,9 +1,10 @@ #include -#include #include #include #include "write_and_read.hpp" +import rfl.csv; + namespace test_shared_ptr { diff --git a/tests/csv/test_unique_ptr.cpp b/tests/csv/test_unique_ptr.cpp index a0448f0c0..91c1a4821 100644 --- a/tests/csv/test_unique_ptr.cpp +++ b/tests/csv/test_unique_ptr.cpp @@ -1,9 +1,10 @@ #include -#include #include #include #include "write_and_read.hpp" +import rfl.csv; + namespace test_unique_ptr { diff --git a/tests/csv/write_and_read.hpp b/tests/csv/write_and_read.hpp index d5198e4e3..1ad944c2f 100644 --- a/tests/csv/write_and_read.hpp +++ b/tests/csv/write_and_read.hpp @@ -2,8 +2,11 @@ #define WRITE_AND_READ_ #include +#include + +import rfl.csv; + -#include template void write_and_read(const auto& _vec, const rfl::csv::Settings& _settings = diff --git a/tests/flexbuffers/CMakeLists.txt b/tests/flexbuffers/CMakeLists.txt index 63204e564..42553b67d 100644 --- a/tests/flexbuffers/CMakeLists.txt +++ b/tests/flexbuffers/CMakeLists.txt @@ -6,7 +6,7 @@ add_executable( reflect-cpp-flexbuffers-tests ${SOURCES} ) -target_precompile_headers(reflect-cpp-flexbuffers-tests PRIVATE [["rfl.hpp"]] ) +target_precompile_headers(reflect-cpp-flexbuffers-tests PRIVATE ) target_include_directories(reflect-cpp-flexbuffers-tests SYSTEM PRIVATE "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include") diff --git a/tests/flexbuffers/test_add_struct_name.cpp b/tests/flexbuffers/test_add_struct_name.cpp index 7b63625af..7716c0b02 100644 --- a/tests/flexbuffers/test_add_struct_name.cpp +++ b/tests/flexbuffers/test_add_struct_name.cpp @@ -2,6 +2,7 @@ #include #include "write_and_read.hpp" +import rfl.flexbuf; namespace test_add_struct_name { diff --git a/tests/flexbuffers/test_array.cpp b/tests/flexbuffers/test_array.cpp index 76ec1eb4d..a59fbca7e 100644 --- a/tests/flexbuffers/test_array.cpp +++ b/tests/flexbuffers/test_array.cpp @@ -1,13 +1,16 @@ #include #include -#include #include // Make sure things still compile when // rfl.hpp is included after rfl/cbor.hpp. -#include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.flexbuf; + namespace test_array { diff --git a/tests/flexbuffers/test_box.cpp b/tests/flexbuffers/test_box.cpp index fdfd89946..58220194d 100644 --- a/tests/flexbuffers/test_box.cpp +++ b/tests/flexbuffers/test_box.cpp @@ -1,7 +1,11 @@ #include -#include #include "write_and_read.hpp" +#include + +import rfl.flexbuf; +import rfl; + namespace test_box { diff --git a/tests/flexbuffers/test_bytestring.cpp b/tests/flexbuffers/test_bytestring.cpp index abbf3d4e7..309f5321b 100644 --- a/tests/flexbuffers/test_bytestring.cpp +++ b/tests/flexbuffers/test_bytestring.cpp @@ -1,7 +1,11 @@ -#include #include #include "write_and_read.hpp" +#include + +import rfl.flexbuf; +import rfl; + namespace test_bytestring { diff --git a/tests/flexbuffers/test_combined_processors.cpp b/tests/flexbuffers/test_combined_processors.cpp index 1a0011bc6..c82af8f41 100644 --- a/tests/flexbuffers/test_combined_processors.cpp +++ b/tests/flexbuffers/test_combined_processors.cpp @@ -2,6 +2,7 @@ #include #include "write_and_read.hpp" +import rfl.flexbuf; namespace test_combined_processors { diff --git a/tests/flexbuffers/test_custom_class1.cpp b/tests/flexbuffers/test_custom_class1.cpp index bfc65a700..84fd67966 100644 --- a/tests/flexbuffers/test_custom_class1.cpp +++ b/tests/flexbuffers/test_custom_class1.cpp @@ -1,9 +1,11 @@ #include -#include #include #include #include "write_and_read.hpp" +import rfl.flexbuf; +import rfl; + namespace test_custom_class1 { diff --git a/tests/flexbuffers/test_custom_class3.cpp b/tests/flexbuffers/test_custom_class3.cpp index 26a72132b..f9d9b0445 100644 --- a/tests/flexbuffers/test_custom_class3.cpp +++ b/tests/flexbuffers/test_custom_class3.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.flexbuf; +import rfl; + namespace test_custom_class3 { diff --git a/tests/flexbuffers/test_custom_class4.cpp b/tests/flexbuffers/test_custom_class4.cpp index 3d1495f64..155ec2a4f 100644 --- a/tests/flexbuffers/test_custom_class4.cpp +++ b/tests/flexbuffers/test_custom_class4.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.flexbuf; +import rfl; + namespace test_custom_class4 { diff --git a/tests/flexbuffers/test_default_values.cpp b/tests/flexbuffers/test_default_values.cpp index a8d6460ce..6f805c4ef 100644 --- a/tests/flexbuffers/test_default_values.cpp +++ b/tests/flexbuffers/test_default_values.cpp @@ -1,9 +1,11 @@ #include -#include #include #include #include "write_and_read.hpp" +import rfl.flexbuf; +import rfl; + namespace test_default_values { diff --git a/tests/flexbuffers/test_deque.cpp b/tests/flexbuffers/test_deque.cpp index f361bd20c..ac1d93130 100644 --- a/tests/flexbuffers/test_deque.cpp +++ b/tests/flexbuffers/test_deque.cpp @@ -1,7 +1,13 @@ -#include #include #include "write_and_read.hpp" +#include +#include +#include + +import rfl.flexbuf; +import rfl; + namespace test_deque { diff --git a/tests/flexbuffers/test_enum.cpp b/tests/flexbuffers/test_enum.cpp index 3f751a47c..184b484bf 100644 --- a/tests/flexbuffers/test_enum.cpp +++ b/tests/flexbuffers/test_enum.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.flexbuf; +import rfl; + namespace test_enum { diff --git a/tests/flexbuffers/test_field_variant.cpp b/tests/flexbuffers/test_field_variant.cpp index 3c3106fd5..ca036d0f8 100644 --- a/tests/flexbuffers/test_field_variant.cpp +++ b/tests/flexbuffers/test_field_variant.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.flexbuf; +import rfl; + namespace test_field_variant { diff --git a/tests/flexbuffers/test_flag_enum.cpp b/tests/flexbuffers/test_flag_enum.cpp index 9792444b4..528a36de6 100644 --- a/tests/flexbuffers/test_flag_enum.cpp +++ b/tests/flexbuffers/test_flag_enum.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.flexbuf; +import rfl; + namespace test_flag_enum { diff --git a/tests/flexbuffers/test_flag_enum_with_int.cpp b/tests/flexbuffers/test_flag_enum_with_int.cpp index 740c6135a..17379b3c7 100644 --- a/tests/flexbuffers/test_flag_enum_with_int.cpp +++ b/tests/flexbuffers/test_flag_enum_with_int.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.flexbuf; +import rfl; + namespace test_flag_enum_with_int { diff --git a/tests/flexbuffers/test_flatten.cpp b/tests/flexbuffers/test_flatten.cpp index 259187dc7..f312da060 100644 --- a/tests/flexbuffers/test_flatten.cpp +++ b/tests/flexbuffers/test_flatten.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.flexbuf; +import rfl; + namespace test_flatten { diff --git a/tests/flexbuffers/test_flatten_anonymous.cpp b/tests/flexbuffers/test_flatten_anonymous.cpp index 6a7e5eab0..0a22a7523 100644 --- a/tests/flexbuffers/test_flatten_anonymous.cpp +++ b/tests/flexbuffers/test_flatten_anonymous.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.flexbuf; +import rfl; + namespace test_flatten_anonymous { diff --git a/tests/flexbuffers/test_forward_list.cpp b/tests/flexbuffers/test_forward_list.cpp index 79c1e01b3..f725d63dc 100644 --- a/tests/flexbuffers/test_forward_list.cpp +++ b/tests/flexbuffers/test_forward_list.cpp @@ -1,7 +1,13 @@ -#include #include #include "write_and_read.hpp" +#include +#include +#include + +import rfl.flexbuf; +import rfl; + namespace test_forward_list { diff --git a/tests/flexbuffers/test_literal.cpp b/tests/flexbuffers/test_literal.cpp index 5cf835e5b..bcd219664 100644 --- a/tests/flexbuffers/test_literal.cpp +++ b/tests/flexbuffers/test_literal.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.flexbuf; +import rfl; + namespace test_literal { diff --git a/tests/flexbuffers/test_literal_map.cpp b/tests/flexbuffers/test_literal_map.cpp index 48fcbec47..75ba8bbcf 100644 --- a/tests/flexbuffers/test_literal_map.cpp +++ b/tests/flexbuffers/test_literal_map.cpp @@ -1,9 +1,11 @@ #include #include -#include #include #include "write_and_read.hpp" +import rfl.flexbuf; +import rfl; + namespace test_literal_map { diff --git a/tests/flexbuffers/test_map.cpp b/tests/flexbuffers/test_map.cpp index 95e9a7a08..a78e9247e 100644 --- a/tests/flexbuffers/test_map.cpp +++ b/tests/flexbuffers/test_map.cpp @@ -1,8 +1,12 @@ #include -#include #include #include "write_and_read.hpp" +#include + +import rfl.flexbuf; +import rfl; + namespace test_map { diff --git a/tests/flexbuffers/test_map_with_key_validation.cpp b/tests/flexbuffers/test_map_with_key_validation.cpp index eccf04853..8f0ec1960 100644 --- a/tests/flexbuffers/test_map_with_key_validation.cpp +++ b/tests/flexbuffers/test_map_with_key_validation.cpp @@ -1,8 +1,13 @@ #include -#include #include #include "write_and_read.hpp" +#include +#include + +import rfl.flexbuf; +import rfl; + namespace test_map_with_key_validation { diff --git a/tests/flexbuffers/test_monster_example.cpp b/tests/flexbuffers/test_monster_example.cpp index 3c52c99f9..d878202b7 100644 --- a/tests/flexbuffers/test_monster_example.cpp +++ b/tests/flexbuffers/test_monster_example.cpp @@ -1,8 +1,10 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.flexbuf; +import rfl; + namespace test_monster_example { diff --git a/tests/flexbuffers/test_readme_example.cpp b/tests/flexbuffers/test_readme_example.cpp index 037300eac..5d71089c5 100644 --- a/tests/flexbuffers/test_readme_example.cpp +++ b/tests/flexbuffers/test_readme_example.cpp @@ -1,8 +1,10 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.flexbuf; +import rfl; + namespace test_readme_example { diff --git a/tests/flexbuffers/test_readme_example2.cpp b/tests/flexbuffers/test_readme_example2.cpp index d8f37efcf..1f7c780ee 100644 --- a/tests/flexbuffers/test_readme_example2.cpp +++ b/tests/flexbuffers/test_readme_example2.cpp @@ -1,7 +1,9 @@ -#include #include #include "write_and_read.hpp" +import rfl.flexbuf; +import rfl; + namespace test_readme_example2 { diff --git a/tests/flexbuffers/test_ref.cpp b/tests/flexbuffers/test_ref.cpp index c02ccf905..a2525c40d 100644 --- a/tests/flexbuffers/test_ref.cpp +++ b/tests/flexbuffers/test_ref.cpp @@ -1,7 +1,11 @@ #include -#include #include "write_and_read.hpp" +#include + +import rfl.flexbuf; +import rfl; + namespace test_ref { diff --git a/tests/flexbuffers/test_save_load.cpp b/tests/flexbuffers/test_save_load.cpp index 0754c7d42..860870e5b 100644 --- a/tests/flexbuffers/test_save_load.cpp +++ b/tests/flexbuffers/test_save_load.cpp @@ -1,10 +1,11 @@ #include -#include -#include #include #include #include +import rfl; +import rfl.flexbuf; + namespace test_save_load { diff --git a/tests/flexbuffers/test_set.cpp b/tests/flexbuffers/test_set.cpp index 98bd5f843..3ce75fc92 100644 --- a/tests/flexbuffers/test_set.cpp +++ b/tests/flexbuffers/test_set.cpp @@ -1,7 +1,13 @@ -#include #include #include "write_and_read.hpp" +#include +#include +#include + +import rfl.flexbuf; +import rfl; + namespace test_set { diff --git a/tests/flexbuffers/test_size.cpp b/tests/flexbuffers/test_size.cpp index 082fecaa2..b55b9ece7 100644 --- a/tests/flexbuffers/test_size.cpp +++ b/tests/flexbuffers/test_size.cpp @@ -1,8 +1,10 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.flexbuf; +import rfl; + namespace test_size { diff --git a/tests/flexbuffers/test_snake_case_to_camel_case.cpp b/tests/flexbuffers/test_snake_case_to_camel_case.cpp index 35c85ab68..9de25c69b 100644 --- a/tests/flexbuffers/test_snake_case_to_camel_case.cpp +++ b/tests/flexbuffers/test_snake_case_to_camel_case.cpp @@ -2,6 +2,7 @@ #include #include "write_and_read.hpp" +import rfl.flexbuf; namespace test_snake_case_to_camel_case { diff --git a/tests/flexbuffers/test_snake_case_to_pascal_case.cpp b/tests/flexbuffers/test_snake_case_to_pascal_case.cpp index b53414b11..cf8bbe7c9 100644 --- a/tests/flexbuffers/test_snake_case_to_pascal_case.cpp +++ b/tests/flexbuffers/test_snake_case_to_pascal_case.cpp @@ -2,6 +2,7 @@ #include #include "write_and_read.hpp" +import rfl.flexbuf; namespace test_snake_case_to_pascal_case { diff --git a/tests/flexbuffers/test_string_map.cpp b/tests/flexbuffers/test_string_map.cpp index 384e37bf0..e3b299d48 100644 --- a/tests/flexbuffers/test_string_map.cpp +++ b/tests/flexbuffers/test_string_map.cpp @@ -1,9 +1,11 @@ #include #include -#include #include #include "write_and_read.hpp" +import rfl.flexbuf; +import rfl; + namespace test_string_map { TEST(flexbuf, test_string_map) { diff --git a/tests/flexbuffers/test_tagged_union.cpp b/tests/flexbuffers/test_tagged_union.cpp index bb7173003..fc15135f8 100644 --- a/tests/flexbuffers/test_tagged_union.cpp +++ b/tests/flexbuffers/test_tagged_union.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.flexbuf; +import rfl; + namespace test_tagged_union { diff --git a/tests/flexbuffers/test_tagged_union2.cpp b/tests/flexbuffers/test_tagged_union2.cpp index 050b4f4f6..6e91840e5 100644 --- a/tests/flexbuffers/test_tagged_union2.cpp +++ b/tests/flexbuffers/test_tagged_union2.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.flexbuf; +import rfl; + namespace test_tagged_union2 { diff --git a/tests/flexbuffers/test_timestamp.cpp b/tests/flexbuffers/test_timestamp.cpp index 1317b58b6..27c437df0 100644 --- a/tests/flexbuffers/test_timestamp.cpp +++ b/tests/flexbuffers/test_timestamp.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.flexbuf; +import rfl; + namespace test_timestamp { diff --git a/tests/flexbuffers/test_unique_ptr.cpp b/tests/flexbuffers/test_unique_ptr.cpp index 979b6cd58..e86abe185 100644 --- a/tests/flexbuffers/test_unique_ptr.cpp +++ b/tests/flexbuffers/test_unique_ptr.cpp @@ -1,9 +1,13 @@ #include -#include #include #include #include "write_and_read.hpp" +#include + +import rfl.flexbuf; +import rfl; + namespace test_unique_ptr { diff --git a/tests/flexbuffers/test_unique_ptr2.cpp b/tests/flexbuffers/test_unique_ptr2.cpp index a0a03f98c..298d5870a 100644 --- a/tests/flexbuffers/test_unique_ptr2.cpp +++ b/tests/flexbuffers/test_unique_ptr2.cpp @@ -1,7 +1,12 @@ #include -#include #include "write_and_read.hpp" +#include +#include + +import rfl.flexbuf; +import rfl; + namespace test_unique_ptr2 { diff --git a/tests/flexbuffers/test_variant.cpp b/tests/flexbuffers/test_variant.cpp index 933fcbedd..842cf2ad4 100644 --- a/tests/flexbuffers/test_variant.cpp +++ b/tests/flexbuffers/test_variant.cpp @@ -1,7 +1,12 @@ #include -#include #include "write_and_read.hpp" +#include +#include + +import rfl.flexbuf; +import rfl; + namespace test_variant { diff --git a/tests/flexbuffers/test_wstring.cpp b/tests/flexbuffers/test_wstring.cpp index b0ab7f1f4..e863cf908 100644 --- a/tests/flexbuffers/test_wstring.cpp +++ b/tests/flexbuffers/test_wstring.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.flexbuf; +import rfl; + struct TestStruct { std::string theNormalString; diff --git a/tests/flexbuffers/write_and_read.hpp b/tests/flexbuffers/write_and_read.hpp index 0eeef2d61..8d7d1e6e2 100644 --- a/tests/flexbuffers/write_and_read.hpp +++ b/tests/flexbuffers/write_and_read.hpp @@ -2,8 +2,11 @@ #define WRITE_AND_READ_ #include +#include + +import rfl.flexbuf; + -#include template void write_and_read(const auto& _struct) { diff --git a/tests/generic/CMakeLists.txt b/tests/generic/CMakeLists.txt index 59e1f17e2..1ae10defd 100644 --- a/tests/generic/CMakeLists.txt +++ b/tests/generic/CMakeLists.txt @@ -8,6 +8,11 @@ add_executable( ${SOURCES} ) +target_compile_definitions(reflect-cpp-generic-tests PRIVATE + REFLECTCPP_TEST_ENUM_RANGE_MIN=${REFLECTCPP_ENUM_RANGE_MIN} + REFLECTCPP_TEST_ENUM_RANGE_MAX=${REFLECTCPP_ENUM_RANGE_MAX} +) + target_include_directories(reflect-cpp-generic-tests SYSTEM PRIVATE "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include") target_link_libraries(reflect-cpp-generic-tests PRIVATE reflectcpp_tests_crt) @@ -38,4 +43,3 @@ add_library(generic-compile-fail-flatten-cross-type-move-assign OBJECT EXCLUDE_F compile_fail/flatten_cross_type_move_assign.cpp ) target_link_libraries(generic-compile-fail-flatten-cross-type-move-assign PRIVATE reflectcpp_tests_crt) - diff --git a/tests/generic/compile_fail/flatten_cross_type_move_assign.cpp b/tests/generic/compile_fail/flatten_cross_type_move_assign.cpp index 07288bf4c..4e6b0ecf3 100644 --- a/tests/generic/compile_fail/flatten_cross_type_move_assign.cpp +++ b/tests/generic/compile_fail/flatten_cross_type_move_assign.cpp @@ -1,3 +1,8 @@ +#include + +import rfl; + + // Flatten::operator=(Flatten&&) uses std::forward(_f) which passes // Flatten instead of U — fails to compile for cross-type assignment. // File: include/rfl/Flatten.hpp:103-105 @@ -6,7 +11,6 @@ // This file instantiates the buggy operator. It should FAIL to compile // while the bug exists, and succeed after the fix. -#include struct Base { int x = 0; diff --git a/tests/generic/test_array.cpp b/tests/generic/test_array.cpp index e1ddba698..9e7d98e96 100644 --- a/tests/generic/test_array.cpp +++ b/tests/generic/test_array.cpp @@ -1,9 +1,12 @@ #include #include -#include #include #include "write_and_read.hpp" +#include + +import rfl; + namespace test_array { diff --git a/tests/generic/test_bad_access_error.cpp b/tests/generic/test_bad_access_error.cpp index 5422512dc..357657b95 100644 --- a/tests/generic/test_bad_access_error.cpp +++ b/tests/generic/test_bad_access_error.cpp @@ -2,8 +2,12 @@ #include #endif -#include #include +#include + +import rfl; + + namespace test_exceptions { diff --git a/tests/generic/test_box.cpp b/tests/generic/test_box.cpp index e91fae931..850f27384 100644 --- a/tests/generic/test_box.cpp +++ b/tests/generic/test_box.cpp @@ -1,7 +1,10 @@ #include -#include #include "write_and_read.hpp" +#include + +import rfl; + namespace test_box { diff --git a/tests/generic/test_byte_containers.cpp b/tests/generic/test_byte_containers.cpp index e39eacf0b..7d666eb6d 100644 --- a/tests/generic/test_byte_containers.cpp +++ b/tests/generic/test_byte_containers.cpp @@ -1,10 +1,16 @@ #include #include -#include #include #include #include "write_and_read.hpp" +#include +#include +#include +#include + +import rfl; + namespace test_byte_container_concepts { diff --git a/tests/generic/test_custom_class1.cpp b/tests/generic/test_custom_class1.cpp index 3fed8cd92..15f191102 100644 --- a/tests/generic/test_custom_class1.cpp +++ b/tests/generic/test_custom_class1.cpp @@ -1,9 +1,10 @@ #include -#include #include #include #include "write_and_read.hpp" +import rfl; + namespace test_custom_class1 { diff --git a/tests/generic/test_custom_class3.cpp b/tests/generic/test_custom_class3.cpp index b89b2f2bb..2ea97b421 100644 --- a/tests/generic/test_custom_class3.cpp +++ b/tests/generic/test_custom_class3.cpp @@ -1,8 +1,9 @@ #include -#include #include #include "write_and_read.hpp" +import rfl; + namespace test_custom_class3 { diff --git a/tests/generic/test_custom_class4.cpp b/tests/generic/test_custom_class4.cpp index 093de954e..2ef62dbfb 100644 --- a/tests/generic/test_custom_class4.cpp +++ b/tests/generic/test_custom_class4.cpp @@ -1,8 +1,9 @@ #include -#include #include #include "write_and_read.hpp" +import rfl; + namespace test_custom_class4 { diff --git a/tests/generic/test_default_values.cpp b/tests/generic/test_default_values.cpp index e378102a3..b8410c633 100644 --- a/tests/generic/test_default_values.cpp +++ b/tests/generic/test_default_values.cpp @@ -1,9 +1,10 @@ #include -#include #include #include #include "write_and_read.hpp" +import rfl; + namespace test_default_values { diff --git a/tests/generic/test_deque.cpp b/tests/generic/test_deque.cpp index 568e20d7f..fa8a5ae8f 100644 --- a/tests/generic/test_deque.cpp +++ b/tests/generic/test_deque.cpp @@ -1,7 +1,12 @@ -#include #include #include "write_and_read.hpp" +#include +#include +#include + +import rfl; + namespace test_deque { diff --git a/tests/generic/test_enum.cpp b/tests/generic/test_enum.cpp index cec7f9650..e1b82f185 100644 --- a/tests/generic/test_enum.cpp +++ b/tests/generic/test_enum.cpp @@ -1,7 +1,8 @@ #include -#include #include "write_and_read.hpp" +import rfl; + namespace test_enum { diff --git a/tests/generic/test_enum_range.cpp b/tests/generic/test_enum_range.cpp index 4b54a671c..fef9671e1 100644 --- a/tests/generic/test_enum_range.cpp +++ b/tests/generic/test_enum_range.cpp @@ -1,10 +1,9 @@ #include -// Redefine the range of the enums -#define RFL_ENUM_RANGE_MIN -128 -#define RFL_ENUM_RANGE_MAX 128 -#include #include "write_and_read.hpp" +import rfl; + + namespace test_enum_range { @@ -36,4 +35,4 @@ TEST(generic, test_enum_range) { write_and_read(circle); } -} // namespace test_enum_range \ No newline at end of file +} // namespace test_enum_range diff --git a/tests/generic/test_enum_range_min_max.cpp b/tests/generic/test_enum_range_min_max.cpp index 732a71716..fa2f99653 100644 --- a/tests/generic/test_enum_range_min_max.cpp +++ b/tests/generic/test_enum_range_min_max.cpp @@ -1,8 +1,6 @@ #include -// Redefine the range of the enums -#define RFL_ENUM_RANGE_MIN -128 -#define RFL_ENUM_RANGE_MAX 128 -#include + +import rfl; namespace test_enum_range_min_max { @@ -27,8 +25,8 @@ TEST(generic, test_enum_range_min_max) { "Range should be defined."); auto [inner_min, inner_max] = rfl::get_enum_range(); - EXPECT_EQ(inner_min, RFL_ENUM_RANGE_MIN); - EXPECT_EQ(inner_max, RFL_ENUM_RANGE_MAX); + EXPECT_EQ(inner_min, REFLECTCPP_TEST_ENUM_RANGE_MIN); + EXPECT_EQ(inner_max, REFLECTCPP_TEST_ENUM_RANGE_MAX); auto [line_min, line_max] = rfl::get_enum_range(); EXPECT_EQ(line_min, 190); diff --git a/tests/generic/test_enum_range_size.cpp b/tests/generic/test_enum_range_size.cpp index 46652097f..69d55a558 100644 --- a/tests/generic/test_enum_range_size.cpp +++ b/tests/generic/test_enum_range_size.cpp @@ -1,8 +1,5 @@ #include -// Redefine the range of the enums -#define RFL_ENUM_RANGE_MIN -128 -#define RFL_ENUM_RANGE_MAX 128 -#include +import rfl; namespace test_enum_range_size { diff --git a/tests/generic/test_field.cpp b/tests/generic/test_field.cpp index 31a989973..7531da485 100644 --- a/tests/generic/test_field.cpp +++ b/tests/generic/test_field.cpp @@ -1,8 +1,11 @@ #include -#include #include "test_helpers.hpp" +#include + +import rfl; + namespace test_field_cross_move { diff --git a/tests/generic/test_field_variant.cpp b/tests/generic/test_field_variant.cpp index 452a79df9..bfcff7187 100644 --- a/tests/generic/test_field_variant.cpp +++ b/tests/generic/test_field_variant.cpp @@ -1,7 +1,8 @@ #include -#include #include "write_and_read.hpp" +import rfl; + namespace test_field_variant { diff --git a/tests/generic/test_flag_enum.cpp b/tests/generic/test_flag_enum.cpp index 5285a4bf2..a3b6a4001 100644 --- a/tests/generic/test_flag_enum.cpp +++ b/tests/generic/test_flag_enum.cpp @@ -1,7 +1,8 @@ #include -#include #include "write_and_read.hpp" +import rfl; + namespace test_flag_enum { diff --git a/tests/generic/test_flag_enum_with_int.cpp b/tests/generic/test_flag_enum_with_int.cpp index 717a7c0a9..5a8b0cefb 100644 --- a/tests/generic/test_flag_enum_with_int.cpp +++ b/tests/generic/test_flag_enum_with_int.cpp @@ -1,7 +1,8 @@ #include -#include #include "write_and_read.hpp" +import rfl; + namespace test_flag_enum_with_int { diff --git a/tests/generic/test_flatten.cpp b/tests/generic/test_flatten.cpp index 14d340e6f..52e5fe5e5 100644 --- a/tests/generic/test_flatten.cpp +++ b/tests/generic/test_flatten.cpp @@ -1,10 +1,13 @@ #include -#include #include #include "test_helpers.hpp" #include "write_and_read.hpp" +#include + +import rfl; + namespace test_flatten { diff --git a/tests/generic/test_flatten_anonymous.cpp b/tests/generic/test_flatten_anonymous.cpp index 757af931f..fd2d3f1af 100644 --- a/tests/generic/test_flatten_anonymous.cpp +++ b/tests/generic/test_flatten_anonymous.cpp @@ -1,8 +1,9 @@ #include -#include #include #include "write_and_read.hpp" +import rfl; + namespace test_flatten_anonymous { diff --git a/tests/generic/test_forward_list.cpp b/tests/generic/test_forward_list.cpp index e8096ca31..83f262d54 100644 --- a/tests/generic/test_forward_list.cpp +++ b/tests/generic/test_forward_list.cpp @@ -1,7 +1,12 @@ -#include #include #include "write_and_read.hpp" +#include +#include +#include + +import rfl; + namespace test_forward_list { diff --git a/tests/generic/test_generic.cpp b/tests/generic/test_generic.cpp index ff97bf215..b2a3d025f 100644 --- a/tests/generic/test_generic.cpp +++ b/tests/generic/test_generic.cpp @@ -2,8 +2,9 @@ #include #include +import rfl; + -#include namespace test_generic_to_int_truncation { diff --git a/tests/generic/test_literal.cpp b/tests/generic/test_literal.cpp index 9c702a41f..28383c639 100644 --- a/tests/generic/test_literal.cpp +++ b/tests/generic/test_literal.cpp @@ -1,8 +1,9 @@ #include -#include #include #include "write_and_read.hpp" +import rfl; + namespace test_literal { diff --git a/tests/generic/test_literal_map.cpp b/tests/generic/test_literal_map.cpp index 391bcde9b..87c5b9f3c 100644 --- a/tests/generic/test_literal_map.cpp +++ b/tests/generic/test_literal_map.cpp @@ -1,9 +1,10 @@ #include #include -#include #include #include "write_and_read.hpp" +import rfl; + namespace test_literal_map { diff --git a/tests/generic/test_map.cpp b/tests/generic/test_map.cpp index ed334d466..f0753f4de 100644 --- a/tests/generic/test_map.cpp +++ b/tests/generic/test_map.cpp @@ -1,8 +1,11 @@ #include -#include #include #include "write_and_read.hpp" +#include + +import rfl; + namespace test_map { diff --git a/tests/generic/test_map_with_key_validation.cpp b/tests/generic/test_map_with_key_validation.cpp index ec81884fe..2ee2b96ea 100644 --- a/tests/generic/test_map_with_key_validation.cpp +++ b/tests/generic/test_map_with_key_validation.cpp @@ -1,8 +1,12 @@ #include -#include #include #include "write_and_read.hpp" +#include +#include + +import rfl; + namespace test_map_with_key_validation { diff --git a/tests/generic/test_monster_example.cpp b/tests/generic/test_monster_example.cpp index afcfd9acd..406c7206d 100644 --- a/tests/generic/test_monster_example.cpp +++ b/tests/generic/test_monster_example.cpp @@ -1,8 +1,9 @@ -#include #include #include #include "write_and_read.hpp" +import rfl; + namespace test_monster_example { diff --git a/tests/generic/test_object.cpp b/tests/generic/test_object.cpp index 3ce084e63..83eb7118f 100644 --- a/tests/generic/test_object.cpp +++ b/tests/generic/test_object.cpp @@ -1,8 +1,9 @@ #include #include +import rfl; + -#include namespace test_object_difference_type_signed { diff --git a/tests/generic/test_optional.cpp b/tests/generic/test_optional.cpp index 838adbd9d..51fc88c53 100644 --- a/tests/generic/test_optional.cpp +++ b/tests/generic/test_optional.cpp @@ -1,6 +1,9 @@ -#include #include #include +#include + +import rfl; + namespace test_optional { diff --git a/tests/generic/test_readme_example.cpp b/tests/generic/test_readme_example.cpp index 0a9ffafd1..0441060d5 100644 --- a/tests/generic/test_readme_example.cpp +++ b/tests/generic/test_readme_example.cpp @@ -1,8 +1,9 @@ -#include #include #include #include "write_and_read.hpp" +import rfl; + namespace test_readme_example { diff --git a/tests/generic/test_readme_example2.cpp b/tests/generic/test_readme_example2.cpp index 4808ad17c..cda2ad908 100644 --- a/tests/generic/test_readme_example2.cpp +++ b/tests/generic/test_readme_example2.cpp @@ -1,7 +1,8 @@ -#include #include #include "write_and_read.hpp" +import rfl; + namespace test_readme_example2 { diff --git a/tests/generic/test_ref.cpp b/tests/generic/test_ref.cpp index 8acf24411..7f5889e1f 100644 --- a/tests/generic/test_ref.cpp +++ b/tests/generic/test_ref.cpp @@ -1,7 +1,10 @@ #include -#include #include "write_and_read.hpp" +#include + +import rfl; + namespace test_ref { diff --git a/tests/generic/test_result.cpp b/tests/generic/test_result.cpp index f05a9d3e4..dbe814443 100644 --- a/tests/generic/test_result.cpp +++ b/tests/generic/test_result.cpp @@ -2,8 +2,9 @@ #include #include +import rfl; + -#include namespace test_result_cross_assign { diff --git a/tests/generic/test_set.cpp b/tests/generic/test_set.cpp index 985d7fc57..3a048fa2f 100644 --- a/tests/generic/test_set.cpp +++ b/tests/generic/test_set.cpp @@ -1,7 +1,12 @@ -#include #include #include "write_and_read.hpp" +#include +#include +#include + +import rfl; + namespace test_set { diff --git a/tests/generic/test_size.cpp b/tests/generic/test_size.cpp index daf75dbbc..479dd9977 100644 --- a/tests/generic/test_size.cpp +++ b/tests/generic/test_size.cpp @@ -1,8 +1,9 @@ -#include #include #include #include "write_and_read.hpp" +import rfl; + namespace test_size { diff --git a/tests/generic/test_skip.cpp b/tests/generic/test_skip.cpp index 9c9fcec57..96c53d960 100644 --- a/tests/generic/test_skip.cpp +++ b/tests/generic/test_skip.cpp @@ -1,8 +1,11 @@ #include -#include #include "test_helpers.hpp" +#include + +import rfl; + namespace test_skip_cross_move { diff --git a/tests/generic/test_string_map.cpp b/tests/generic/test_string_map.cpp index 688453c5b..be5f1b2a0 100644 --- a/tests/generic/test_string_map.cpp +++ b/tests/generic/test_string_map.cpp @@ -1,9 +1,10 @@ #include #include -#include #include #include "write_and_read.hpp" +import rfl; + namespace test_string_map { TEST(generic, test_string_map) { diff --git a/tests/generic/test_tagged_union.cpp b/tests/generic/test_tagged_union.cpp index 50ae24425..cb19c16b0 100644 --- a/tests/generic/test_tagged_union.cpp +++ b/tests/generic/test_tagged_union.cpp @@ -1,8 +1,11 @@ #include #include -#include #include "write_and_read.hpp" +#include + +import rfl; + namespace test_tagged_union { diff --git a/tests/generic/test_timestamp.cpp b/tests/generic/test_timestamp.cpp index d658b30b2..31e9726fb 100644 --- a/tests/generic/test_timestamp.cpp +++ b/tests/generic/test_timestamp.cpp @@ -1,8 +1,9 @@ #include -#include #include #include "write_and_read.hpp" +import rfl; + namespace test_timestamp { diff --git a/tests/generic/test_tuple.cpp b/tests/generic/test_tuple.cpp index 0c521bf74..237233b3a 100644 --- a/tests/generic/test_tuple.cpp +++ b/tests/generic/test_tuple.cpp @@ -3,8 +3,9 @@ #include #include #include +import rfl; + -#include namespace test_tuple_spaceship { @@ -108,4 +109,4 @@ TEST(Tuple, equality_multi) { EXPECT_FALSE(a == c); } -} // namespace test_tuple_spaceship \ No newline at end of file +} // namespace test_tuple_spaceship diff --git a/tests/generic/test_unique_ptr.cpp b/tests/generic/test_unique_ptr.cpp index 2b32e7a19..942ab0e21 100644 --- a/tests/generic/test_unique_ptr.cpp +++ b/tests/generic/test_unique_ptr.cpp @@ -1,9 +1,12 @@ #include -#include #include #include #include "write_and_read.hpp" +#include + +import rfl; + namespace test_unique_ptr { diff --git a/tests/generic/test_unique_ptr2.cpp b/tests/generic/test_unique_ptr2.cpp index ee51e202e..f648df465 100644 --- a/tests/generic/test_unique_ptr2.cpp +++ b/tests/generic/test_unique_ptr2.cpp @@ -1,7 +1,11 @@ #include -#include #include "write_and_read.hpp" +#include +#include + +import rfl; + namespace test_unique_ptr2 { diff --git a/tests/generic/test_variant.cpp b/tests/generic/test_variant.cpp index 5bbf6abf6..db6f8f22c 100644 --- a/tests/generic/test_variant.cpp +++ b/tests/generic/test_variant.cpp @@ -1,7 +1,11 @@ #include -#include #include "write_and_read.hpp" +#include +#include + +import rfl; + namespace test_variant { diff --git a/tests/generic/test_wstring.cpp b/tests/generic/test_wstring.cpp index 275c3d5a7..6f5d73836 100644 --- a/tests/generic/test_wstring.cpp +++ b/tests/generic/test_wstring.cpp @@ -1,8 +1,9 @@ #include -#include #include #include "write_and_read.hpp" +import rfl; + struct TestStruct { std::string theNormalString; diff --git a/tests/generic/write_and_read.hpp b/tests/generic/write_and_read.hpp index abf3aabd3..dd91eaf47 100644 --- a/tests/generic/write_and_read.hpp +++ b/tests/generic/write_and_read.hpp @@ -2,8 +2,11 @@ #define WRITE_AND_READ_ #include +#include + +import rfl.json; + -#include template void write_and_read(const auto& _struct) { diff --git a/tests/json/CMakeLists.txt b/tests/json/CMakeLists.txt index 1d11e263b..584ee9c2a 100644 --- a/tests/json/CMakeLists.txt +++ b/tests/json/CMakeLists.txt @@ -6,7 +6,7 @@ add_executable( reflect-cpp-json-tests ${SOURCES} ) -target_precompile_headers(reflect-cpp-json-tests PRIVATE [["rfl.hpp"]] ) +target_precompile_headers(reflect-cpp-json-tests PRIVATE ) target_include_directories(reflect-cpp-json-tests SYSTEM PRIVATE "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include") diff --git a/tests/json/test_add_namespaced_tags_to_rfl_variants.cpp b/tests/json/test_add_namespaced_tags_to_rfl_variants.cpp index ad6dc2c9f..e9c35416c 100644 --- a/tests/json/test_add_namespaced_tags_to_rfl_variants.cpp +++ b/tests/json/test_add_namespaced_tags_to_rfl_variants.cpp @@ -1,10 +1,13 @@ #include -#include -#include #include #include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.json; + // NOTE TO MAINTAINERS: // These tests are very similar to the others in test_add_*tags_to_*variants.cpp, so please keep them diff --git a/tests/json/test_add_namespaced_tags_to_variants.cpp b/tests/json/test_add_namespaced_tags_to_variants.cpp index 338d07122..c164b34e0 100644 --- a/tests/json/test_add_namespaced_tags_to_variants.cpp +++ b/tests/json/test_add_namespaced_tags_to_variants.cpp @@ -1,11 +1,12 @@ #include -#include -#include #include #include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + // NOTE TO MAINTAINERS: // These tests are very similar to the others in test_add_*tags_to_*variants.cpp, so please keep them diff --git a/tests/json/test_add_struct_name.cpp b/tests/json/test_add_struct_name.cpp index d05b86f02..0f314e63f 100644 --- a/tests/json/test_add_struct_name.cpp +++ b/tests/json/test_add_struct_name.cpp @@ -1,9 +1,10 @@ -#include -#include #include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_add_struct_name { diff --git a/tests/json/test_add_tags_to_rfl_variants.cpp b/tests/json/test_add_tags_to_rfl_variants.cpp index 5afbc4c10..1ee67a34b 100644 --- a/tests/json/test_add_tags_to_rfl_variants.cpp +++ b/tests/json/test_add_tags_to_rfl_variants.cpp @@ -1,10 +1,11 @@ #include -#include -#include #include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + // NOTE TO MAINTAINERS: // These tests are very similar to the others in test_add_*tags_to_*variants.cpp, so please keep them diff --git a/tests/json/test_add_tags_to_variants.cpp b/tests/json/test_add_tags_to_variants.cpp index af7595bc4..59e3e6540 100644 --- a/tests/json/test_add_tags_to_variants.cpp +++ b/tests/json/test_add_tags_to_variants.cpp @@ -1,11 +1,12 @@ #include -#include -#include #include #include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + // NOTE TO MAINTAINERS: // These tests are very similar to the others in test_add_*tags_to_*variants.cpp, so please keep them diff --git a/tests/json/test_all_of.cpp b/tests/json/test_all_of.cpp index 512ec446c..ec9e00f7d 100644 --- a/tests/json/test_all_of.cpp +++ b/tests/json/test_all_of.cpp @@ -1,11 +1,12 @@ -#include #include // Make sure things still compile when // rfl.hpp is included after rfl/json.hpp. -#include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_all_of { diff --git a/tests/json/test_alphanumeric_map.cpp b/tests/json/test_alphanumeric_map.cpp index d7b1d5d7e..c32f0c5a3 100644 --- a/tests/json/test_alphanumeric_map.cpp +++ b/tests/json/test_alphanumeric_map.cpp @@ -1,10 +1,11 @@ #include #include -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_alphanumeric_map { diff --git a/tests/json/test_alphanumeric_unordered_map.cpp b/tests/json/test_alphanumeric_unordered_map.cpp index 32516aa52..c02707254 100644 --- a/tests/json/test_alphanumeric_unordered_map.cpp +++ b/tests/json/test_alphanumeric_unordered_map.cpp @@ -1,10 +1,11 @@ #include -#include -#include #include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_alphanumeric_unordered_map { TEST(json, test_alphanumeric_unordered_map) { diff --git a/tests/json/test_and_then.cpp b/tests/json/test_and_then.cpp index 46f48194f..e1d9ae546 100644 --- a/tests/json/test_and_then.cpp +++ b/tests/json/test_and_then.cpp @@ -1,8 +1,9 @@ -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_and_then { diff --git a/tests/json/test_anonymous_fields.cpp b/tests/json/test_anonymous_fields.cpp index ca8c5133b..59c493f9b 100644 --- a/tests/json/test_anonymous_fields.cpp +++ b/tests/json/test_anonymous_fields.cpp @@ -1,9 +1,10 @@ -#include -#include #include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_anonymous_fields { diff --git a/tests/json/test_any_of.cpp b/tests/json/test_any_of.cpp index 4e3d9963b..4e3a83cfc 100644 --- a/tests/json/test_any_of.cpp +++ b/tests/json/test_any_of.cpp @@ -1,8 +1,9 @@ -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_any_of { diff --git a/tests/json/test_apply.cpp b/tests/json/test_apply.cpp index 6777aa2d0..2faaea605 100644 --- a/tests/json/test_apply.cpp +++ b/tests/json/test_apply.cpp @@ -1,10 +1,11 @@ #include -#include -#include #include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_apply { @@ -20,7 +21,7 @@ TEST(json, test_apply) { const auto view = rfl::to_view(lisa); *view.get<0>() = "Maggie"; - *std::get<1>(view.values()) = "Simpson"; + *rfl::get<1>(view.values()) = "Simpson"; *view.get<"age">() = 0; view.apply([](const Field& field) { diff --git a/tests/json/test_apply_on_named_tuple.cpp b/tests/json/test_apply_on_named_tuple.cpp index d9e02f1b5..3dd3425de 100644 --- a/tests/json/test_apply_on_named_tuple.cpp +++ b/tests/json/test_apply_on_named_tuple.cpp @@ -1,10 +1,11 @@ #include #include -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_apply_on_named_tuple { diff --git a/tests/json/test_array.cpp b/tests/json/test_array.cpp index 688382385..f5c627e4f 100644 --- a/tests/json/test_array.cpp +++ b/tests/json/test_array.cpp @@ -1,11 +1,14 @@ #include #include -#include -#include #include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.json; + namespace test_array { diff --git a/tests/json/test_array2.cpp b/tests/json/test_array2.cpp index 4913fb963..59feec502 100644 --- a/tests/json/test_array2.cpp +++ b/tests/json/test_array2.cpp @@ -1,9 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl; + namespace test_array2 { diff --git a/tests/json/test_as.cpp b/tests/json/test_as.cpp index c404ed1ab..f08d5662e 100644 --- a/tests/json/test_as.cpp +++ b/tests/json/test_as.cpp @@ -1,9 +1,12 @@ #include -#include -#include #include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.json; + namespace test_as { diff --git a/tests/json/test_as2.cpp b/tests/json/test_as2.cpp index a5f4ad19b..e86da4ccc 100644 --- a/tests/json/test_as2.cpp +++ b/tests/json/test_as2.cpp @@ -1,9 +1,12 @@ #include -#include -#include #include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.json; + namespace test_as2 { diff --git a/tests/json/test_as_flatten.cpp b/tests/json/test_as_flatten.cpp index 13b3050f2..54b4ba0b0 100644 --- a/tests/json/test_as_flatten.cpp +++ b/tests/json/test_as_flatten.cpp @@ -1,9 +1,12 @@ #include -#include -#include #include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.json; + namespace test_as_flatten { diff --git a/tests/json/test_atomic.cpp b/tests/json/test_atomic.cpp index 0ff15d825..5e28e26b8 100644 --- a/tests/json/test_atomic.cpp +++ b/tests/json/test_atomic.cpp @@ -1,10 +1,14 @@ #include #include -#include -#include #include #include "write_and_read.hpp" +#include +#include + +import rfl; +import rfl.json; + namespace test_atomic { diff --git a/tests/json/test_atomic_array.cpp b/tests/json/test_atomic_array.cpp index eb9678f21..677d72a2f 100644 --- a/tests/json/test_atomic_array.cpp +++ b/tests/json/test_atomic_array.cpp @@ -1,9 +1,13 @@ #include -#include -#include #include #include "write_and_read.hpp" +#include +#include + +import rfl; +import rfl.json; + namespace test_atomic_array { diff --git a/tests/json/test_atomic_box.cpp b/tests/json/test_atomic_box.cpp index 41dbb6046..ea8c7b6c9 100644 --- a/tests/json/test_atomic_box.cpp +++ b/tests/json/test_atomic_box.cpp @@ -1,9 +1,12 @@ #include -#include -#include #include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.json; + namespace test_atomic_box { diff --git a/tests/json/test_atomic_negative.cpp b/tests/json/test_atomic_negative.cpp index cb0e3ec3a..d0996ed67 100644 --- a/tests/json/test_atomic_negative.cpp +++ b/tests/json/test_atomic_negative.cpp @@ -2,8 +2,9 @@ #include #include -#include -#include +import rfl; +import rfl.json; + namespace test_atomic_negative { diff --git a/tests/json/test_atomic_ref.cpp b/tests/json/test_atomic_ref.cpp index f07fb6d02..d83312636 100644 --- a/tests/json/test_atomic_ref.cpp +++ b/tests/json/test_atomic_ref.cpp @@ -1,9 +1,12 @@ #include -#include -#include #include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.json; + namespace test_atomic_ref { diff --git a/tests/json/test_atomic_shared_ptr.cpp b/tests/json/test_atomic_shared_ptr.cpp index f2ac2a687..ce29ef228 100644 --- a/tests/json/test_atomic_shared_ptr.cpp +++ b/tests/json/test_atomic_shared_ptr.cpp @@ -1,9 +1,13 @@ #include -#include -#include #include #include "write_and_read.hpp" +#include +#include + +import rfl; +import rfl.json; + namespace test_atomic_shared_ptr { diff --git a/tests/json/test_atomic_unique_ptr.cpp b/tests/json/test_atomic_unique_ptr.cpp index 1560625c2..50b77a974 100644 --- a/tests/json/test_atomic_unique_ptr.cpp +++ b/tests/json/test_atomic_unique_ptr.cpp @@ -1,9 +1,13 @@ #include -#include -#include #include #include "write_and_read.hpp" +#include +#include + +import rfl; +import rfl.json; + namespace test_atomic_unique_ptr { diff --git a/tests/json/test_binary.cpp b/tests/json/test_binary.cpp index c6dc4a3e7..b7ec7f888 100644 --- a/tests/json/test_binary.cpp +++ b/tests/json/test_binary.cpp @@ -1,8 +1,9 @@ -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_binary { diff --git a/tests/json/test_box.cpp b/tests/json/test_box.cpp index dd9bd6d53..d9199c2e8 100644 --- a/tests/json/test_box.cpp +++ b/tests/json/test_box.cpp @@ -1,9 +1,12 @@ #include -#include -#include #include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.json; + namespace test_box { diff --git a/tests/json/test_box2.cpp b/tests/json/test_box2.cpp index b0f25a731..9fd793b6b 100644 --- a/tests/json/test_box2.cpp +++ b/tests/json/test_box2.cpp @@ -1,9 +1,13 @@ #include #include -#include -#include #include +#include +#include + +import rfl; +import rfl.json; + namespace test_box2 { diff --git a/tests/json/test_camel_case_to_snake_case_rename.cpp b/tests/json/test_camel_case_to_snake_case_rename.cpp index b9ff0f246..f8198d31d 100644 --- a/tests/json/test_camel_case_to_snake_case_rename.cpp +++ b/tests/json/test_camel_case_to_snake_case_rename.cpp @@ -1,8 +1,9 @@ -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_camel_case_to_snake_case_rename { diff --git a/tests/json/test_chrono_duration.cpp b/tests/json/test_chrono_duration.cpp index c78a11c7f..0dc757f62 100644 --- a/tests/json/test_chrono_duration.cpp +++ b/tests/json/test_chrono_duration.cpp @@ -1,10 +1,11 @@ #include #include -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_chrono_duration { diff --git a/tests/json/test_combined_processors.cpp b/tests/json/test_combined_processors.cpp index ef69df412..9e1dd28f0 100644 --- a/tests/json/test_combined_processors.cpp +++ b/tests/json/test_combined_processors.cpp @@ -1,9 +1,10 @@ -#include -#include #include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_combined_processors { diff --git a/tests/json/test_const_fields.cpp b/tests/json/test_const_fields.cpp index d98980694..e1b9e5bd0 100644 --- a/tests/json/test_const_fields.cpp +++ b/tests/json/test_const_fields.cpp @@ -1,10 +1,11 @@ #include -#include -#include #include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_const_fields { diff --git a/tests/json/test_custom_class1.cpp b/tests/json/test_custom_class1.cpp index 6df483164..8b6dcc8a8 100644 --- a/tests/json/test_custom_class1.cpp +++ b/tests/json/test_custom_class1.cpp @@ -1,10 +1,11 @@ #include -#include -#include #include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_custom_class1 { diff --git a/tests/json/test_custom_class2.cpp b/tests/json/test_custom_class2.cpp index ee7a07459..d1e6b012f 100644 --- a/tests/json/test_custom_class2.cpp +++ b/tests/json/test_custom_class2.cpp @@ -1,10 +1,11 @@ #include -#include -#include #include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_custom_class2 { diff --git a/tests/json/test_custom_class3.cpp b/tests/json/test_custom_class3.cpp index 141997276..a4a8fa318 100644 --- a/tests/json/test_custom_class3.cpp +++ b/tests/json/test_custom_class3.cpp @@ -1,9 +1,10 @@ #include -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_custom_class3 { diff --git a/tests/json/test_custom_class4.cpp b/tests/json/test_custom_class4.cpp index 18d8244cb..7fe7dcbd3 100644 --- a/tests/json/test_custom_class4.cpp +++ b/tests/json/test_custom_class4.cpp @@ -1,9 +1,10 @@ #include -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_custom_class4 { diff --git a/tests/json/test_custom_constructor.cpp b/tests/json/test_custom_constructor.cpp index 490f40d9f..467a69dd1 100644 --- a/tests/json/test_custom_constructor.cpp +++ b/tests/json/test_custom_constructor.cpp @@ -1,8 +1,11 @@ -#include -#include #include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.json; + namespace test_custom_constructor { diff --git a/tests/json/test_custom_enum1.cpp b/tests/json/test_custom_enum1.cpp index 7c4509d50..d3f69fe65 100644 --- a/tests/json/test_custom_enum1.cpp +++ b/tests/json/test_custom_enum1.cpp @@ -1,8 +1,9 @@ -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_custom_enum1 { diff --git a/tests/json/test_deep_nested.cpp b/tests/json/test_deep_nested.cpp index b455e9cd6..cb3b3c84d 100644 --- a/tests/json/test_deep_nested.cpp +++ b/tests/json/test_deep_nested.cpp @@ -1,8 +1,9 @@ -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_deep_nested { diff --git a/tests/json/test_default_if_missing.cpp b/tests/json/test_default_if_missing.cpp index 238cb2fe8..9287dac01 100644 --- a/tests/json/test_default_if_missing.cpp +++ b/tests/json/test_default_if_missing.cpp @@ -1,8 +1,9 @@ -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_default_if_missing { diff --git a/tests/json/test_default_if_missing_no_field_names.cpp b/tests/json/test_default_if_missing_no_field_names.cpp index 11db4f559..9bb274930 100644 --- a/tests/json/test_default_if_missing_no_field_names.cpp +++ b/tests/json/test_default_if_missing_no_field_names.cpp @@ -1,8 +1,9 @@ -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_default_if_missing_no_field_names { diff --git a/tests/json/test_default_val.cpp b/tests/json/test_default_val.cpp index 9ef09671a..e2c893521 100644 --- a/tests/json/test_default_val.cpp +++ b/tests/json/test_default_val.cpp @@ -1,8 +1,9 @@ -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_default_val { diff --git a/tests/json/test_default_val_no_field_names.cpp b/tests/json/test_default_val_no_field_names.cpp index 1aac232bc..6997611d7 100644 --- a/tests/json/test_default_val_no_field_names.cpp +++ b/tests/json/test_default_val_no_field_names.cpp @@ -1,8 +1,9 @@ -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_default_val_no_field_names { diff --git a/tests/json/test_default_values.cpp b/tests/json/test_default_values.cpp index 0b0fcc3f9..126b9846f 100644 --- a/tests/json/test_default_values.cpp +++ b/tests/json/test_default_values.cpp @@ -1,10 +1,11 @@ #include -#include -#include #include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_default_values { diff --git a/tests/json/test_deque.cpp b/tests/json/test_deque.cpp index 39e012cef..1bff0c16e 100644 --- a/tests/json/test_deque.cpp +++ b/tests/json/test_deque.cpp @@ -1,8 +1,13 @@ -#include -#include #include #include "write_and_read.hpp" +#include +#include +#include + +import rfl; +import rfl.json; + namespace test_deque { diff --git a/tests/json/test_duration.cpp b/tests/json/test_duration.cpp index 2f5ead2c5..3266aa94e 100644 --- a/tests/json/test_duration.cpp +++ b/tests/json/test_duration.cpp @@ -1,8 +1,9 @@ #include -#include -#include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_duration { diff --git a/tests/json/test_duration_conversion.cpp b/tests/json/test_duration_conversion.cpp index ba110df8c..9bdcc5b4c 100644 --- a/tests/json/test_duration_conversion.cpp +++ b/tests/json/test_duration_conversion.cpp @@ -1,8 +1,9 @@ #include -#include -#include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_duration_conversion { diff --git a/tests/json/test_duration_default.cpp b/tests/json/test_duration_default.cpp index a7fe15ea2..2c12635fa 100644 --- a/tests/json/test_duration_default.cpp +++ b/tests/json/test_duration_default.cpp @@ -1,9 +1,9 @@ #include -#include -#include -#include "rfl/DefaultIfMissing.hpp" #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_duration_default { diff --git a/tests/json/test_email.cpp b/tests/json/test_email.cpp index 590970cd0..e52edf25b 100644 --- a/tests/json/test_email.cpp +++ b/tests/json/test_email.cpp @@ -1,8 +1,9 @@ -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_email { diff --git a/tests/json/test_empty_object.cpp b/tests/json/test_empty_object.cpp index 6c722bb71..e10629adb 100644 --- a/tests/json/test_empty_object.cpp +++ b/tests/json/test_empty_object.cpp @@ -1,8 +1,9 @@ -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_empty_object { diff --git a/tests/json/test_enum1.cpp b/tests/json/test_enum1.cpp index 346624bb8..1457372e5 100644 --- a/tests/json/test_enum1.cpp +++ b/tests/json/test_enum1.cpp @@ -1,9 +1,10 @@ #include -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_enum1 { diff --git a/tests/json/test_enum2.cpp b/tests/json/test_enum2.cpp index ec0e2595c..7fbae425c 100644 --- a/tests/json/test_enum2.cpp +++ b/tests/json/test_enum2.cpp @@ -1,9 +1,10 @@ #include -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_enum2 { diff --git a/tests/json/test_enum3.cpp b/tests/json/test_enum3.cpp index fbf01f064..2412a99db 100644 --- a/tests/json/test_enum3.cpp +++ b/tests/json/test_enum3.cpp @@ -1,9 +1,10 @@ #include -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_enum3 { diff --git a/tests/json/test_enum4.cpp b/tests/json/test_enum4.cpp index 455e96972..2bfdde670 100644 --- a/tests/json/test_enum4.cpp +++ b/tests/json/test_enum4.cpp @@ -1,9 +1,10 @@ #include -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_enum4 { diff --git a/tests/json/test_enum5.cpp b/tests/json/test_enum5.cpp index a704d7646..56c2202f5 100644 --- a/tests/json/test_enum5.cpp +++ b/tests/json/test_enum5.cpp @@ -1,9 +1,10 @@ #include -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_enum5 { diff --git a/tests/json/test_enum6.cpp b/tests/json/test_enum6.cpp index 173b8d312..01fe4efa6 100644 --- a/tests/json/test_enum6.cpp +++ b/tests/json/test_enum6.cpp @@ -1,9 +1,10 @@ #include -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_enum6 { diff --git a/tests/json/test_enum7.cpp b/tests/json/test_enum7.cpp index 1a9776fee..29cd8cdeb 100644 --- a/tests/json/test_enum7.cpp +++ b/tests/json/test_enum7.cpp @@ -1,8 +1,9 @@ #include -#include -#include #include +import rfl; +import rfl.json; + namespace test_enum7 { diff --git a/tests/json/test_enum8.cpp b/tests/json/test_enum8.cpp index b64a4eb6f..f1f173889 100644 --- a/tests/json/test_enum8.cpp +++ b/tests/json/test_enum8.cpp @@ -1,10 +1,11 @@ #include #include -#include -#include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_enum8 { diff --git a/tests/json/test_enum_descriptions.cpp b/tests/json/test_enum_descriptions.cpp index ac2a4d7c3..ac32699cd 100644 --- a/tests/json/test_enum_descriptions.cpp +++ b/tests/json/test_enum_descriptions.cpp @@ -1,7 +1,10 @@ #include -#include -#include #include +#include + +import rfl; +import rfl.json; + namespace test_enum_descriptions { diff --git a/tests/json/test_enum_error_messages.cpp b/tests/json/test_enum_error_messages.cpp index 7514bbe35..52efac8e5 100644 --- a/tests/json/test_enum_error_messages.cpp +++ b/tests/json/test_enum_error_messages.cpp @@ -1,8 +1,11 @@ #include -#include -#include #include +#include + +import rfl; +import rfl.json; + namespace test_enum_error_messages { diff --git a/tests/json/test_enum_underlying.cpp b/tests/json/test_enum_underlying.cpp index 82605636b..4f0e5293c 100644 --- a/tests/json/test_enum_underlying.cpp +++ b/tests/json/test_enum_underlying.cpp @@ -1,6 +1,7 @@ #include +import rfl.json; + -#include namespace test_enum_underlying { diff --git a/tests/json/test_error_messages.cpp b/tests/json/test_error_messages.cpp index cbe056a4f..0a7bb8833 100644 --- a/tests/json/test_error_messages.cpp +++ b/tests/json/test_error_messages.cpp @@ -1,9 +1,10 @@ #include -#include -#include #include #include +import rfl; +import rfl.json; + namespace test_error_messages { diff --git a/tests/json/test_extra_fields.cpp b/tests/json/test_extra_fields.cpp index f5d152e82..ac46e036c 100644 --- a/tests/json/test_extra_fields.cpp +++ b/tests/json/test_extra_fields.cpp @@ -1,8 +1,9 @@ -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_extra_fields { diff --git a/tests/json/test_extra_fields_with_no_extra_fields.cpp b/tests/json/test_extra_fields_with_no_extra_fields.cpp index 9a8e64cac..6966781c8 100644 --- a/tests/json/test_extra_fields_with_no_extra_fields.cpp +++ b/tests/json/test_extra_fields_with_no_extra_fields.cpp @@ -1,8 +1,9 @@ -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_extra_fields_with_no_extra_fields { diff --git a/tests/json/test_field_variant.cpp b/tests/json/test_field_variant.cpp index f89363e27..5528fb0d5 100644 --- a/tests/json/test_field_variant.cpp +++ b/tests/json/test_field_variant.cpp @@ -1,9 +1,10 @@ #include -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_field_variant { diff --git a/tests/json/test_field_variant_std.cpp b/tests/json/test_field_variant_std.cpp index 0ea90f011..a182e79fe 100644 --- a/tests/json/test_field_variant_std.cpp +++ b/tests/json/test_field_variant_std.cpp @@ -1,9 +1,12 @@ #include -#include -#include #include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.json; + namespace test_field_variant_std { diff --git a/tests/json/test_filepath.cpp b/tests/json/test_filepath.cpp index f264bcf22..7cfe4e5af 100644 --- a/tests/json/test_filepath.cpp +++ b/tests/json/test_filepath.cpp @@ -1,9 +1,10 @@ #include -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_filepath { diff --git a/tests/json/test_flag_enum1.cpp b/tests/json/test_flag_enum1.cpp index c141066f9..505e482b5 100644 --- a/tests/json/test_flag_enum1.cpp +++ b/tests/json/test_flag_enum1.cpp @@ -1,9 +1,10 @@ #include -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_flag_enum1 { diff --git a/tests/json/test_flag_enum2.cpp b/tests/json/test_flag_enum2.cpp index ef2f71f1f..d89a75d15 100644 --- a/tests/json/test_flag_enum2.cpp +++ b/tests/json/test_flag_enum2.cpp @@ -1,9 +1,10 @@ #include -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_flag_enum2 { diff --git a/tests/json/test_flag_enum_with_int.cpp b/tests/json/test_flag_enum_with_int.cpp index 5fa44e2da..bf7271b73 100644 --- a/tests/json/test_flag_enum_with_int.cpp +++ b/tests/json/test_flag_enum_with_int.cpp @@ -1,9 +1,10 @@ #include -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_flag_enum_with_int { diff --git a/tests/json/test_flatten.cpp b/tests/json/test_flatten.cpp index f8a5425d9..5eeeb6cbb 100644 --- a/tests/json/test_flatten.cpp +++ b/tests/json/test_flatten.cpp @@ -1,9 +1,10 @@ #include -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_flatten { diff --git a/tests/json/test_flatten_anonymous.cpp b/tests/json/test_flatten_anonymous.cpp index e0d900b9c..2428d6b26 100644 --- a/tests/json/test_flatten_anonymous.cpp +++ b/tests/json/test_flatten_anonymous.cpp @@ -1,9 +1,10 @@ #include -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_flatten_anonymous { diff --git a/tests/json/test_forward_list.cpp b/tests/json/test_forward_list.cpp index 7477d58a4..114ef5bfd 100644 --- a/tests/json/test_forward_list.cpp +++ b/tests/json/test_forward_list.cpp @@ -1,8 +1,13 @@ -#include -#include #include #include "write_and_read.hpp" +#include +#include +#include + +import rfl; +import rfl.json; + namespace test_forward_list { diff --git a/tests/json/test_generic.cpp b/tests/json/test_generic.cpp index 1fda1954a..7afcc7787 100644 --- a/tests/json/test_generic.cpp +++ b/tests/json/test_generic.cpp @@ -1,8 +1,9 @@ -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_generic { diff --git a/tests/json/test_generic2.cpp b/tests/json/test_generic2.cpp index 6830006d6..9da4e683a 100644 --- a/tests/json/test_generic2.cpp +++ b/tests/json/test_generic2.cpp @@ -1,8 +1,9 @@ -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_generic2 { diff --git a/tests/json/test_hex.cpp b/tests/json/test_hex.cpp index 4bd52689a..576d45a9e 100644 --- a/tests/json/test_hex.cpp +++ b/tests/json/test_hex.cpp @@ -1,8 +1,9 @@ -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_hex { diff --git a/tests/json/test_inside_function.cpp b/tests/json/test_inside_function.cpp index d27a7510d..a75e31841 100644 --- a/tests/json/test_inside_function.cpp +++ b/tests/json/test_inside_function.cpp @@ -1,9 +1,10 @@ -#include -#include #include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_inside_function { diff --git a/tests/json/test_integers.cpp b/tests/json/test_integers.cpp index f0ebc4dd1..d151e4286 100644 --- a/tests/json/test_integers.cpp +++ b/tests/json/test_integers.cpp @@ -1,8 +1,9 @@ #include -#include -#include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_integers { diff --git a/tests/json/test_json_schema.cpp b/tests/json/test_json_schema.cpp index 80a029fe5..e9a966b6b 100644 --- a/tests/json/test_json_schema.cpp +++ b/tests/json/test_json_schema.cpp @@ -1,11 +1,12 @@ -#include -#include #include #include #include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_json_schema { diff --git a/tests/json/test_json_schema2.cpp b/tests/json/test_json_schema2.cpp index 183379d2b..416df088b 100644 --- a/tests/json/test_json_schema2.cpp +++ b/tests/json/test_json_schema2.cpp @@ -1,11 +1,12 @@ -#include -#include #include #include #include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_json_schema2 { diff --git a/tests/json/test_json_schema3.cpp b/tests/json/test_json_schema3.cpp index 8ddc7959f..34268a81f 100644 --- a/tests/json/test_json_schema3.cpp +++ b/tests/json/test_json_schema3.cpp @@ -1,11 +1,12 @@ -#include -#include #include #include #include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_json_schema3 { diff --git a/tests/json/test_json_schema4.cpp b/tests/json/test_json_schema4.cpp index 6ff498eca..1b4107bd5 100644 --- a/tests/json/test_json_schema4.cpp +++ b/tests/json/test_json_schema4.cpp @@ -1,11 +1,12 @@ -#include -#include #include #include #include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_json_schema4 { diff --git a/tests/json/test_json_schema5.cpp b/tests/json/test_json_schema5.cpp index 28e432ff7..3f753e7e4 100644 --- a/tests/json/test_json_schema5.cpp +++ b/tests/json/test_json_schema5.cpp @@ -1,7 +1,8 @@ #include -#include -#include #include +import rfl; +import rfl.json; + namespace test_json_schema5 { diff --git a/tests/json/test_json_schema6.cpp b/tests/json/test_json_schema6.cpp index df516f0c6..2bfe0c638 100644 --- a/tests/json/test_json_schema6.cpp +++ b/tests/json/test_json_schema6.cpp @@ -1,8 +1,9 @@ -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_json_schema6 { diff --git a/tests/json/test_json_schema7.cpp b/tests/json/test_json_schema7.cpp index f75443eae..565b52e70 100644 --- a/tests/json/test_json_schema7.cpp +++ b/tests/json/test_json_schema7.cpp @@ -1,5 +1,6 @@ -#include -#include +import rfl; +import rfl.json; + namespace test_json_schema7 { diff --git a/tests/json/test_json_schema_deprecation.cpp b/tests/json/test_json_schema_deprecation.cpp index cd232c2f8..2c3faed6a 100644 --- a/tests/json/test_json_schema_deprecation.cpp +++ b/tests/json/test_json_schema_deprecation.cpp @@ -1,10 +1,11 @@ #include -#include -#include #include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_deprecated_schema { diff --git a/tests/json/test_json_schema_size_validation.cpp b/tests/json/test_json_schema_size_validation.cpp index 941ef0b41..f9c4378e2 100644 --- a/tests/json/test_json_schema_size_validation.cpp +++ b/tests/json/test_json_schema_size_validation.cpp @@ -1,10 +1,11 @@ -#include -#include #include #include #include #include "gtest/gtest.h" +import rfl; +import rfl.json; + namespace test_json_schema_size_validation { diff --git a/tests/json/test_leak.cpp b/tests/json/test_leak.cpp index 32275d8ed..f41a4a079 100644 --- a/tests/json/test_leak.cpp +++ b/tests/json/test_leak.cpp @@ -1,8 +1,11 @@ -#include -#include #include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.json; + namespace test_leak { diff --git a/tests/json/test_leak_arr.cpp b/tests/json/test_leak_arr.cpp index 943df9dff..d0c98b2ad 100644 --- a/tests/json/test_leak_arr.cpp +++ b/tests/json/test_leak_arr.cpp @@ -1,8 +1,12 @@ -#include -#include #include #include "write_and_read.hpp" +#include +#include + +import rfl; +import rfl.json; + namespace test_leak_arr { diff --git a/tests/json/test_leak_rfl_tup.cpp b/tests/json/test_leak_rfl_tup.cpp index 59a4ffe92..e4b6e4ed6 100644 --- a/tests/json/test_leak_rfl_tup.cpp +++ b/tests/json/test_leak_rfl_tup.cpp @@ -1,8 +1,11 @@ -#include -#include #include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.json; + namespace test_leak_rfl_tup { diff --git a/tests/json/test_leak_tup.cpp b/tests/json/test_leak_tup.cpp index 82ce358af..26c984d5c 100644 --- a/tests/json/test_leak_tup.cpp +++ b/tests/json/test_leak_tup.cpp @@ -1,9 +1,12 @@ -#include -#include #include #include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.json; + namespace test_leak_tup { diff --git a/tests/json/test_list.cpp b/tests/json/test_list.cpp index 2378658ba..6d8ff7b44 100644 --- a/tests/json/test_list.cpp +++ b/tests/json/test_list.cpp @@ -1,8 +1,13 @@ -#include -#include #include #include "write_and_read.hpp" +#include +#include +#include + +import rfl; +import rfl.json; + namespace test_list { diff --git a/tests/json/test_literal.cpp b/tests/json/test_literal.cpp index 372820c6c..b511bf90b 100644 --- a/tests/json/test_literal.cpp +++ b/tests/json/test_literal.cpp @@ -1,10 +1,11 @@ #include -#include -#include #include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_literal { diff --git a/tests/json/test_literal_map.cpp b/tests/json/test_literal_map.cpp index 2c1f53427..b67e5a8b3 100644 --- a/tests/json/test_literal_map.cpp +++ b/tests/json/test_literal_map.cpp @@ -1,10 +1,11 @@ #include #include -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_literal_map { diff --git a/tests/json/test_literal_unordered_map.cpp b/tests/json/test_literal_unordered_map.cpp index 8cae2dea6..35012df03 100644 --- a/tests/json/test_literal_unordered_map.cpp +++ b/tests/json/test_literal_unordered_map.cpp @@ -1,10 +1,11 @@ #include -#include -#include #include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_literal_unordered_map { diff --git a/tests/json/test_many_fields.cpp b/tests/json/test_many_fields.cpp index e552c012a..c4c43453f 100644 --- a/tests/json/test_many_fields.cpp +++ b/tests/json/test_many_fields.cpp @@ -1,8 +1,9 @@ -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_many_fields { diff --git a/tests/json/test_map.cpp b/tests/json/test_map.cpp index e4054a9f5..6f8045f3e 100644 --- a/tests/json/test_map.cpp +++ b/tests/json/test_map.cpp @@ -1,9 +1,13 @@ #include -#include -#include #include #include "write_and_read.hpp" +#include +#include + +import rfl; +import rfl.json; + namespace test_map { diff --git a/tests/json/test_map_with_custom_less.cpp b/tests/json/test_map_with_custom_less.cpp index 89405f49c..b3790d3b8 100644 --- a/tests/json/test_map_with_custom_less.cpp +++ b/tests/json/test_map_with_custom_less.cpp @@ -1,10 +1,13 @@ #include #include -#include -#include #include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.json; + namespace test_map_with_custom_less { diff --git a/tests/json/test_map_with_key_validation.cpp b/tests/json/test_map_with_key_validation.cpp index 36ad8290c..43ed5b52f 100644 --- a/tests/json/test_map_with_key_validation.cpp +++ b/tests/json/test_map_with_key_validation.cpp @@ -1,9 +1,13 @@ #include -#include -#include #include #include "write_and_read.hpp" +#include +#include + +import rfl; +import rfl.json; + namespace test_map_with_key_validation { diff --git a/tests/json/test_meta_fields.cpp b/tests/json/test_meta_fields.cpp index 28e6a788d..fc30eab69 100644 --- a/tests/json/test_meta_fields.cpp +++ b/tests/json/test_meta_fields.cpp @@ -1,6 +1,10 @@ -#include #include +#include +#include + +import rfl; + namespace test_meta_fields { diff --git a/tests/json/test_monster_example.cpp b/tests/json/test_monster_example.cpp index 6a1a927b3..b577509c2 100644 --- a/tests/json/test_monster_example.cpp +++ b/tests/json/test_monster_example.cpp @@ -1,9 +1,12 @@ -#include -#include #include #include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.json; + namespace test_monster_example { diff --git a/tests/json/test_movable.cpp b/tests/json/test_movable.cpp index 44565a5ac..86a208693 100644 --- a/tests/json/test_movable.cpp +++ b/tests/json/test_movable.cpp @@ -1,9 +1,10 @@ #include -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + struct MoveableType { @@ -23,4 +24,4 @@ TEST(json, test_moveable) { write_and_read( moveable, R"(2)"); -} \ No newline at end of file +} diff --git a/tests/json/test_move_replace.cpp b/tests/json/test_move_replace.cpp index fe95f2040..92e0801bf 100644 --- a/tests/json/test_move_replace.cpp +++ b/tests/json/test_move_replace.cpp @@ -1,10 +1,13 @@ #include -#include -#include #include #include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.json; + namespace test_move_replace { diff --git a/tests/json/test_multimap.cpp b/tests/json/test_multimap.cpp index 8fad58531..e6cce680d 100644 --- a/tests/json/test_multimap.cpp +++ b/tests/json/test_multimap.cpp @@ -1,9 +1,13 @@ #include -#include -#include #include #include "write_and_read.hpp" +#include +#include + +import rfl; +import rfl.json; + namespace test_multimap { diff --git a/tests/json/test_multiset.cpp b/tests/json/test_multiset.cpp index c303145f1..1366619db 100644 --- a/tests/json/test_multiset.cpp +++ b/tests/json/test_multiset.cpp @@ -1,8 +1,13 @@ -#include -#include #include #include "write_and_read.hpp" +#include +#include +#include + +import rfl; +import rfl.json; + namespace test_multiset { diff --git a/tests/json/test_named_tuple.cpp b/tests/json/test_named_tuple.cpp index 30cc7fa4b..d193eb26a 100644 --- a/tests/json/test_named_tuple.cpp +++ b/tests/json/test_named_tuple.cpp @@ -1,8 +1,9 @@ -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_named_tuple { diff --git a/tests/json/test_no_extra_fields.cpp b/tests/json/test_no_extra_fields.cpp index 7c668bd8a..8e25880e9 100644 --- a/tests/json/test_no_extra_fields.cpp +++ b/tests/json/test_no_extra_fields.cpp @@ -1,8 +1,9 @@ -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_no_extra_fields { diff --git a/tests/json/test_no_extra_fields_with_default.cpp b/tests/json/test_no_extra_fields_with_default.cpp index b2b87abda..10dad435c 100644 --- a/tests/json/test_no_extra_fields_with_default.cpp +++ b/tests/json/test_no_extra_fields_with_default.cpp @@ -1,8 +1,9 @@ -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_no_extra_fields_with_default { diff --git a/tests/json/test_no_optionals.cpp b/tests/json/test_no_optionals.cpp index 0617a0646..bf62e6939 100644 --- a/tests/json/test_no_optionals.cpp +++ b/tests/json/test_no_optionals.cpp @@ -1,9 +1,12 @@ -#include -#include #include #include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.json; + namespace test_no_optionals { diff --git a/tests/json/test_object.cpp b/tests/json/test_object.cpp index bf43b74e8..522aa1ca8 100644 --- a/tests/json/test_object.cpp +++ b/tests/json/test_object.cpp @@ -1,6 +1,7 @@ -#include #include "write_and_read.hpp" +import rfl; + namespace test_object { diff --git a/tests/json/test_oct.cpp b/tests/json/test_oct.cpp index 2a75ef0a7..d4afba9c2 100644 --- a/tests/json/test_oct.cpp +++ b/tests/json/test_oct.cpp @@ -1,8 +1,9 @@ -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_oct { diff --git a/tests/json/test_one_of.cpp b/tests/json/test_one_of.cpp index 0c104cbbc..a0e1e1976 100644 --- a/tests/json/test_one_of.cpp +++ b/tests/json/test_one_of.cpp @@ -1,8 +1,9 @@ -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_one_of { diff --git a/tests/json/test_optional_fields.cpp b/tests/json/test_optional_fields.cpp index e7d183de5..65f602c5e 100644 --- a/tests/json/test_optional_fields.cpp +++ b/tests/json/test_optional_fields.cpp @@ -1,9 +1,12 @@ -#include -#include #include #include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.json; + namespace test_optional_fields { diff --git a/tests/json/test_pointer_fields.cpp b/tests/json/test_pointer_fields.cpp index fabf5fd22..6a68eb0de 100644 --- a/tests/json/test_pointer_fields.cpp +++ b/tests/json/test_pointer_fields.cpp @@ -1,9 +1,12 @@ -#include -#include #include #include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.json; + namespace test_pointer_fields { diff --git a/tests/json/test_positional_and_short.cpp b/tests/json/test_positional_and_short.cpp index 0dc3e84cd..76cd666ba 100644 --- a/tests/json/test_positional_and_short.cpp +++ b/tests/json/test_positional_and_short.cpp @@ -1,10 +1,11 @@ #include -#include -#include #include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_positional_and_short_json { diff --git a/tests/json/test_readme_example.cpp b/tests/json/test_readme_example.cpp index 3dc5653dd..851cdb746 100644 --- a/tests/json/test_readme_example.cpp +++ b/tests/json/test_readme_example.cpp @@ -1,9 +1,10 @@ -#include -#include #include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_readme_example { diff --git a/tests/json/test_ref.cpp b/tests/json/test_ref.cpp index 449065464..0f5a2be51 100644 --- a/tests/json/test_ref.cpp +++ b/tests/json/test_ref.cpp @@ -1,9 +1,12 @@ #include -#include -#include #include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.json; + namespace test_ref { diff --git a/tests/json/test_reflector.cpp b/tests/json/test_reflector.cpp index 06813f7d1..a930b7b2a 100644 --- a/tests/json/test_reflector.cpp +++ b/tests/json/test_reflector.cpp @@ -1,10 +1,11 @@ #include -#include -#include #include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_reflector { diff --git a/tests/json/test_reflector_read.cpp b/tests/json/test_reflector_read.cpp index bc74a6444..0e3620a32 100644 --- a/tests/json/test_reflector_read.cpp +++ b/tests/json/test_reflector_read.cpp @@ -1,10 +1,11 @@ #include -#include -#include #include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_reflector_read { diff --git a/tests/json/test_reflector_schema.cpp b/tests/json/test_reflector_schema.cpp index 625400e66..b818927ab 100644 --- a/tests/json/test_reflector_schema.cpp +++ b/tests/json/test_reflector_schema.cpp @@ -1,10 +1,11 @@ #include -#include -#include #include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_reflector_schema { diff --git a/tests/json/test_reflector_write.cpp b/tests/json/test_reflector_write.cpp index 58b5cb8e5..4c701bab2 100644 --- a/tests/json/test_reflector_write.cpp +++ b/tests/json/test_reflector_write.cpp @@ -1,10 +1,11 @@ #include -#include -#include #include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_reflector_write { diff --git a/tests/json/test_regression_bugs.cpp b/tests/json/test_regression_bugs.cpp index a9c07e1c5..d4d2d4af3 100644 --- a/tests/json/test_regression_bugs.cpp +++ b/tests/json/test_regression_bugs.cpp @@ -1,10 +1,15 @@ #include +#include #include #include +#include + +import rfl; +import rfl.json; + + -#include -#include // transform_camel_case prepends '_' to names starting with uppercase // File: include/rfl/internal/transform_case.hpp:60-73 diff --git a/tests/json/test_replace.cpp b/tests/json/test_replace.cpp index cbeac6268..6624fa2bc 100644 --- a/tests/json/test_replace.cpp +++ b/tests/json/test_replace.cpp @@ -1,10 +1,13 @@ #include -#include -#include #include #include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.json; + namespace test_replace { diff --git a/tests/json/test_replace2.cpp b/tests/json/test_replace2.cpp index 7a4d5a171..958b268e7 100644 --- a/tests/json/test_replace2.cpp +++ b/tests/json/test_replace2.cpp @@ -1,10 +1,13 @@ #include -#include -#include #include #include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.json; + namespace test_replace2 { diff --git a/tests/json/test_replace_flatten.cpp b/tests/json/test_replace_flatten.cpp index b7ab41861..8f017c190 100644 --- a/tests/json/test_replace_flatten.cpp +++ b/tests/json/test_replace_flatten.cpp @@ -1,9 +1,12 @@ #include -#include -#include #include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.json; + namespace test_replace_flatten { diff --git a/tests/json/test_replace_flatten2.cpp b/tests/json/test_replace_flatten2.cpp index 43c083016..b717e63f2 100644 --- a/tests/json/test_replace_flatten2.cpp +++ b/tests/json/test_replace_flatten2.cpp @@ -1,9 +1,12 @@ #include -#include -#include #include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.json; + namespace test_replace_flatten2 { diff --git a/tests/json/test_replace_with_other_struct.cpp b/tests/json/test_replace_with_other_struct.cpp index e0f529c73..9e73e3078 100644 --- a/tests/json/test_replace_with_other_struct.cpp +++ b/tests/json/test_replace_with_other_struct.cpp @@ -1,9 +1,10 @@ #include -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_replace_with_other_struct { diff --git a/tests/json/test_replace_with_other_struct2.cpp b/tests/json/test_replace_with_other_struct2.cpp index bb576a35a..46d9662f3 100644 --- a/tests/json/test_replace_with_other_struct2.cpp +++ b/tests/json/test_replace_with_other_struct2.cpp @@ -1,9 +1,10 @@ #include -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_replace_with_other_struct2 { diff --git a/tests/json/test_result.cpp b/tests/json/test_result.cpp index ba47369cc..0080cb60e 100644 --- a/tests/json/test_result.cpp +++ b/tests/json/test_result.cpp @@ -1,9 +1,10 @@ -#include -#include #include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_result { diff --git a/tests/json/test_rfl_tagged_union_visit_move_only.cpp b/tests/json/test_rfl_tagged_union_visit_move_only.cpp index 8e3e20156..38da75c4d 100644 --- a/tests/json/test_rfl_tagged_union_visit_move_only.cpp +++ b/tests/json/test_rfl_tagged_union_visit_move_only.cpp @@ -1,10 +1,10 @@ #include #include -#include -#include -#include "rfl/TaggedUnion.hpp" #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_rfl_tagged_union_visit_move_only { diff --git a/tests/json/test_rfl_tuple.cpp b/tests/json/test_rfl_tuple.cpp index 21cbe30aa..f777a085e 100644 --- a/tests/json/test_rfl_tuple.cpp +++ b/tests/json/test_rfl_tuple.cpp @@ -1,10 +1,13 @@ #include -#include -#include #include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.json; + namespace test_rfl_tuple { diff --git a/tests/json/test_rfl_variant.cpp b/tests/json/test_rfl_variant.cpp index b1ac4d58b..7e2ce0a70 100644 --- a/tests/json/test_rfl_variant.cpp +++ b/tests/json/test_rfl_variant.cpp @@ -1,9 +1,12 @@ #include -#include -#include #include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.json; + namespace test_rfl_variant { diff --git a/tests/json/test_rfl_variant_emplace.cpp b/tests/json/test_rfl_variant_emplace.cpp index fba28b183..3ff0970d8 100644 --- a/tests/json/test_rfl_variant_emplace.cpp +++ b/tests/json/test_rfl_variant_emplace.cpp @@ -1,9 +1,12 @@ #include -#include -#include #include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.json; + namespace test_rfl_variant_emplace { diff --git a/tests/json/test_rfl_variant_get_if.cpp b/tests/json/test_rfl_variant_get_if.cpp index 893e1ce7b..ba4a3c17b 100644 --- a/tests/json/test_rfl_variant_get_if.cpp +++ b/tests/json/test_rfl_variant_get_if.cpp @@ -1,8 +1,11 @@ #include -#include -#include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.json; + namespace test_rfl_variant_get_if { diff --git a/tests/json/test_rfl_variant_holds_alternative.cpp b/tests/json/test_rfl_variant_holds_alternative.cpp index 6d2971b07..5f2d9fe7f 100644 --- a/tests/json/test_rfl_variant_holds_alternative.cpp +++ b/tests/json/test_rfl_variant_holds_alternative.cpp @@ -1,8 +1,11 @@ #include -#include -#include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.json; + namespace test_rfl_variant_holds_alternative { diff --git a/tests/json/test_rfl_variant_swap.cpp b/tests/json/test_rfl_variant_swap.cpp index 723d8c637..542340e94 100644 --- a/tests/json/test_rfl_variant_swap.cpp +++ b/tests/json/test_rfl_variant_swap.cpp @@ -1,9 +1,12 @@ #include -#include -#include #include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.json; + namespace test_rfl_variant_swap { diff --git a/tests/json/test_rfl_variant_visit.cpp b/tests/json/test_rfl_variant_visit.cpp index 01859e6dc..c0497d167 100644 --- a/tests/json/test_rfl_variant_visit.cpp +++ b/tests/json/test_rfl_variant_visit.cpp @@ -1,8 +1,11 @@ #include -#include -#include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.json; + namespace test_rfl_variant_visit { diff --git a/tests/json/test_rfl_variant_visit_in_place.cpp b/tests/json/test_rfl_variant_visit_in_place.cpp index 43f672c3f..1b59f5331 100644 --- a/tests/json/test_rfl_variant_visit_in_place.cpp +++ b/tests/json/test_rfl_variant_visit_in_place.cpp @@ -1,8 +1,11 @@ #include -#include -#include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.json; + namespace test_rfl_variant_visit_in_place { diff --git a/tests/json/test_rfl_variant_visit_lvalues.cpp b/tests/json/test_rfl_variant_visit_lvalues.cpp index 0697fb1cf..0e40df2d2 100644 --- a/tests/json/test_rfl_variant_visit_lvalues.cpp +++ b/tests/json/test_rfl_variant_visit_lvalues.cpp @@ -1,8 +1,9 @@ #include -#include -#include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_rfl_variant_visit_lvalues { diff --git a/tests/json/test_rfl_variant_visit_move_only.cpp b/tests/json/test_rfl_variant_visit_move_only.cpp index 152e12e1a..8ecd7ff67 100644 --- a/tests/json/test_rfl_variant_visit_move_only.cpp +++ b/tests/json/test_rfl_variant_visit_move_only.cpp @@ -1,9 +1,10 @@ #include #include -#include -#include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_rfl_variant_visit_move_only { diff --git a/tests/json/test_save_load.cpp b/tests/json/test_save_load.cpp index eccd4e2aa..f010f0ceb 100644 --- a/tests/json/test_save_load.cpp +++ b/tests/json/test_save_load.cpp @@ -1,11 +1,12 @@ #include #include -#include -#include #include #include #include +import rfl; +import rfl.json; + namespace test_save_load { diff --git a/tests/json/test_segfault.cpp b/tests/json/test_segfault.cpp index 56137b5d8..c3b8e5d63 100644 --- a/tests/json/test_segfault.cpp +++ b/tests/json/test_segfault.cpp @@ -1,8 +1,9 @@ -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + // This example had led to a segfault on GCC 12. // To make sure this won't happen again, we include diff --git a/tests/json/test_set.cpp b/tests/json/test_set.cpp index 8afc04ec9..e48fc65cc 100644 --- a/tests/json/test_set.cpp +++ b/tests/json/test_set.cpp @@ -1,9 +1,13 @@ -#include -#include #include #include #include "write_and_read.hpp" +#include +#include + +import rfl; +import rfl.json; + namespace test_set { diff --git a/tests/json/test_shared_ptr.cpp b/tests/json/test_shared_ptr.cpp index 7af635149..a6a0df337 100644 --- a/tests/json/test_shared_ptr.cpp +++ b/tests/json/test_shared_ptr.cpp @@ -1,10 +1,13 @@ #include -#include -#include #include #include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.json; + namespace test_shared_ptr { diff --git a/tests/json/test_size.cpp b/tests/json/test_size.cpp index c7babbd59..b733e50c4 100644 --- a/tests/json/test_size.cpp +++ b/tests/json/test_size.cpp @@ -1,9 +1,10 @@ -#include -#include #include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_size { diff --git a/tests/json/test_skip.cpp b/tests/json/test_skip.cpp index 802bb6e2a..00e83e95c 100644 --- a/tests/json/test_skip.cpp +++ b/tests/json/test_skip.cpp @@ -1,8 +1,9 @@ -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_skip { diff --git a/tests/json/test_skip2.cpp b/tests/json/test_skip2.cpp index 3c744936b..8efc6b59d 100644 --- a/tests/json/test_skip2.cpp +++ b/tests/json/test_skip2.cpp @@ -1,8 +1,9 @@ -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_skip2 { diff --git a/tests/json/test_snake_case_to_camel_case.cpp b/tests/json/test_snake_case_to_camel_case.cpp index cd8dfde0c..e6f7abc46 100644 --- a/tests/json/test_snake_case_to_camel_case.cpp +++ b/tests/json/test_snake_case_to_camel_case.cpp @@ -1,9 +1,10 @@ -#include -#include #include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_snake_case_to_camel_case { diff --git a/tests/json/test_snake_case_to_camel_case_rename.cpp b/tests/json/test_snake_case_to_camel_case_rename.cpp index e5850b2c5..39ea2f180 100644 --- a/tests/json/test_snake_case_to_camel_case_rename.cpp +++ b/tests/json/test_snake_case_to_camel_case_rename.cpp @@ -1,8 +1,9 @@ -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_snake_case_to_camel_case_rename { diff --git a/tests/json/test_snake_case_to_pascal_case.cpp b/tests/json/test_snake_case_to_pascal_case.cpp index 2a88cec76..be59b6de8 100644 --- a/tests/json/test_snake_case_to_pascal_case.cpp +++ b/tests/json/test_snake_case_to_pascal_case.cpp @@ -1,9 +1,10 @@ -#include -#include #include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_snake_case_to_pascal_case { diff --git a/tests/json/test_snake_case_to_pascal_case_rename.cpp b/tests/json/test_snake_case_to_pascal_case_rename.cpp index c4cda458f..819ee0505 100644 --- a/tests/json/test_snake_case_to_pascal_case_rename.cpp +++ b/tests/json/test_snake_case_to_pascal_case_rename.cpp @@ -1,8 +1,9 @@ -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_pascal_case_to_camel_case_rename { diff --git a/tests/json/test_span.cpp b/tests/json/test_span.cpp index a29e698f1..70ea18831 100644 --- a/tests/json/test_span.cpp +++ b/tests/json/test_span.cpp @@ -1,11 +1,12 @@ #include -#include -#include #include #include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_span { diff --git a/tests/json/test_std_ref.cpp b/tests/json/test_std_ref.cpp index 4ccb03107..46bdc7e4f 100644 --- a/tests/json/test_std_ref.cpp +++ b/tests/json/test_std_ref.cpp @@ -1,10 +1,11 @@ #include #include -#include -#include #include #include +import rfl; +import rfl.json; + namespace test_std_ref { diff --git a/tests/json/test_string_map.cpp b/tests/json/test_string_map.cpp index 84515c273..f2e464a6b 100644 --- a/tests/json/test_string_map.cpp +++ b/tests/json/test_string_map.cpp @@ -1,10 +1,11 @@ #include #include -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_string_map { TEST(json, test_string_map) { diff --git a/tests/json/test_string_unordered_map.cpp b/tests/json/test_string_unordered_map.cpp index 76658770d..07e05bd1e 100644 --- a/tests/json/test_string_unordered_map.cpp +++ b/tests/json/test_string_unordered_map.cpp @@ -1,10 +1,11 @@ #include -#include -#include #include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_string_unordered_map { TEST(json, test_string_unordered_map) { diff --git a/tests/json/test_string_view.cpp b/tests/json/test_string_view.cpp index a92f25829..27edffc80 100644 --- a/tests/json/test_string_view.cpp +++ b/tests/json/test_string_view.cpp @@ -1,9 +1,12 @@ #include #include -#include -#include #include +#include + +import rfl; +import rfl.json; + namespace test_string_view { diff --git a/tests/json/test_strip_field_names.cpp b/tests/json/test_strip_field_names.cpp index eda633fca..d87e0ef2f 100644 --- a/tests/json/test_strip_field_names.cpp +++ b/tests/json/test_strip_field_names.cpp @@ -1,9 +1,10 @@ -#include -#include #include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_strip_field_names { diff --git a/tests/json/test_tagged_union.cpp b/tests/json/test_tagged_union.cpp index 12f2098f5..c34f1b121 100644 --- a/tests/json/test_tagged_union.cpp +++ b/tests/json/test_tagged_union.cpp @@ -1,7 +1,8 @@ -#include -#include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_tagged_union { diff --git a/tests/json/test_tagged_union2.cpp b/tests/json/test_tagged_union2.cpp index a0d3a73d7..cb805ce3c 100644 --- a/tests/json/test_tagged_union2.cpp +++ b/tests/json/test_tagged_union2.cpp @@ -1,9 +1,10 @@ #include -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_tagged_union2 { diff --git a/tests/json/test_tagged_union3.cpp b/tests/json/test_tagged_union3.cpp index f0e2f4376..b96426323 100644 --- a/tests/json/test_tagged_union3.cpp +++ b/tests/json/test_tagged_union3.cpp @@ -1,9 +1,10 @@ #include -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_tagged_union3 { diff --git a/tests/json/test_tagged_union4.cpp b/tests/json/test_tagged_union4.cpp index a1ba70c62..340df3ec9 100644 --- a/tests/json/test_tagged_union4.cpp +++ b/tests/json/test_tagged_union4.cpp @@ -1,9 +1,10 @@ #include -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_tagged_union4 { diff --git a/tests/json/test_tagged_union5.cpp b/tests/json/test_tagged_union5.cpp index 27181cb14..a67e7a558 100644 --- a/tests/json/test_tagged_union5.cpp +++ b/tests/json/test_tagged_union5.cpp @@ -1,9 +1,12 @@ #include -#include -#include #include #include +#include + +import rfl; +import rfl.json; + namespace test_tagged_union5 { diff --git a/tests/json/test_tagged_union_with_no_extra_fields.cpp b/tests/json/test_tagged_union_with_no_extra_fields.cpp index e2b2bc5c9..c15b7b7bd 100644 --- a/tests/json/test_tagged_union_with_no_extra_fields.cpp +++ b/tests/json/test_tagged_union_with_no_extra_fields.cpp @@ -1,7 +1,8 @@ -#include -#include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_tagged_union_with_no_extra_fields { diff --git a/tests/json/test_template.cpp b/tests/json/test_template.cpp index 93ddad658..5de96bbd6 100644 --- a/tests/json/test_template.cpp +++ b/tests/json/test_template.cpp @@ -1,8 +1,9 @@ -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_template { diff --git a/tests/json/test_time_point.cpp b/tests/json/test_time_point.cpp index 01f03260d..ddbcd1435 100644 --- a/tests/json/test_time_point.cpp +++ b/tests/json/test_time_point.cpp @@ -1,9 +1,10 @@ #include #include -#include -#include #include +import rfl; +import rfl.json; + namespace test_time_point { diff --git a/tests/json/test_timestamp.cpp b/tests/json/test_timestamp.cpp index 0c91fb744..da17eb702 100644 --- a/tests/json/test_timestamp.cpp +++ b/tests/json/test_timestamp.cpp @@ -1,8 +1,9 @@ -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_timestamp { diff --git a/tests/json/test_transform.cpp b/tests/json/test_transform.cpp index 4909720df..47516d223 100644 --- a/tests/json/test_transform.cpp +++ b/tests/json/test_transform.cpp @@ -1,9 +1,10 @@ #include -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_transform { diff --git a/tests/json/test_tuple.cpp b/tests/json/test_tuple.cpp index bc1216b4b..a7634185c 100644 --- a/tests/json/test_tuple.cpp +++ b/tests/json/test_tuple.cpp @@ -1,11 +1,14 @@ #include -#include -#include #include #include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.json; + namespace test_tuple { diff --git a/tests/json/test_underlying_enums.cpp b/tests/json/test_underlying_enums.cpp index 3634a4d9d..db8a8b3d1 100644 --- a/tests/json/test_underlying_enums.cpp +++ b/tests/json/test_underlying_enums.cpp @@ -1,9 +1,10 @@ #include -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_underlying_enums { diff --git a/tests/json/test_unique_ptr.cpp b/tests/json/test_unique_ptr.cpp index 075505c14..4f4ebd09d 100644 --- a/tests/json/test_unique_ptr.cpp +++ b/tests/json/test_unique_ptr.cpp @@ -1,10 +1,13 @@ #include -#include -#include #include #include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.json; + namespace test_unique_ptr { diff --git a/tests/json/test_unique_ptr2.cpp b/tests/json/test_unique_ptr2.cpp index 125dff51b..9dfa9428f 100644 --- a/tests/json/test_unique_ptr2.cpp +++ b/tests/json/test_unique_ptr2.cpp @@ -1,9 +1,13 @@ #include -#include -#include #include #include "write_and_read.hpp" +#include +#include + +import rfl; +import rfl.json; + namespace test_unique_ptr2 { diff --git a/tests/json/test_unnamed_namespace.cpp b/tests/json/test_unnamed_namespace.cpp index 29d70efa3..7dcc3cb30 100644 --- a/tests/json/test_unnamed_namespace.cpp +++ b/tests/json/test_unnamed_namespace.cpp @@ -1,9 +1,10 @@ -#include -#include #include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_unnamed_namespace { diff --git a/tests/json/test_unordered_map.cpp b/tests/json/test_unordered_map.cpp index 756ae3552..6a761631a 100644 --- a/tests/json/test_unordered_map.cpp +++ b/tests/json/test_unordered_map.cpp @@ -1,9 +1,13 @@ -#include -#include #include #include #include "write_and_read.hpp" +#include +#include + +import rfl; +import rfl.json; + namespace test_unordered_map { diff --git a/tests/json/test_unordered_map_with_custom_hash.cpp b/tests/json/test_unordered_map_with_custom_hash.cpp index 7b57e3c08..2d3809961 100644 --- a/tests/json/test_unordered_map_with_custom_hash.cpp +++ b/tests/json/test_unordered_map_with_custom_hash.cpp @@ -1,9 +1,14 @@ -#include -#include #include #include #include "write_and_read.hpp" +#include +#include +#include + +import rfl; +import rfl.json; + namespace test_unordered_map_with_custom_hash { diff --git a/tests/json/test_unordered_multimap.cpp b/tests/json/test_unordered_multimap.cpp index d405a9f80..e259e01f2 100644 --- a/tests/json/test_unordered_multimap.cpp +++ b/tests/json/test_unordered_multimap.cpp @@ -1,8 +1,13 @@ -#include -#include #include #include "write_and_read.hpp" +#include +#include +#include + +import rfl; +import rfl.json; + namespace test_unordered_multimap { diff --git a/tests/json/test_unordered_multiset.cpp b/tests/json/test_unordered_multiset.cpp index 656d65deb..2204d1aed 100644 --- a/tests/json/test_unordered_multiset.cpp +++ b/tests/json/test_unordered_multiset.cpp @@ -1,8 +1,13 @@ -#include -#include #include #include "write_and_read.hpp" +#include +#include +#include + +import rfl; +import rfl.json; + namespace test_unordered_multiset { diff --git a/tests/json/test_unordered_set.cpp b/tests/json/test_unordered_set.cpp index 1037dee24..628206bab 100644 --- a/tests/json/test_unordered_set.cpp +++ b/tests/json/test_unordered_set.cpp @@ -1,8 +1,13 @@ -#include -#include #include #include "write_and_read.hpp" +#include +#include +#include + +import rfl; +import rfl.json; + namespace test_unordered_set { diff --git a/tests/json/test_uuid.cpp b/tests/json/test_uuid.cpp index 56e8d2b20..60ae4eaf3 100644 --- a/tests/json/test_uuid.cpp +++ b/tests/json/test_uuid.cpp @@ -1,8 +1,9 @@ -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_uuid { diff --git a/tests/json/test_validation_with_fields.cpp b/tests/json/test_validation_with_fields.cpp index 380dc9c5e..ba45e33b3 100644 --- a/tests/json/test_validation_with_fields.cpp +++ b/tests/json/test_validation_with_fields.cpp @@ -1,9 +1,12 @@ #include -#include -#include #include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.json; + namespace test_validation_with_fields { diff --git a/tests/json/test_variant.cpp b/tests/json/test_variant.cpp index c467cd532..77cb1ec4d 100644 --- a/tests/json/test_variant.cpp +++ b/tests/json/test_variant.cpp @@ -1,9 +1,13 @@ #include -#include -#include #include #include "write_and_read.hpp" +#include +#include + +import rfl; +import rfl.json; + namespace test_variant { diff --git a/tests/json/test_view.cpp b/tests/json/test_view.cpp index eb25c8dc8..e2875b540 100644 --- a/tests/json/test_view.cpp +++ b/tests/json/test_view.cpp @@ -1,9 +1,10 @@ #include -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_view { @@ -19,7 +20,7 @@ TEST(json, test_view) { const auto view = rfl::to_view(lisa); *view.get<0>() = "Maggie"; - *std::get<1>(view.values()) = "Simpson"; + *rfl::get<1>(view.values()) = "Simpson"; *view.get<"age">() = 0; write_and_read(lisa, diff --git a/tests/json/test_wstring.cpp b/tests/json/test_wstring.cpp index 1f73080fb..beeac414f 100644 --- a/tests/json/test_wstring.cpp +++ b/tests/json/test_wstring.cpp @@ -1,9 +1,10 @@ #include -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.json; + namespace test_wstring { TEST(json, test_wstring) { diff --git a/tests/json/write_and_read.hpp b/tests/json/write_and_read.hpp index 830791f80..8b6d46c1e 100644 --- a/tests/json/write_and_read.hpp +++ b/tests/json/write_and_read.hpp @@ -4,9 +4,11 @@ #include #include -#include #include #include +import rfl.json; + + template auto write(const auto& _struct, const std::string& _expected) { diff --git a/tests/json_c_arrays_and_inheritance/CMakeLists.txt b/tests/json_c_arrays_and_inheritance/CMakeLists.txt index a7f7f7046..44aba6e43 100644 --- a/tests/json_c_arrays_and_inheritance/CMakeLists.txt +++ b/tests/json_c_arrays_and_inheritance/CMakeLists.txt @@ -6,11 +6,9 @@ add_executable( reflect-cpp-json-c-arrays-and-inheritance-tests ${SOURCES} ) -target_precompile_headers(reflect-cpp-json-c-arrays-and-inheritance-tests PRIVATE [["rfl.hpp"]] ) +target_precompile_headers(reflect-cpp-json-c-arrays-and-inheritance-tests PRIVATE ) -SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DREFLECT_CPP_C_ARRAYS_OR_INHERITANCE") - target_include_directories(reflect-cpp-json-c-arrays-and-inheritance-tests SYSTEM PRIVATE "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include") target_link_libraries(reflect-cpp-json-c-arrays-and-inheritance-tests PRIVATE reflectcpp_tests_crt) diff --git a/tests/json_c_arrays_and_inheritance/test_inheritance.cpp b/tests/json_c_arrays_and_inheritance/test_inheritance.cpp index 88379ccf3..5657c9da5 100644 --- a/tests/json_c_arrays_and_inheritance/test_inheritance.cpp +++ b/tests/json_c_arrays_and_inheritance/test_inheritance.cpp @@ -1,7 +1,8 @@ #include #include -#include +import rfl.c_arrays_and_inheritance; + namespace test_inheritance { diff --git a/tests/json_c_arrays_and_inheritance/test_inheritance2.cpp b/tests/json_c_arrays_and_inheritance/test_inheritance2.cpp index e79b3541b..5860371f4 100644 --- a/tests/json_c_arrays_and_inheritance/test_inheritance2.cpp +++ b/tests/json_c_arrays_and_inheritance/test_inheritance2.cpp @@ -1,9 +1,9 @@ #include #include -#include +import rfl.c_arrays_and_inheritance; + -#include "rfl/num_fields.hpp" namespace test_inheritance2 { diff --git a/tests/json_c_arrays_and_inheritance/write_and_read.hpp b/tests/json_c_arrays_and_inheritance/write_and_read.hpp index 830791f80..8ccb294a1 100644 --- a/tests/json_c_arrays_and_inheritance/write_and_read.hpp +++ b/tests/json_c_arrays_and_inheritance/write_and_read.hpp @@ -4,9 +4,11 @@ #include #include -#include #include #include +import rfl.c_arrays_and_inheritance; + + template auto write(const auto& _struct, const std::string& _expected) { diff --git a/tests/msgpack/CMakeLists.txt b/tests/msgpack/CMakeLists.txt index 3c093dac0..e146eee0a 100644 --- a/tests/msgpack/CMakeLists.txt +++ b/tests/msgpack/CMakeLists.txt @@ -6,7 +6,7 @@ add_executable( reflect-cpp-msgpack-tests ${SOURCES} ) -target_precompile_headers(reflect-cpp-msgpack-tests PRIVATE [["rfl.hpp"]] ) +target_precompile_headers(reflect-cpp-msgpack-tests PRIVATE ) target_include_directories(reflect-cpp-msgpack-tests SYSTEM PRIVATE "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include") diff --git a/tests/msgpack/test_add_struct_name.cpp b/tests/msgpack/test_add_struct_name.cpp index 9b43f3970..16bb200ba 100644 --- a/tests/msgpack/test_add_struct_name.cpp +++ b/tests/msgpack/test_add_struct_name.cpp @@ -2,6 +2,7 @@ #include #include "write_and_read.hpp" +import rfl.msgpack; namespace test_add_struct_name { diff --git a/tests/msgpack/test_array.cpp b/tests/msgpack/test_array.cpp index bb694bb56..0e2295a54 100644 --- a/tests/msgpack/test_array.cpp +++ b/tests/msgpack/test_array.cpp @@ -1,13 +1,16 @@ #include #include -#include #include // Make sure things still compile when // rfl.hpp is included after rfl/cbor.hpp. -#include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.msgpack; + namespace test_array { diff --git a/tests/msgpack/test_box.cpp b/tests/msgpack/test_box.cpp index bb2737c4e..c97b29a81 100644 --- a/tests/msgpack/test_box.cpp +++ b/tests/msgpack/test_box.cpp @@ -1,7 +1,11 @@ #include -#include #include "write_and_read.hpp" +#include + +import rfl.msgpack; +import rfl; + namespace test_box { diff --git a/tests/msgpack/test_bytestring.cpp b/tests/msgpack/test_bytestring.cpp index efb1d68af..999983fee 100644 --- a/tests/msgpack/test_bytestring.cpp +++ b/tests/msgpack/test_bytestring.cpp @@ -1,6 +1,10 @@ -#include #include "write_and_read.hpp" +#include + +import rfl.msgpack; +import rfl; + namespace test_bytestring { diff --git a/tests/msgpack/test_combined_processors.cpp b/tests/msgpack/test_combined_processors.cpp index e2e2b7796..390e529ab 100644 --- a/tests/msgpack/test_combined_processors.cpp +++ b/tests/msgpack/test_combined_processors.cpp @@ -2,6 +2,7 @@ #include #include "write_and_read.hpp" +import rfl.msgpack; namespace test_combined_processors { diff --git a/tests/msgpack/test_custom_class1.cpp b/tests/msgpack/test_custom_class1.cpp index 69f86afaa..130c60b54 100644 --- a/tests/msgpack/test_custom_class1.cpp +++ b/tests/msgpack/test_custom_class1.cpp @@ -1,9 +1,11 @@ #include -#include #include #include #include "write_and_read.hpp" +import rfl.msgpack; +import rfl; + namespace test_custom_class1 { diff --git a/tests/msgpack/test_custom_class3.cpp b/tests/msgpack/test_custom_class3.cpp index 0b94d2391..1391d544a 100644 --- a/tests/msgpack/test_custom_class3.cpp +++ b/tests/msgpack/test_custom_class3.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.msgpack; +import rfl; + namespace test_custom_class3 { diff --git a/tests/msgpack/test_custom_class4.cpp b/tests/msgpack/test_custom_class4.cpp index f944367d0..82774b735 100644 --- a/tests/msgpack/test_custom_class4.cpp +++ b/tests/msgpack/test_custom_class4.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.msgpack; +import rfl; + namespace test_custom_class4 { diff --git a/tests/msgpack/test_default_values.cpp b/tests/msgpack/test_default_values.cpp index 582529a59..ecd332ef1 100644 --- a/tests/msgpack/test_default_values.cpp +++ b/tests/msgpack/test_default_values.cpp @@ -1,9 +1,11 @@ #include -#include #include #include #include "write_and_read.hpp" +import rfl.msgpack; +import rfl; + namespace test_default_values { diff --git a/tests/msgpack/test_deque.cpp b/tests/msgpack/test_deque.cpp index 4b8eae7c5..0ca2cebf6 100644 --- a/tests/msgpack/test_deque.cpp +++ b/tests/msgpack/test_deque.cpp @@ -1,7 +1,13 @@ -#include #include #include "write_and_read.hpp" +#include +#include +#include + +import rfl.msgpack; +import rfl; + namespace test_deque { diff --git a/tests/msgpack/test_enum.cpp b/tests/msgpack/test_enum.cpp index dddbab8ec..b57224f19 100644 --- a/tests/msgpack/test_enum.cpp +++ b/tests/msgpack/test_enum.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.msgpack; +import rfl; + namespace test_enum { diff --git a/tests/msgpack/test_extra_fields.cpp b/tests/msgpack/test_extra_fields.cpp index 0633031e1..ea1459ad2 100644 --- a/tests/msgpack/test_extra_fields.cpp +++ b/tests/msgpack/test_extra_fields.cpp @@ -1,7 +1,9 @@ -#include #include #include "write_and_read.hpp" +import rfl.msgpack; +import rfl; + namespace test_extra_fields { diff --git a/tests/msgpack/test_field_variant.cpp b/tests/msgpack/test_field_variant.cpp index 06d44edfe..314ba74e9 100644 --- a/tests/msgpack/test_field_variant.cpp +++ b/tests/msgpack/test_field_variant.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.msgpack; +import rfl; + namespace test_field_variant { diff --git a/tests/msgpack/test_flag_enum.cpp b/tests/msgpack/test_flag_enum.cpp index 25996b18d..bf5855ebf 100644 --- a/tests/msgpack/test_flag_enum.cpp +++ b/tests/msgpack/test_flag_enum.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.msgpack; +import rfl; + namespace test_flag_enum { diff --git a/tests/msgpack/test_flag_enum_with_int.cpp b/tests/msgpack/test_flag_enum_with_int.cpp index 46473a8a5..94324d746 100644 --- a/tests/msgpack/test_flag_enum_with_int.cpp +++ b/tests/msgpack/test_flag_enum_with_int.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.msgpack; +import rfl; + namespace test_flag_enum_with_int { diff --git a/tests/msgpack/test_flatten.cpp b/tests/msgpack/test_flatten.cpp index 07c5594a1..c52cee555 100644 --- a/tests/msgpack/test_flatten.cpp +++ b/tests/msgpack/test_flatten.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.msgpack; +import rfl; + namespace test_flatten { diff --git a/tests/msgpack/test_flatten_anonymous.cpp b/tests/msgpack/test_flatten_anonymous.cpp index b25ec9ee0..de716eb61 100644 --- a/tests/msgpack/test_flatten_anonymous.cpp +++ b/tests/msgpack/test_flatten_anonymous.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.msgpack; +import rfl; + namespace test_flatten_anonymous { diff --git a/tests/msgpack/test_forward_list.cpp b/tests/msgpack/test_forward_list.cpp index 880793960..8748fab73 100644 --- a/tests/msgpack/test_forward_list.cpp +++ b/tests/msgpack/test_forward_list.cpp @@ -1,7 +1,13 @@ -#include #include #include "write_and_read.hpp" +#include +#include +#include + +import rfl.msgpack; +import rfl; + namespace test_forward_list { diff --git a/tests/msgpack/test_generic_float.cpp b/tests/msgpack/test_generic_float.cpp index c23f6756c..6a16d38a6 100644 --- a/tests/msgpack/test_generic_float.cpp +++ b/tests/msgpack/test_generic_float.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.msgpack; +import rfl; + namespace test_generic_float { diff --git a/tests/msgpack/test_literal.cpp b/tests/msgpack/test_literal.cpp index 2eaf117cb..4cb46ea1e 100644 --- a/tests/msgpack/test_literal.cpp +++ b/tests/msgpack/test_literal.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.msgpack; +import rfl; + namespace test_literal { diff --git a/tests/msgpack/test_literal_map.cpp b/tests/msgpack/test_literal_map.cpp index 5b0bf148d..6f26725a6 100644 --- a/tests/msgpack/test_literal_map.cpp +++ b/tests/msgpack/test_literal_map.cpp @@ -1,9 +1,11 @@ #include #include -#include #include #include "write_and_read.hpp" +import rfl.msgpack; +import rfl; + namespace test_literal_map { diff --git a/tests/msgpack/test_map.cpp b/tests/msgpack/test_map.cpp index 1736704a5..252909f41 100644 --- a/tests/msgpack/test_map.cpp +++ b/tests/msgpack/test_map.cpp @@ -1,8 +1,12 @@ #include -#include #include #include "write_and_read.hpp" +#include + +import rfl.msgpack; +import rfl; + namespace test_map { diff --git a/tests/msgpack/test_map_with_key_validation.cpp b/tests/msgpack/test_map_with_key_validation.cpp index 072b530b0..b91e9ca5b 100644 --- a/tests/msgpack/test_map_with_key_validation.cpp +++ b/tests/msgpack/test_map_with_key_validation.cpp @@ -1,8 +1,13 @@ #include -#include #include #include "write_and_read.hpp" +#include +#include + +import rfl.msgpack; +import rfl; + namespace test_map_with_key_validation { diff --git a/tests/msgpack/test_monster_example.cpp b/tests/msgpack/test_monster_example.cpp index 60def237f..f11c2c661 100644 --- a/tests/msgpack/test_monster_example.cpp +++ b/tests/msgpack/test_monster_example.cpp @@ -1,8 +1,10 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.msgpack; +import rfl; + namespace test_monster_example { diff --git a/tests/msgpack/test_readme_example.cpp b/tests/msgpack/test_readme_example.cpp index ef57bf705..3e4d55a68 100644 --- a/tests/msgpack/test_readme_example.cpp +++ b/tests/msgpack/test_readme_example.cpp @@ -1,8 +1,10 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.msgpack; +import rfl; + namespace test_readme_example { diff --git a/tests/msgpack/test_readme_example2.cpp b/tests/msgpack/test_readme_example2.cpp index 10633487f..9bb556be7 100644 --- a/tests/msgpack/test_readme_example2.cpp +++ b/tests/msgpack/test_readme_example2.cpp @@ -1,7 +1,9 @@ -#include #include #include "write_and_read.hpp" +import rfl.msgpack; +import rfl; + namespace test_readme_example2 { diff --git a/tests/msgpack/test_ref.cpp b/tests/msgpack/test_ref.cpp index f56e1cdda..6c35f5c4a 100644 --- a/tests/msgpack/test_ref.cpp +++ b/tests/msgpack/test_ref.cpp @@ -1,7 +1,11 @@ #include -#include #include "write_and_read.hpp" +#include + +import rfl.msgpack; +import rfl; + namespace test_ref { diff --git a/tests/msgpack/test_regression_bugs.cpp b/tests/msgpack/test_regression_bugs.cpp index 04fb31837..954cdb420 100644 --- a/tests/msgpack/test_regression_bugs.cpp +++ b/tests/msgpack/test_regression_bugs.cpp @@ -6,9 +6,10 @@ #include #include #include +import rfl; +import rfl.msgpack; + -#include -#include // msgpack::read — ignores return value of msgpack_unpack // File: include/rfl/msgpack/read.hpp:35-36 diff --git a/tests/msgpack/test_save_load.cpp b/tests/msgpack/test_save_load.cpp index a5c34bf14..880cb9749 100644 --- a/tests/msgpack/test_save_load.cpp +++ b/tests/msgpack/test_save_load.cpp @@ -1,10 +1,11 @@ #include -#include -#include #include #include #include +import rfl; +import rfl.msgpack; + namespace test_save_load { diff --git a/tests/msgpack/test_set.cpp b/tests/msgpack/test_set.cpp index 2115eeb83..3ff27289a 100644 --- a/tests/msgpack/test_set.cpp +++ b/tests/msgpack/test_set.cpp @@ -1,7 +1,13 @@ -#include #include #include "write_and_read.hpp" +#include +#include +#include + +import rfl.msgpack; +import rfl; + namespace test_set { diff --git a/tests/msgpack/test_size.cpp b/tests/msgpack/test_size.cpp index d368ec621..857c0b658 100644 --- a/tests/msgpack/test_size.cpp +++ b/tests/msgpack/test_size.cpp @@ -1,8 +1,10 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.msgpack; +import rfl; + namespace test_size { diff --git a/tests/msgpack/test_skip.cpp b/tests/msgpack/test_skip.cpp index 428df8603..d88cee46e 100644 --- a/tests/msgpack/test_skip.cpp +++ b/tests/msgpack/test_skip.cpp @@ -1,6 +1,7 @@ #include #include "write_and_read.hpp" +import rfl.msgpack; namespace test_skip { diff --git a/tests/msgpack/test_snake_case_to_camel_case.cpp b/tests/msgpack/test_snake_case_to_camel_case.cpp index ba65e5d4b..7baf173dd 100644 --- a/tests/msgpack/test_snake_case_to_camel_case.cpp +++ b/tests/msgpack/test_snake_case_to_camel_case.cpp @@ -2,6 +2,7 @@ #include #include "write_and_read.hpp" +import rfl.msgpack; namespace test_snake_case_to_camel_case { diff --git a/tests/msgpack/test_snake_case_to_pascal_case.cpp b/tests/msgpack/test_snake_case_to_pascal_case.cpp index c0cd8f105..b4f0e345a 100644 --- a/tests/msgpack/test_snake_case_to_pascal_case.cpp +++ b/tests/msgpack/test_snake_case_to_pascal_case.cpp @@ -2,6 +2,7 @@ #include #include "write_and_read.hpp" +import rfl.msgpack; namespace test_snake_case_to_pascal_case { diff --git a/tests/msgpack/test_string_map.cpp b/tests/msgpack/test_string_map.cpp index da6a46ef1..e17a15d71 100644 --- a/tests/msgpack/test_string_map.cpp +++ b/tests/msgpack/test_string_map.cpp @@ -1,9 +1,11 @@ #include #include -#include #include #include "write_and_read.hpp" +import rfl.msgpack; +import rfl; + namespace test_string_map { TEST(msgpack, test_string_map) { diff --git a/tests/msgpack/test_tagged_union.cpp b/tests/msgpack/test_tagged_union.cpp index 9d951400d..67ed23827 100644 --- a/tests/msgpack/test_tagged_union.cpp +++ b/tests/msgpack/test_tagged_union.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.msgpack; +import rfl; + namespace test_tagged_union { diff --git a/tests/msgpack/test_tagged_union2.cpp b/tests/msgpack/test_tagged_union2.cpp index 5c5022cd5..e4ad1e5bb 100644 --- a/tests/msgpack/test_tagged_union2.cpp +++ b/tests/msgpack/test_tagged_union2.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.msgpack; +import rfl; + namespace test_tagged_union2 { diff --git a/tests/msgpack/test_timestamp.cpp b/tests/msgpack/test_timestamp.cpp index ab2a81db3..5b9f06e33 100644 --- a/tests/msgpack/test_timestamp.cpp +++ b/tests/msgpack/test_timestamp.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.msgpack; +import rfl; + namespace test_timestamp { diff --git a/tests/msgpack/test_unique_ptr.cpp b/tests/msgpack/test_unique_ptr.cpp index 5dff3ab29..02a981a76 100644 --- a/tests/msgpack/test_unique_ptr.cpp +++ b/tests/msgpack/test_unique_ptr.cpp @@ -1,9 +1,13 @@ #include -#include #include #include #include "write_and_read.hpp" +#include + +import rfl.msgpack; +import rfl; + namespace test_unique_ptr { diff --git a/tests/msgpack/test_unique_ptr2.cpp b/tests/msgpack/test_unique_ptr2.cpp index ec11bfcc5..a84002692 100644 --- a/tests/msgpack/test_unique_ptr2.cpp +++ b/tests/msgpack/test_unique_ptr2.cpp @@ -1,7 +1,12 @@ #include -#include #include "write_and_read.hpp" +#include +#include + +import rfl.msgpack; +import rfl; + namespace test_unique_ptr2 { diff --git a/tests/msgpack/test_variant.cpp b/tests/msgpack/test_variant.cpp index 76353ed73..e0619d08f 100644 --- a/tests/msgpack/test_variant.cpp +++ b/tests/msgpack/test_variant.cpp @@ -1,7 +1,12 @@ #include -#include #include "write_and_read.hpp" +#include +#include + +import rfl.msgpack; +import rfl; + namespace test_variant { diff --git a/tests/msgpack/test_vectorstring.cpp b/tests/msgpack/test_vectorstring.cpp index 2a9dd7d43..360c4a9a8 100644 --- a/tests/msgpack/test_vectorstring.cpp +++ b/tests/msgpack/test_vectorstring.cpp @@ -1,6 +1,8 @@ -#include #include "write_and_read.hpp" +import rfl.msgpack; +import rfl; + namespace test_vectorstring { @@ -14,4 +16,4 @@ TEST(msgpack, test_vectorstring) { write_and_read(test); } -} // namespace test_vectorstring \ No newline at end of file +} // namespace test_vectorstring diff --git a/tests/msgpack/test_wstring.cpp b/tests/msgpack/test_wstring.cpp index f69be6d1c..9ffb5dce7 100644 --- a/tests/msgpack/test_wstring.cpp +++ b/tests/msgpack/test_wstring.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.msgpack; +import rfl; + struct TestStruct { std::string theNormalString; diff --git a/tests/msgpack/write_and_read.hpp b/tests/msgpack/write_and_read.hpp index 23b62820f..a3fcfd9ad 100644 --- a/tests/msgpack/write_and_read.hpp +++ b/tests/msgpack/write_and_read.hpp @@ -2,8 +2,11 @@ #define WRITE_AND_READ_ #include +#include + +import rfl.msgpack; + -#include template void write_and_read(const auto& _struct) { diff --git a/tests/parquet/CMakeLists.txt b/tests/parquet/CMakeLists.txt index 12caaa93e..dc5103ff2 100644 --- a/tests/parquet/CMakeLists.txt +++ b/tests/parquet/CMakeLists.txt @@ -6,7 +6,7 @@ add_executable( reflect-cpp-parquet-tests ${SOURCES} ) -target_precompile_headers(reflect-cpp-parquet-tests PRIVATE [["rfl.hpp"]] ) +target_precompile_headers(reflect-cpp-parquet-tests PRIVATE ) target_include_directories(reflect-cpp-parquet-tests SYSTEM PRIVATE "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include") diff --git a/tests/parquet/test_boolean.cpp b/tests/parquet/test_boolean.cpp index 8f8d125f0..2594c0993 100644 --- a/tests/parquet/test_boolean.cpp +++ b/tests/parquet/test_boolean.cpp @@ -1,8 +1,9 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.parquet; + namespace test_boolean { diff --git a/tests/parquet/test_box.cpp b/tests/parquet/test_box.cpp index 2a468b6dc..d4e25d36f 100644 --- a/tests/parquet/test_box.cpp +++ b/tests/parquet/test_box.cpp @@ -1,8 +1,9 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.parquet; + namespace test_box { diff --git a/tests/parquet/test_bytestring.cpp b/tests/parquet/test_bytestring.cpp index 56d85f1ee..be2e2c318 100644 --- a/tests/parquet/test_bytestring.cpp +++ b/tests/parquet/test_bytestring.cpp @@ -1,7 +1,10 @@ -#include #include #include "write_and_read.hpp" +#include + +import rfl.parquet; + namespace test_bytestring { diff --git a/tests/parquet/test_camel_case.cpp b/tests/parquet/test_camel_case.cpp index c36cfde53..db809408c 100644 --- a/tests/parquet/test_camel_case.cpp +++ b/tests/parquet/test_camel_case.cpp @@ -1,8 +1,9 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.parquet; + namespace test_camel_case { diff --git a/tests/parquet/test_deque.cpp b/tests/parquet/test_deque.cpp index 6fd0a6370..2935f67e3 100644 --- a/tests/parquet/test_deque.cpp +++ b/tests/parquet/test_deque.cpp @@ -1,8 +1,9 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.parquet; + namespace test_deque { diff --git a/tests/parquet/test_enums.cpp b/tests/parquet/test_enums.cpp index cc512606b..22c2a3f73 100644 --- a/tests/parquet/test_enums.cpp +++ b/tests/parquet/test_enums.cpp @@ -1,8 +1,9 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.parquet; + namespace test_enums { diff --git a/tests/parquet/test_flatten.cpp b/tests/parquet/test_flatten.cpp index 93c7345f1..71d22d079 100644 --- a/tests/parquet/test_flatten.cpp +++ b/tests/parquet/test_flatten.cpp @@ -1,8 +1,9 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.parquet; + namespace test_flatten { diff --git a/tests/parquet/test_gzip.cpp b/tests/parquet/test_gzip.cpp index cf600d89d..f50c7b9d8 100644 --- a/tests/parquet/test_gzip.cpp +++ b/tests/parquet/test_gzip.cpp @@ -1,8 +1,9 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.parquet; + namespace test_gzip { diff --git a/tests/parquet/test_literal.cpp b/tests/parquet/test_literal.cpp index ad021fb74..1b77a3ad7 100644 --- a/tests/parquet/test_literal.cpp +++ b/tests/parquet/test_literal.cpp @@ -1,8 +1,9 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.parquet; + namespace test_literal { diff --git a/tests/parquet/test_optionals.cpp b/tests/parquet/test_optionals.cpp index a070494b4..f7665f5f0 100644 --- a/tests/parquet/test_optionals.cpp +++ b/tests/parquet/test_optionals.cpp @@ -1,9 +1,10 @@ #include -#include #include #include #include "write_and_read.hpp" +import rfl.parquet; + namespace test_optionals { diff --git a/tests/parquet/test_readme_example.cpp b/tests/parquet/test_readme_example.cpp index 6a5b0db21..99acc4898 100644 --- a/tests/parquet/test_readme_example.cpp +++ b/tests/parquet/test_readme_example.cpp @@ -1,8 +1,9 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.parquet; + namespace test_readme_example { diff --git a/tests/parquet/test_ref.cpp b/tests/parquet/test_ref.cpp index a7e405b59..fca832c5e 100644 --- a/tests/parquet/test_ref.cpp +++ b/tests/parquet/test_ref.cpp @@ -1,8 +1,9 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.parquet; + namespace test_ref { diff --git a/tests/parquet/test_save_load.cpp b/tests/parquet/test_save_load.cpp index 3b5c0d41a..42fdebfe3 100644 --- a/tests/parquet/test_save_load.cpp +++ b/tests/parquet/test_save_load.cpp @@ -1,10 +1,11 @@ #include #include -#include -#include #include #include +import rfl; +import rfl.parquet; + namespace test_save_load { diff --git a/tests/parquet/test_shared_ptr.cpp b/tests/parquet/test_shared_ptr.cpp index dce923e77..fc5d92ea9 100644 --- a/tests/parquet/test_shared_ptr.cpp +++ b/tests/parquet/test_shared_ptr.cpp @@ -1,9 +1,10 @@ #include -#include #include #include #include "write_and_read.hpp" +import rfl.parquet; + namespace test_shared_ptr { diff --git a/tests/parquet/test_unique_ptr.cpp b/tests/parquet/test_unique_ptr.cpp index 18b7a5047..725f38457 100644 --- a/tests/parquet/test_unique_ptr.cpp +++ b/tests/parquet/test_unique_ptr.cpp @@ -1,9 +1,10 @@ #include -#include #include #include #include "write_and_read.hpp" +import rfl.parquet; + namespace test_unique_ptr { diff --git a/tests/parquet/write_and_read.hpp b/tests/parquet/write_and_read.hpp index 4ec554ea6..2fc2b0306 100644 --- a/tests/parquet/write_and_read.hpp +++ b/tests/parquet/write_and_read.hpp @@ -2,8 +2,11 @@ #define WRITE_AND_READ_ #include +#include + +import rfl.parquet; + -#include template void write_and_read(const auto& _vec, const rfl::parquet::Settings& _settings = diff --git a/tests/toml/CMakeLists.txt b/tests/toml/CMakeLists.txt index 994a60ca8..6b93a74a4 100644 --- a/tests/toml/CMakeLists.txt +++ b/tests/toml/CMakeLists.txt @@ -6,7 +6,7 @@ add_executable( reflect-cpp-toml-tests ${SOURCES} ) -target_precompile_headers(reflect-cpp-toml-tests PRIVATE [["rfl.hpp"]] ) +target_precompile_headers(reflect-cpp-toml-tests PRIVATE ) target_link_libraries(reflect-cpp-toml-tests PRIVATE reflectcpp_tests_crt) diff --git a/tests/toml/test_add_struct_name.cpp b/tests/toml/test_add_struct_name.cpp index de354e451..1c7d1f682 100644 --- a/tests/toml/test_add_struct_name.cpp +++ b/tests/toml/test_add_struct_name.cpp @@ -2,6 +2,7 @@ #include #include "write_and_read.hpp" +import rfl.toml; namespace test_add_struct_name { diff --git a/tests/toml/test_array.cpp b/tests/toml/test_array.cpp index 76b659610..4d96199da 100644 --- a/tests/toml/test_array.cpp +++ b/tests/toml/test_array.cpp @@ -1,13 +1,16 @@ #include #include -#include #include // Make sure things still compile when // rfl.hpp is included after rfl/cbor.hpp. -#include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.toml; + namespace test_array { diff --git a/tests/toml/test_box.cpp b/tests/toml/test_box.cpp index 724986deb..01cc473fc 100644 --- a/tests/toml/test_box.cpp +++ b/tests/toml/test_box.cpp @@ -1,7 +1,11 @@ #include -#include #include "write_and_read.hpp" +#include + +import rfl.toml; +import rfl; + namespace test_box { diff --git a/tests/toml/test_combined_processors.cpp b/tests/toml/test_combined_processors.cpp index 39aaf28be..4009fc5e3 100644 --- a/tests/toml/test_combined_processors.cpp +++ b/tests/toml/test_combined_processors.cpp @@ -2,6 +2,7 @@ #include #include "write_and_read.hpp" +import rfl.toml; namespace test_combined_processors { diff --git a/tests/toml/test_custom_class1.cpp b/tests/toml/test_custom_class1.cpp index e3109aedf..3bfb9eeb1 100644 --- a/tests/toml/test_custom_class1.cpp +++ b/tests/toml/test_custom_class1.cpp @@ -1,9 +1,11 @@ #include -#include #include #include #include "write_and_read.hpp" +import rfl.toml; +import rfl; + namespace test_custom_class1 { diff --git a/tests/toml/test_custom_class3.cpp b/tests/toml/test_custom_class3.cpp index c623f6f65..fda4a8e1d 100644 --- a/tests/toml/test_custom_class3.cpp +++ b/tests/toml/test_custom_class3.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.toml; +import rfl; + namespace test_custom_class3 { diff --git a/tests/toml/test_custom_class4.cpp b/tests/toml/test_custom_class4.cpp index 89b8b6a24..22b86e578 100644 --- a/tests/toml/test_custom_class4.cpp +++ b/tests/toml/test_custom_class4.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.toml; +import rfl; + namespace test_custom_class4 { diff --git a/tests/toml/test_default_values.cpp b/tests/toml/test_default_values.cpp index c68b8335f..d82724bc4 100644 --- a/tests/toml/test_default_values.cpp +++ b/tests/toml/test_default_values.cpp @@ -1,9 +1,11 @@ #include -#include #include #include #include "write_and_read.hpp" +import rfl.toml; +import rfl; + namespace test_default_values { diff --git a/tests/toml/test_deque.cpp b/tests/toml/test_deque.cpp index 8f6281881..b3929dd87 100644 --- a/tests/toml/test_deque.cpp +++ b/tests/toml/test_deque.cpp @@ -1,7 +1,13 @@ -#include #include #include "write_and_read.hpp" +#include +#include +#include + +import rfl.toml; +import rfl; + namespace test_deque { diff --git a/tests/toml/test_enum.cpp b/tests/toml/test_enum.cpp index a556b5ed3..cea42ac51 100644 --- a/tests/toml/test_enum.cpp +++ b/tests/toml/test_enum.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.toml; +import rfl; + namespace test_enum { diff --git a/tests/toml/test_field_variant.cpp b/tests/toml/test_field_variant.cpp index a1bf430cc..09576af5d 100644 --- a/tests/toml/test_field_variant.cpp +++ b/tests/toml/test_field_variant.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.toml; +import rfl; + namespace test_field_variant { diff --git a/tests/toml/test_flag_enum.cpp b/tests/toml/test_flag_enum.cpp index 6c8dd04b4..3654c2003 100644 --- a/tests/toml/test_flag_enum.cpp +++ b/tests/toml/test_flag_enum.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.toml; +import rfl; + namespace test_flag_enum { diff --git a/tests/toml/test_flag_enum_with_int.cpp b/tests/toml/test_flag_enum_with_int.cpp index b983d22f2..60f5fed7c 100644 --- a/tests/toml/test_flag_enum_with_int.cpp +++ b/tests/toml/test_flag_enum_with_int.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.toml; +import rfl; + namespace test_flag_enum_with_int { diff --git a/tests/toml/test_flatten.cpp b/tests/toml/test_flatten.cpp index 53f3df9fc..7aee5908d 100644 --- a/tests/toml/test_flatten.cpp +++ b/tests/toml/test_flatten.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.toml; +import rfl; + namespace test_flatten { diff --git a/tests/toml/test_flatten_anonymous.cpp b/tests/toml/test_flatten_anonymous.cpp index f4040a63a..ca44a8592 100644 --- a/tests/toml/test_flatten_anonymous.cpp +++ b/tests/toml/test_flatten_anonymous.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.toml; +import rfl; + namespace test_flatten_anonymous { diff --git a/tests/toml/test_forward_list.cpp b/tests/toml/test_forward_list.cpp index 6c9eba578..cc5bbef16 100644 --- a/tests/toml/test_forward_list.cpp +++ b/tests/toml/test_forward_list.cpp @@ -1,7 +1,13 @@ -#include #include #include "write_and_read.hpp" +#include +#include +#include + +import rfl.toml; +import rfl; + namespace test_forward_list { diff --git a/tests/toml/test_literal.cpp b/tests/toml/test_literal.cpp index da59008d6..2dd8888db 100644 --- a/tests/toml/test_literal.cpp +++ b/tests/toml/test_literal.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.toml; +import rfl; + namespace test_literal { diff --git a/tests/toml/test_literal_map.cpp b/tests/toml/test_literal_map.cpp index ee6c3f5a0..56d330308 100644 --- a/tests/toml/test_literal_map.cpp +++ b/tests/toml/test_literal_map.cpp @@ -1,9 +1,11 @@ #include #include -#include #include #include "write_and_read.hpp" +import rfl.toml; +import rfl; + namespace test_literal_map { diff --git a/tests/toml/test_map.cpp b/tests/toml/test_map.cpp index 7a42d8b4d..6bdd7cdd5 100644 --- a/tests/toml/test_map.cpp +++ b/tests/toml/test_map.cpp @@ -1,8 +1,12 @@ #include -#include #include #include "write_and_read.hpp" +#include + +import rfl.toml; +import rfl; + namespace test_map { diff --git a/tests/toml/test_map_with_key_validation.cpp b/tests/toml/test_map_with_key_validation.cpp index 205b5e73d..b07315987 100644 --- a/tests/toml/test_map_with_key_validation.cpp +++ b/tests/toml/test_map_with_key_validation.cpp @@ -1,8 +1,13 @@ #include -#include #include #include "write_and_read.hpp" +#include +#include + +import rfl.toml; +import rfl; + namespace test_map_with_key_validation { diff --git a/tests/toml/test_monster_example.cpp b/tests/toml/test_monster_example.cpp index 5d846df41..b39bec02b 100644 --- a/tests/toml/test_monster_example.cpp +++ b/tests/toml/test_monster_example.cpp @@ -1,8 +1,10 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.toml; +import rfl; + namespace test_monster_example { diff --git a/tests/toml/test_readme_example.cpp b/tests/toml/test_readme_example.cpp index a9f00fbfe..752abd425 100644 --- a/tests/toml/test_readme_example.cpp +++ b/tests/toml/test_readme_example.cpp @@ -1,8 +1,10 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.toml; +import rfl; + namespace test_readme_example { diff --git a/tests/toml/test_readme_example2.cpp b/tests/toml/test_readme_example2.cpp index b4407b483..b47dcc64f 100644 --- a/tests/toml/test_readme_example2.cpp +++ b/tests/toml/test_readme_example2.cpp @@ -1,7 +1,9 @@ -#include #include #include "write_and_read.hpp" +import rfl.toml; +import rfl; + namespace test_readme_example2 { diff --git a/tests/toml/test_ref.cpp b/tests/toml/test_ref.cpp index 7bec77f71..cf1461b44 100644 --- a/tests/toml/test_ref.cpp +++ b/tests/toml/test_ref.cpp @@ -1,7 +1,11 @@ #include -#include #include "write_and_read.hpp" +#include + +import rfl.toml; +import rfl; + namespace test_ref { diff --git a/tests/toml/test_regression_bugs.cpp b/tests/toml/test_regression_bugs.cpp index 97b6065ba..297d025ee 100644 --- a/tests/toml/test_regression_bugs.cpp +++ b/tests/toml/test_regression_bugs.cpp @@ -2,9 +2,12 @@ #include #include +#include + +import rfl; +import rfl.toml; + -#include -#include // toml::Writer — at_path() may return invalid node, as_table()/as_array() // returns nullptr diff --git a/tests/toml/test_save_load.cpp b/tests/toml/test_save_load.cpp index 81dd09d5f..8ffa1e653 100644 --- a/tests/toml/test_save_load.cpp +++ b/tests/toml/test_save_load.cpp @@ -1,10 +1,11 @@ #include -#include -#include #include #include #include +import rfl; +import rfl.toml; + namespace test_save_load { diff --git a/tests/toml/test_set.cpp b/tests/toml/test_set.cpp index 3814ac3da..c63ccffd9 100644 --- a/tests/toml/test_set.cpp +++ b/tests/toml/test_set.cpp @@ -1,7 +1,13 @@ -#include #include #include "write_and_read.hpp" +#include +#include +#include + +import rfl.toml; +import rfl; + namespace test_set { diff --git a/tests/toml/test_size.cpp b/tests/toml/test_size.cpp index f045ab806..3b0205af3 100644 --- a/tests/toml/test_size.cpp +++ b/tests/toml/test_size.cpp @@ -1,8 +1,10 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.toml; +import rfl; + namespace test_size { diff --git a/tests/toml/test_snake_case_to_camel_case.cpp b/tests/toml/test_snake_case_to_camel_case.cpp index 5aea8b53f..06f576cfd 100644 --- a/tests/toml/test_snake_case_to_camel_case.cpp +++ b/tests/toml/test_snake_case_to_camel_case.cpp @@ -2,6 +2,7 @@ #include #include "write_and_read.hpp" +import rfl.toml; namespace test_snake_case_to_camel_case { diff --git a/tests/toml/test_snake_case_to_pascal_case.cpp b/tests/toml/test_snake_case_to_pascal_case.cpp index 63e786b61..13b6d4881 100644 --- a/tests/toml/test_snake_case_to_pascal_case.cpp +++ b/tests/toml/test_snake_case_to_pascal_case.cpp @@ -2,6 +2,7 @@ #include #include "write_and_read.hpp" +import rfl.toml; namespace test_snake_case_to_pascal_case { diff --git a/tests/toml/test_string_map.cpp b/tests/toml/test_string_map.cpp index c7739a602..c67847782 100644 --- a/tests/toml/test_string_map.cpp +++ b/tests/toml/test_string_map.cpp @@ -1,9 +1,11 @@ #include #include -#include #include #include "write_and_read.hpp" +import rfl.toml; +import rfl; + namespace test_string_map { TEST(toml, test_string_map) { diff --git a/tests/toml/test_tagged_union.cpp b/tests/toml/test_tagged_union.cpp index 4b14c5432..bf0fca3d1 100644 --- a/tests/toml/test_tagged_union.cpp +++ b/tests/toml/test_tagged_union.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.toml; +import rfl; + namespace test_tagged_union { diff --git a/tests/toml/test_timestamp.cpp b/tests/toml/test_timestamp.cpp index b8fb0c3fc..379003e48 100644 --- a/tests/toml/test_timestamp.cpp +++ b/tests/toml/test_timestamp.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.toml; +import rfl; + namespace test_timestamp { diff --git a/tests/toml/test_unique_ptr.cpp b/tests/toml/test_unique_ptr.cpp index f1ab2cad5..7d2d31f61 100644 --- a/tests/toml/test_unique_ptr.cpp +++ b/tests/toml/test_unique_ptr.cpp @@ -1,9 +1,13 @@ #include -#include #include #include #include "write_and_read.hpp" +#include + +import rfl.toml; +import rfl; + namespace test_unique_ptr { diff --git a/tests/toml/test_unique_ptr2.cpp b/tests/toml/test_unique_ptr2.cpp index 294e3b2af..6953e9d81 100644 --- a/tests/toml/test_unique_ptr2.cpp +++ b/tests/toml/test_unique_ptr2.cpp @@ -1,7 +1,12 @@ #include -#include #include "write_and_read.hpp" +#include +#include + +import rfl.toml; +import rfl; + namespace test_unique_ptr2 { diff --git a/tests/toml/test_variant.cpp b/tests/toml/test_variant.cpp index 5812a5d5c..7d9afd408 100644 --- a/tests/toml/test_variant.cpp +++ b/tests/toml/test_variant.cpp @@ -1,7 +1,12 @@ #include -#include #include "write_and_read.hpp" +#include +#include + +import rfl.toml; +import rfl; + namespace test_variant { diff --git a/tests/toml/test_wstring.cpp b/tests/toml/test_wstring.cpp index 6dccf6901..933c031c9 100644 --- a/tests/toml/test_wstring.cpp +++ b/tests/toml/test_wstring.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.toml; +import rfl; + struct TestStruct { std::string theNormalString; diff --git a/tests/toml/write_and_read.hpp b/tests/toml/write_and_read.hpp index c7c53c840..6d2e98e83 100644 --- a/tests/toml/write_and_read.hpp +++ b/tests/toml/write_and_read.hpp @@ -2,8 +2,12 @@ #define WRITE_AND_READ_ #include +#include +#include + +import rfl.toml; + -#include template void write_and_read(const auto& _struct) { diff --git a/tests/ubjson/CMakeLists.txt b/tests/ubjson/CMakeLists.txt index ed5ffcac0..35a7b81f0 100644 --- a/tests/ubjson/CMakeLists.txt +++ b/tests/ubjson/CMakeLists.txt @@ -6,7 +6,7 @@ add_executable( reflect-cpp-ubjson-tests ${SOURCES} ) -target_precompile_headers(reflect-cpp-ubjson-tests PRIVATE [["rfl.hpp"]] ) +target_precompile_headers(reflect-cpp-ubjson-tests PRIVATE ) target_link_libraries(reflect-cpp-ubjson-tests PRIVATE reflectcpp_tests_crt) diff --git a/tests/ubjson/test_add_struct_name.cpp b/tests/ubjson/test_add_struct_name.cpp index 08faff5e3..b182a280f 100644 --- a/tests/ubjson/test_add_struct_name.cpp +++ b/tests/ubjson/test_add_struct_name.cpp @@ -2,6 +2,7 @@ #include #include "write_and_read.hpp" +import rfl.ubjson; namespace test_add_struct_name { diff --git a/tests/ubjson/test_array.cpp b/tests/ubjson/test_array.cpp index 5c6808868..6a9ba91fb 100644 --- a/tests/ubjson/test_array.cpp +++ b/tests/ubjson/test_array.cpp @@ -1,13 +1,16 @@ #include #include -#include #include // Make sure things still compile when // rfl.hpp is included after rfl/ubjson.hpp. -#include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.ubjson; + namespace test_array { diff --git a/tests/ubjson/test_box.cpp b/tests/ubjson/test_box.cpp index 13431adcc..8663b9313 100644 --- a/tests/ubjson/test_box.cpp +++ b/tests/ubjson/test_box.cpp @@ -1,7 +1,11 @@ #include -#include #include "write_and_read.hpp" +#include + +import rfl.ubjson; +import rfl; + namespace test_box { diff --git a/tests/ubjson/test_bytestring.cpp b/tests/ubjson/test_bytestring.cpp index a0eb74bbd..cd52cc4b4 100644 --- a/tests/ubjson/test_bytestring.cpp +++ b/tests/ubjson/test_bytestring.cpp @@ -1,6 +1,10 @@ -#include #include "write_and_read.hpp" +#include + +import rfl.ubjson; +import rfl; + namespace test_bytestring { diff --git a/tests/ubjson/test_combined_processors.cpp b/tests/ubjson/test_combined_processors.cpp index 2ad0e5af8..ae4b5e034 100644 --- a/tests/ubjson/test_combined_processors.cpp +++ b/tests/ubjson/test_combined_processors.cpp @@ -2,6 +2,7 @@ #include #include "write_and_read.hpp" +import rfl.ubjson; namespace test_combined_processors { diff --git a/tests/ubjson/test_custom_class1.cpp b/tests/ubjson/test_custom_class1.cpp index b187e1f71..213eb6615 100644 --- a/tests/ubjson/test_custom_class1.cpp +++ b/tests/ubjson/test_custom_class1.cpp @@ -1,9 +1,11 @@ #include -#include #include #include #include "write_and_read.hpp" +import rfl.ubjson; +import rfl; + namespace test_custom_class1 { diff --git a/tests/ubjson/test_custom_class3.cpp b/tests/ubjson/test_custom_class3.cpp index 4dd84fe31..661350619 100644 --- a/tests/ubjson/test_custom_class3.cpp +++ b/tests/ubjson/test_custom_class3.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.ubjson; +import rfl; + namespace test_custom_class3 { diff --git a/tests/ubjson/test_custom_class4.cpp b/tests/ubjson/test_custom_class4.cpp index e3aacdf1a..d005287ec 100644 --- a/tests/ubjson/test_custom_class4.cpp +++ b/tests/ubjson/test_custom_class4.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.ubjson; +import rfl; + namespace test_custom_class4 { diff --git a/tests/ubjson/test_default_values.cpp b/tests/ubjson/test_default_values.cpp index 4d8899805..44b69f6fa 100644 --- a/tests/ubjson/test_default_values.cpp +++ b/tests/ubjson/test_default_values.cpp @@ -1,9 +1,11 @@ #include -#include #include #include #include "write_and_read.hpp" +import rfl.ubjson; +import rfl; + namespace test_default_values { diff --git a/tests/ubjson/test_deque.cpp b/tests/ubjson/test_deque.cpp index 00021f2e2..2d6f227cc 100644 --- a/tests/ubjson/test_deque.cpp +++ b/tests/ubjson/test_deque.cpp @@ -1,7 +1,13 @@ -#include #include #include "write_and_read.hpp" +#include +#include +#include + +import rfl.ubjson; +import rfl; + namespace test_deque { diff --git a/tests/ubjson/test_enum.cpp b/tests/ubjson/test_enum.cpp index cdfda67fe..2d58eef69 100644 --- a/tests/ubjson/test_enum.cpp +++ b/tests/ubjson/test_enum.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.ubjson; +import rfl; + namespace test_enum { diff --git a/tests/ubjson/test_error_messages.cpp b/tests/ubjson/test_error_messages.cpp index 6d19f2567..b48b66a68 100644 --- a/tests/ubjson/test_error_messages.cpp +++ b/tests/ubjson/test_error_messages.cpp @@ -1,10 +1,11 @@ #include -#include -#include -#include #include #include +import rfl; +import rfl.json; +import rfl.ubjson; + namespace test_error_messages { diff --git a/tests/ubjson/test_extra_fields.cpp b/tests/ubjson/test_extra_fields.cpp index 04cc5b76e..a4725cf55 100644 --- a/tests/ubjson/test_extra_fields.cpp +++ b/tests/ubjson/test_extra_fields.cpp @@ -1,7 +1,9 @@ -#include #include #include "write_and_read.hpp" +import rfl.ubjson; +import rfl; + namespace test_extra_fields { diff --git a/tests/ubjson/test_field_variant.cpp b/tests/ubjson/test_field_variant.cpp index 041ec2eba..90f0e43d0 100644 --- a/tests/ubjson/test_field_variant.cpp +++ b/tests/ubjson/test_field_variant.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.ubjson; +import rfl; + namespace test_field_variant { diff --git a/tests/ubjson/test_flag_enum.cpp b/tests/ubjson/test_flag_enum.cpp index 580979fca..4abacda5d 100644 --- a/tests/ubjson/test_flag_enum.cpp +++ b/tests/ubjson/test_flag_enum.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.ubjson; +import rfl; + namespace test_flag_enum { diff --git a/tests/ubjson/test_flag_enum_with_int.cpp b/tests/ubjson/test_flag_enum_with_int.cpp index 15da8931a..64cdc685f 100644 --- a/tests/ubjson/test_flag_enum_with_int.cpp +++ b/tests/ubjson/test_flag_enum_with_int.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.ubjson; +import rfl; + namespace test_flag_enum_with_int { diff --git a/tests/ubjson/test_flatten.cpp b/tests/ubjson/test_flatten.cpp index 75eb6ec93..a970c680f 100644 --- a/tests/ubjson/test_flatten.cpp +++ b/tests/ubjson/test_flatten.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.ubjson; +import rfl; + namespace test_flatten { diff --git a/tests/ubjson/test_flatten_anonymous.cpp b/tests/ubjson/test_flatten_anonymous.cpp index 56e82cc25..b5e38d5b0 100644 --- a/tests/ubjson/test_flatten_anonymous.cpp +++ b/tests/ubjson/test_flatten_anonymous.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.ubjson; +import rfl; + namespace test_flatten_anonymous { diff --git a/tests/ubjson/test_forward_list.cpp b/tests/ubjson/test_forward_list.cpp index 12282ffdf..40f8c5963 100644 --- a/tests/ubjson/test_forward_list.cpp +++ b/tests/ubjson/test_forward_list.cpp @@ -1,7 +1,13 @@ -#include #include #include "write_and_read.hpp" +#include +#include +#include + +import rfl.ubjson; +import rfl; + namespace test_forward_list { diff --git a/tests/ubjson/test_literal.cpp b/tests/ubjson/test_literal.cpp index cb096741b..ddc2d02c6 100644 --- a/tests/ubjson/test_literal.cpp +++ b/tests/ubjson/test_literal.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.ubjson; +import rfl; + namespace test_literal { diff --git a/tests/ubjson/test_literal_map.cpp b/tests/ubjson/test_literal_map.cpp index 27e4a609a..53cc7d3bb 100644 --- a/tests/ubjson/test_literal_map.cpp +++ b/tests/ubjson/test_literal_map.cpp @@ -1,9 +1,11 @@ #include #include -#include #include #include "write_and_read.hpp" +import rfl.ubjson; +import rfl; + namespace test_literal_map { diff --git a/tests/ubjson/test_map.cpp b/tests/ubjson/test_map.cpp index 309638bfe..ff68e3436 100644 --- a/tests/ubjson/test_map.cpp +++ b/tests/ubjson/test_map.cpp @@ -1,8 +1,12 @@ #include -#include #include #include "write_and_read.hpp" +#include + +import rfl.ubjson; +import rfl; + namespace test_map { diff --git a/tests/ubjson/test_map_with_key_validation.cpp b/tests/ubjson/test_map_with_key_validation.cpp index fc6a26353..00cb0f3b0 100644 --- a/tests/ubjson/test_map_with_key_validation.cpp +++ b/tests/ubjson/test_map_with_key_validation.cpp @@ -1,8 +1,13 @@ #include -#include #include #include "write_and_read.hpp" +#include +#include + +import rfl.ubjson; +import rfl; + namespace test_map_with_key_validation { diff --git a/tests/ubjson/test_monster_example.cpp b/tests/ubjson/test_monster_example.cpp index 0de32ead8..d87f75913 100644 --- a/tests/ubjson/test_monster_example.cpp +++ b/tests/ubjson/test_monster_example.cpp @@ -1,8 +1,10 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.ubjson; +import rfl; + namespace test_monster_example { diff --git a/tests/ubjson/test_read_byte_containers.cpp b/tests/ubjson/test_read_byte_containers.cpp index ee78a3fe2..bdd5746b0 100644 --- a/tests/ubjson/test_read_byte_containers.cpp +++ b/tests/ubjson/test_read_byte_containers.cpp @@ -1,12 +1,17 @@ #include #include -#include #include +#include +#include +#include + +import rfl; +import rfl.ubjson; + // Make sure things still compile when // rfl.hpp is included after rfl/ubjson.hpp. -#include namespace test_read_byte_containers { diff --git a/tests/ubjson/test_readme_example.cpp b/tests/ubjson/test_readme_example.cpp index a64bfe954..f9cc8f779 100644 --- a/tests/ubjson/test_readme_example.cpp +++ b/tests/ubjson/test_readme_example.cpp @@ -1,8 +1,10 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.ubjson; +import rfl; + namespace test_readme_example { diff --git a/tests/ubjson/test_readme_example2.cpp b/tests/ubjson/test_readme_example2.cpp index 0cf3bcb36..6139e5a62 100644 --- a/tests/ubjson/test_readme_example2.cpp +++ b/tests/ubjson/test_readme_example2.cpp @@ -1,7 +1,9 @@ -#include #include #include "write_and_read.hpp" +import rfl.ubjson; +import rfl; + namespace test_readme_example2 { diff --git a/tests/ubjson/test_ref.cpp b/tests/ubjson/test_ref.cpp index ca7a15c0a..36288ae5e 100644 --- a/tests/ubjson/test_ref.cpp +++ b/tests/ubjson/test_ref.cpp @@ -1,7 +1,11 @@ #include -#include #include "write_and_read.hpp" +#include + +import rfl.ubjson; +import rfl; + namespace test_ref { diff --git a/tests/ubjson/test_save_load.cpp b/tests/ubjson/test_save_load.cpp index 28159abb4..05d3e45fc 100644 --- a/tests/ubjson/test_save_load.cpp +++ b/tests/ubjson/test_save_load.cpp @@ -1,10 +1,11 @@ #include -#include -#include #include #include #include +import rfl; +import rfl.ubjson; + namespace test_save_load { diff --git a/tests/ubjson/test_set.cpp b/tests/ubjson/test_set.cpp index 8da87e05c..c90d545fe 100644 --- a/tests/ubjson/test_set.cpp +++ b/tests/ubjson/test_set.cpp @@ -1,7 +1,13 @@ -#include #include #include "write_and_read.hpp" +#include +#include +#include + +import rfl.ubjson; +import rfl; + namespace test_set { diff --git a/tests/ubjson/test_size.cpp b/tests/ubjson/test_size.cpp index 67d1ad00d..1cb472cab 100644 --- a/tests/ubjson/test_size.cpp +++ b/tests/ubjson/test_size.cpp @@ -1,8 +1,10 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.ubjson; +import rfl; + namespace test_size { diff --git a/tests/ubjson/test_snake_case_to_camel_case.cpp b/tests/ubjson/test_snake_case_to_camel_case.cpp index 58a4c923b..bd0df7858 100644 --- a/tests/ubjson/test_snake_case_to_camel_case.cpp +++ b/tests/ubjson/test_snake_case_to_camel_case.cpp @@ -2,6 +2,7 @@ #include #include "write_and_read.hpp" +import rfl.ubjson; namespace test_snake_case_to_camel_case { diff --git a/tests/ubjson/test_snake_case_to_pascal_case.cpp b/tests/ubjson/test_snake_case_to_pascal_case.cpp index 88142619f..a21053324 100644 --- a/tests/ubjson/test_snake_case_to_pascal_case.cpp +++ b/tests/ubjson/test_snake_case_to_pascal_case.cpp @@ -2,6 +2,7 @@ #include #include "write_and_read.hpp" +import rfl.ubjson; namespace test_snake_case_to_pascal_case { diff --git a/tests/ubjson/test_string_map.cpp b/tests/ubjson/test_string_map.cpp index 5803989a6..2b757a3a1 100644 --- a/tests/ubjson/test_string_map.cpp +++ b/tests/ubjson/test_string_map.cpp @@ -1,9 +1,11 @@ #include #include -#include #include #include "write_and_read.hpp" +import rfl.ubjson; +import rfl; + namespace test_string_map { TEST(ubjson, test_string_map) { diff --git a/tests/ubjson/test_tagged_union.cpp b/tests/ubjson/test_tagged_union.cpp index 654b5cd15..177a6a214 100644 --- a/tests/ubjson/test_tagged_union.cpp +++ b/tests/ubjson/test_tagged_union.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.ubjson; +import rfl; + namespace test_tagged_union { diff --git a/tests/ubjson/test_tagged_union2.cpp b/tests/ubjson/test_tagged_union2.cpp index 906ee14e8..2556074f0 100644 --- a/tests/ubjson/test_tagged_union2.cpp +++ b/tests/ubjson/test_tagged_union2.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.ubjson; +import rfl; + namespace test_tagged_union2 { diff --git a/tests/ubjson/test_timestamp.cpp b/tests/ubjson/test_timestamp.cpp index 26f3ad105..eaa35a6b3 100644 --- a/tests/ubjson/test_timestamp.cpp +++ b/tests/ubjson/test_timestamp.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.ubjson; +import rfl; + namespace test_timestamp { diff --git a/tests/ubjson/test_unique_ptr.cpp b/tests/ubjson/test_unique_ptr.cpp index 04594545b..7098742ec 100644 --- a/tests/ubjson/test_unique_ptr.cpp +++ b/tests/ubjson/test_unique_ptr.cpp @@ -1,9 +1,13 @@ #include -#include #include #include #include "write_and_read.hpp" +#include + +import rfl.ubjson; +import rfl; + namespace test_unique_ptr { diff --git a/tests/ubjson/test_unique_ptr2.cpp b/tests/ubjson/test_unique_ptr2.cpp index fa9d48c71..aeb98469c 100644 --- a/tests/ubjson/test_unique_ptr2.cpp +++ b/tests/ubjson/test_unique_ptr2.cpp @@ -1,7 +1,12 @@ #include -#include #include "write_and_read.hpp" +#include +#include + +import rfl.ubjson; +import rfl; + namespace test_unique_ptr2 { diff --git a/tests/ubjson/test_variant.cpp b/tests/ubjson/test_variant.cpp index 604ffbf02..c2227a4db 100644 --- a/tests/ubjson/test_variant.cpp +++ b/tests/ubjson/test_variant.cpp @@ -1,7 +1,12 @@ #include -#include #include "write_and_read.hpp" +#include +#include + +import rfl.ubjson; +import rfl; + namespace test_variant { diff --git a/tests/ubjson/test_vectorstring.cpp b/tests/ubjson/test_vectorstring.cpp index 4e1f6a367..2d800ad24 100644 --- a/tests/ubjson/test_vectorstring.cpp +++ b/tests/ubjson/test_vectorstring.cpp @@ -1,6 +1,8 @@ -#include #include "write_and_read.hpp" +import rfl.ubjson; +import rfl; + namespace test_vectorstring { @@ -14,4 +16,4 @@ TEST(ubjson, test_vectorstring) { write_and_read(test); } -} // namespace test_vectorstring \ No newline at end of file +} // namespace test_vectorstring diff --git a/tests/ubjson/test_wstring.cpp b/tests/ubjson/test_wstring.cpp index 07bbe3fd0..77cab113f 100644 --- a/tests/ubjson/test_wstring.cpp +++ b/tests/ubjson/test_wstring.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.ubjson; +import rfl; + struct TestStruct { std::string theNormalString; diff --git a/tests/ubjson/write_and_read.hpp b/tests/ubjson/write_and_read.hpp index dd9aed63c..b5f4462f3 100644 --- a/tests/ubjson/write_and_read.hpp +++ b/tests/ubjson/write_and_read.hpp @@ -2,8 +2,11 @@ #define WRITE_AND_READ_ #include +#include + +import rfl.ubjson; + -#include template void write_and_read(const auto& _struct) { diff --git a/tests/xml/CMakeLists.txt b/tests/xml/CMakeLists.txt index 522c07156..07daacd7a 100644 --- a/tests/xml/CMakeLists.txt +++ b/tests/xml/CMakeLists.txt @@ -6,7 +6,7 @@ add_executable( reflect-cpp-xml-tests ${SOURCES} ) -target_precompile_headers(reflect-cpp-xml-tests PRIVATE [["rfl.hpp"]] ) +target_precompile_headers(reflect-cpp-xml-tests PRIVATE ) target_include_directories(reflect-cpp-xml-tests SYSTEM PRIVATE "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include") diff --git a/tests/xml/test_add_struct_name.cpp b/tests/xml/test_add_struct_name.cpp index 0f0819fac..96e9c36c9 100644 --- a/tests/xml/test_add_struct_name.cpp +++ b/tests/xml/test_add_struct_name.cpp @@ -2,6 +2,7 @@ #include #include "write_and_read.hpp" +import rfl.xml; namespace test_add_struct_name { diff --git a/tests/xml/test_array.cpp b/tests/xml/test_array.cpp index 8d5f6f1fb..5d8de57cc 100644 --- a/tests/xml/test_array.cpp +++ b/tests/xml/test_array.cpp @@ -1,13 +1,16 @@ #include #include -#include #include // Make sure things still compile when // rfl.hpp is included after rfl/cbor.hpp. -#include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.xml; + namespace test_array { diff --git a/tests/xml/test_attribute_rename.cpp b/tests/xml/test_attribute_rename.cpp index 22be8e9a8..c6f80db2a 100644 --- a/tests/xml/test_attribute_rename.cpp +++ b/tests/xml/test_attribute_rename.cpp @@ -1,8 +1,10 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.xml; +import rfl; + namespace test_attribute_rename { diff --git a/tests/xml/test_box.cpp b/tests/xml/test_box.cpp index 969b2d2f6..785af5bda 100644 --- a/tests/xml/test_box.cpp +++ b/tests/xml/test_box.cpp @@ -1,7 +1,11 @@ #include -#include #include "write_and_read.hpp" +#include + +import rfl.xml; +import rfl; + namespace test_box { diff --git a/tests/xml/test_combined_processors.cpp b/tests/xml/test_combined_processors.cpp index 38022a385..26e398cad 100644 --- a/tests/xml/test_combined_processors.cpp +++ b/tests/xml/test_combined_processors.cpp @@ -2,6 +2,7 @@ #include #include "write_and_read.hpp" +import rfl.xml; namespace test_combined_processors { diff --git a/tests/xml/test_comment.cpp b/tests/xml/test_comment.cpp index 5416ad530..414a334a9 100644 --- a/tests/xml/test_comment.cpp +++ b/tests/xml/test_comment.cpp @@ -1,8 +1,10 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.xml; +import rfl; + namespace test_comment { diff --git a/tests/xml/test_custom_class1.cpp b/tests/xml/test_custom_class1.cpp index a3b708875..bd110c12f 100644 --- a/tests/xml/test_custom_class1.cpp +++ b/tests/xml/test_custom_class1.cpp @@ -1,9 +1,11 @@ #include -#include #include #include #include "write_and_read.hpp" +import rfl.xml; +import rfl; + namespace test_custom_class1 { diff --git a/tests/xml/test_custom_class3.cpp b/tests/xml/test_custom_class3.cpp index 88c529699..a33a7f4e8 100644 --- a/tests/xml/test_custom_class3.cpp +++ b/tests/xml/test_custom_class3.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.xml; +import rfl; + namespace test_custom_class3 { diff --git a/tests/xml/test_custom_class4.cpp b/tests/xml/test_custom_class4.cpp index 493b58c11..9c534ca13 100644 --- a/tests/xml/test_custom_class4.cpp +++ b/tests/xml/test_custom_class4.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.xml; +import rfl; + namespace test_custom_class4 { diff --git a/tests/xml/test_default_if_missing.cpp b/tests/xml/test_default_if_missing.cpp index 36c3bbb9a..6d8f6503e 100644 --- a/tests/xml/test_default_if_missing.cpp +++ b/tests/xml/test_default_if_missing.cpp @@ -1,10 +1,12 @@ #include -#include -#include #include #include #include "write_and_read.hpp" +import rfl.xml; +import rfl; +import rfl.json; + namespace test_default_if_missing { diff --git a/tests/xml/test_default_values.cpp b/tests/xml/test_default_values.cpp index 19e8da67e..c738b2203 100644 --- a/tests/xml/test_default_values.cpp +++ b/tests/xml/test_default_values.cpp @@ -1,9 +1,11 @@ #include -#include #include #include #include "write_and_read.hpp" +import rfl.xml; +import rfl; + namespace test_default_values { diff --git a/tests/xml/test_deque.cpp b/tests/xml/test_deque.cpp index 57876ed8b..c65b3b2a2 100644 --- a/tests/xml/test_deque.cpp +++ b/tests/xml/test_deque.cpp @@ -1,7 +1,13 @@ -#include #include #include "write_and_read.hpp" +#include +#include +#include + +import rfl.xml; +import rfl; + namespace test_deque { diff --git a/tests/xml/test_enum.cpp b/tests/xml/test_enum.cpp index 662ecf676..d741cc0c4 100644 --- a/tests/xml/test_enum.cpp +++ b/tests/xml/test_enum.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.xml; +import rfl; + namespace test_enum { diff --git a/tests/xml/test_field_variant.cpp b/tests/xml/test_field_variant.cpp index c6d85a8cf..ca1d8112b 100644 --- a/tests/xml/test_field_variant.cpp +++ b/tests/xml/test_field_variant.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.xml; +import rfl; + namespace test_field_variant { diff --git a/tests/xml/test_flag_enum.cpp b/tests/xml/test_flag_enum.cpp index 4bb39c8a3..d8d423f3b 100644 --- a/tests/xml/test_flag_enum.cpp +++ b/tests/xml/test_flag_enum.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.xml; +import rfl; + namespace test_flag_enum { diff --git a/tests/xml/test_flag_enum_with_int.cpp b/tests/xml/test_flag_enum_with_int.cpp index 410ecd5aa..7ae02731b 100644 --- a/tests/xml/test_flag_enum_with_int.cpp +++ b/tests/xml/test_flag_enum_with_int.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.xml; +import rfl; + namespace test_flag_enum_with_int { diff --git a/tests/xml/test_flatten.cpp b/tests/xml/test_flatten.cpp index a144acae8..e9aaf5365 100644 --- a/tests/xml/test_flatten.cpp +++ b/tests/xml/test_flatten.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.xml; +import rfl; + namespace test_flatten { diff --git a/tests/xml/test_flatten_anonymous.cpp b/tests/xml/test_flatten_anonymous.cpp index 04bab2b2e..22f7beeeb 100644 --- a/tests/xml/test_flatten_anonymous.cpp +++ b/tests/xml/test_flatten_anonymous.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.xml; +import rfl; + namespace test_flatten_anonymous { diff --git a/tests/xml/test_forward_list.cpp b/tests/xml/test_forward_list.cpp index e2294378e..6ac1ef67a 100644 --- a/tests/xml/test_forward_list.cpp +++ b/tests/xml/test_forward_list.cpp @@ -1,7 +1,13 @@ -#include #include #include "write_and_read.hpp" +#include +#include +#include + +import rfl.xml; +import rfl; + namespace test_forward_list { diff --git a/tests/xml/test_generic.cpp b/tests/xml/test_generic.cpp index eac439bb7..3f5a28d47 100644 --- a/tests/xml/test_generic.cpp +++ b/tests/xml/test_generic.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.xml; +import rfl; + namespace test_generic { diff --git a/tests/xml/test_literal.cpp b/tests/xml/test_literal.cpp index cf37158fb..eaeaa1394 100644 --- a/tests/xml/test_literal.cpp +++ b/tests/xml/test_literal.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.xml; +import rfl; + namespace test_literal { diff --git a/tests/xml/test_literal_map.cpp b/tests/xml/test_literal_map.cpp index 170da0946..063183c3d 100644 --- a/tests/xml/test_literal_map.cpp +++ b/tests/xml/test_literal_map.cpp @@ -1,9 +1,11 @@ #include #include -#include #include #include "write_and_read.hpp" +import rfl.xml; +import rfl; + namespace test_literal_map { diff --git a/tests/xml/test_map.cpp b/tests/xml/test_map.cpp index de38548d4..0b153a39c 100644 --- a/tests/xml/test_map.cpp +++ b/tests/xml/test_map.cpp @@ -1,8 +1,12 @@ #include -#include #include #include "write_and_read.hpp" +#include + +import rfl.xml; +import rfl; + namespace test_map { diff --git a/tests/xml/test_map_with_key_validation.cpp b/tests/xml/test_map_with_key_validation.cpp index 646ecb033..a87c4445d 100644 --- a/tests/xml/test_map_with_key_validation.cpp +++ b/tests/xml/test_map_with_key_validation.cpp @@ -1,8 +1,13 @@ #include -#include #include #include "write_and_read.hpp" +#include +#include + +import rfl.xml; +import rfl; + namespace test_map_with_key_validation { diff --git a/tests/xml/test_monster_example.cpp b/tests/xml/test_monster_example.cpp index 910b76e52..0e351c522 100644 --- a/tests/xml/test_monster_example.cpp +++ b/tests/xml/test_monster_example.cpp @@ -1,8 +1,10 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.xml; +import rfl; + namespace test_monster_example { diff --git a/tests/xml/test_readme_example.cpp b/tests/xml/test_readme_example.cpp index 8ef27abcd..7e24bb10a 100644 --- a/tests/xml/test_readme_example.cpp +++ b/tests/xml/test_readme_example.cpp @@ -1,8 +1,10 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.xml; +import rfl; + namespace test_readme_example { diff --git a/tests/xml/test_readme_example2.cpp b/tests/xml/test_readme_example2.cpp index b16b7b6de..2856565ad 100644 --- a/tests/xml/test_readme_example2.cpp +++ b/tests/xml/test_readme_example2.cpp @@ -1,7 +1,9 @@ -#include #include #include "write_and_read.hpp" +import rfl.xml; +import rfl; + namespace test_readme_example2 { diff --git a/tests/xml/test_ref.cpp b/tests/xml/test_ref.cpp index 320ce0692..2ed9a03ea 100644 --- a/tests/xml/test_ref.cpp +++ b/tests/xml/test_ref.cpp @@ -1,7 +1,11 @@ #include -#include #include "write_and_read.hpp" +#include + +import rfl.xml; +import rfl; + namespace test_ref { diff --git a/tests/xml/test_regression_bugs.cpp b/tests/xml/test_regression_bugs.cpp index aa089a422..9c2c72fd3 100644 --- a/tests/xml/test_regression_bugs.cpp +++ b/tests/xml/test_regression_bugs.cpp @@ -3,9 +3,10 @@ #include #include #include +import rfl; +import rfl.xml; + -#include -#include // xml::Reader::to_basic_type uses std::stoi for all integral types // File: include/rfl/xml/Reader.hpp:99-105 diff --git a/tests/xml/test_save_load.cpp b/tests/xml/test_save_load.cpp index c1a7ad566..dfbf3c897 100644 --- a/tests/xml/test_save_load.cpp +++ b/tests/xml/test_save_load.cpp @@ -1,10 +1,11 @@ #include -#include -#include #include #include #include +import rfl; +import rfl.xml; + namespace test_save_load { diff --git a/tests/xml/test_set.cpp b/tests/xml/test_set.cpp index 49025c958..d6e8d7d66 100644 --- a/tests/xml/test_set.cpp +++ b/tests/xml/test_set.cpp @@ -1,7 +1,13 @@ -#include #include #include "write_and_read.hpp" +#include +#include +#include + +import rfl.xml; +import rfl; + namespace test_set { diff --git a/tests/xml/test_size.cpp b/tests/xml/test_size.cpp index 30429a90e..2120e1788 100644 --- a/tests/xml/test_size.cpp +++ b/tests/xml/test_size.cpp @@ -1,8 +1,10 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.xml; +import rfl; + namespace test_size { diff --git a/tests/xml/test_snake_case_to_camel_case.cpp b/tests/xml/test_snake_case_to_camel_case.cpp index 8fb5f6b80..b1f0641f2 100644 --- a/tests/xml/test_snake_case_to_camel_case.cpp +++ b/tests/xml/test_snake_case_to_camel_case.cpp @@ -2,6 +2,7 @@ #include #include "write_and_read.hpp" +import rfl.xml; namespace test_snake_case_to_camel_case { diff --git a/tests/xml/test_snake_case_to_pascal_case.cpp b/tests/xml/test_snake_case_to_pascal_case.cpp index 86cd8ef24..33791aaed 100644 --- a/tests/xml/test_snake_case_to_pascal_case.cpp +++ b/tests/xml/test_snake_case_to_pascal_case.cpp @@ -2,6 +2,7 @@ #include #include "write_and_read.hpp" +import rfl.xml; namespace test_snake_case_to_pascal_case { diff --git a/tests/xml/test_string_map.cpp b/tests/xml/test_string_map.cpp index 1cb5f2809..6a94c292e 100644 --- a/tests/xml/test_string_map.cpp +++ b/tests/xml/test_string_map.cpp @@ -1,9 +1,11 @@ #include #include -#include #include #include "write_and_read.hpp" +import rfl.xml; +import rfl; + namespace test_string_map { TEST(xml, test_string_map) { diff --git a/tests/xml/test_tagged_union.cpp b/tests/xml/test_tagged_union.cpp index 5c3c8348b..812164e6d 100644 --- a/tests/xml/test_tagged_union.cpp +++ b/tests/xml/test_tagged_union.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.xml; +import rfl; + namespace test_tagged_union { diff --git a/tests/xml/test_timestamp.cpp b/tests/xml/test_timestamp.cpp index 2566596cf..186124996 100644 --- a/tests/xml/test_timestamp.cpp +++ b/tests/xml/test_timestamp.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.xml; +import rfl; + namespace test_timestamp { diff --git a/tests/xml/test_unique_ptr.cpp b/tests/xml/test_unique_ptr.cpp index 41e9d46f1..95ffde01b 100644 --- a/tests/xml/test_unique_ptr.cpp +++ b/tests/xml/test_unique_ptr.cpp @@ -1,9 +1,13 @@ #include -#include #include #include #include "write_and_read.hpp" +#include + +import rfl.xml; +import rfl; + namespace test_unique_ptr { diff --git a/tests/xml/test_unique_ptr2.cpp b/tests/xml/test_unique_ptr2.cpp index 2d209d4e6..0d0122491 100644 --- a/tests/xml/test_unique_ptr2.cpp +++ b/tests/xml/test_unique_ptr2.cpp @@ -1,7 +1,12 @@ #include -#include #include "write_and_read.hpp" +#include +#include + +import rfl.xml; +import rfl; + namespace test_unique_ptr2 { diff --git a/tests/xml/test_variant.cpp b/tests/xml/test_variant.cpp index a61eedaac..309b4ea77 100644 --- a/tests/xml/test_variant.cpp +++ b/tests/xml/test_variant.cpp @@ -1,7 +1,12 @@ #include -#include #include "write_and_read.hpp" +#include +#include + +import rfl.xml; +import rfl; + namespace test_variant { diff --git a/tests/xml/test_wstring.cpp b/tests/xml/test_wstring.cpp index c855a9131..a80d6ed9b 100644 --- a/tests/xml/test_wstring.cpp +++ b/tests/xml/test_wstring.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.xml; +import rfl; + struct TestStruct { std::string theNormalString; diff --git a/tests/xml/test_xml_content.cpp b/tests/xml/test_xml_content.cpp index c9ec3ef0b..3f0740e6d 100644 --- a/tests/xml/test_xml_content.cpp +++ b/tests/xml/test_xml_content.cpp @@ -1,9 +1,11 @@ -#include -#include #include #include #include "write_and_read.hpp" +import rfl.xml; +import rfl; +import rfl.json; + namespace test_xml_content { diff --git a/tests/xml/test_xml_content2.cpp b/tests/xml/test_xml_content2.cpp index 0a4d74ab6..87fd0309a 100644 --- a/tests/xml/test_xml_content2.cpp +++ b/tests/xml/test_xml_content2.cpp @@ -1,9 +1,11 @@ -#include -#include #include #include #include "write_and_read.hpp" +import rfl.xml; +import rfl; +import rfl.json; + namespace test_xml_content2 { diff --git a/tests/xml/write_and_read.hpp b/tests/xml/write_and_read.hpp index 3c6c4717a..7234c79a4 100644 --- a/tests/xml/write_and_read.hpp +++ b/tests/xml/write_and_read.hpp @@ -2,9 +2,12 @@ #define WRITE_AND_READ_ #include +#include + +import rfl; +import rfl.xml; + -#include -#include template void write_and_read(const auto& _struct) { diff --git a/tests/yaml/CMakeLists.txt b/tests/yaml/CMakeLists.txt index 3f32abd6f..ba4a30234 100644 --- a/tests/yaml/CMakeLists.txt +++ b/tests/yaml/CMakeLists.txt @@ -6,7 +6,7 @@ add_executable( reflect-cpp-yaml-tests ${SOURCES} ) -target_precompile_headers(reflect-cpp-yaml-tests PRIVATE [["rfl.hpp"]] ) +target_precompile_headers(reflect-cpp-yaml-tests PRIVATE ) target_include_directories(reflect-cpp-yaml-tests SYSTEM PRIVATE "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include") diff --git a/tests/yaml/test_add_struct_name.cpp b/tests/yaml/test_add_struct_name.cpp index 172532ab6..6299d77f2 100644 --- a/tests/yaml/test_add_struct_name.cpp +++ b/tests/yaml/test_add_struct_name.cpp @@ -2,6 +2,7 @@ #include #include "write_and_read.hpp" +import rfl.yaml; namespace test_add_struct_name { diff --git a/tests/yaml/test_array.cpp b/tests/yaml/test_array.cpp index 98318a10e..831485ee6 100644 --- a/tests/yaml/test_array.cpp +++ b/tests/yaml/test_array.cpp @@ -1,13 +1,16 @@ #include #include -#include #include // Make sure things still compile when // rfl.hpp is included after rfl/cbor.hpp. -#include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.yaml; + namespace test_array { diff --git a/tests/yaml/test_box.cpp b/tests/yaml/test_box.cpp index fc04dceca..0e303c4f5 100644 --- a/tests/yaml/test_box.cpp +++ b/tests/yaml/test_box.cpp @@ -1,7 +1,11 @@ #include -#include #include "write_and_read.hpp" +#include + +import rfl.yaml; +import rfl; + namespace test_box { diff --git a/tests/yaml/test_combined_processors.cpp b/tests/yaml/test_combined_processors.cpp index b66b13bfe..e2401d4fa 100644 --- a/tests/yaml/test_combined_processors.cpp +++ b/tests/yaml/test_combined_processors.cpp @@ -2,6 +2,7 @@ #include #include "write_and_read.hpp" +import rfl.yaml; namespace test_combined_processors { diff --git a/tests/yaml/test_comment.cpp b/tests/yaml/test_comment.cpp index f57ad7c62..4940c75d1 100644 --- a/tests/yaml/test_comment.cpp +++ b/tests/yaml/test_comment.cpp @@ -1,8 +1,10 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.yaml; +import rfl; + namespace test_comment { diff --git a/tests/yaml/test_comment_optional_array.cpp b/tests/yaml/test_comment_optional_array.cpp index 5b6d7e86d..98faf56bf 100644 --- a/tests/yaml/test_comment_optional_array.cpp +++ b/tests/yaml/test_comment_optional_array.cpp @@ -2,10 +2,11 @@ #include #include -#include -#include #include "write_and_read.hpp" +import rfl; +import rfl.yaml; + namespace test_comment_optional_array { diff --git a/tests/yaml/test_custom_class1.cpp b/tests/yaml/test_custom_class1.cpp index cd361a009..eb127b8a7 100644 --- a/tests/yaml/test_custom_class1.cpp +++ b/tests/yaml/test_custom_class1.cpp @@ -1,9 +1,11 @@ #include -#include #include #include #include "write_and_read.hpp" +import rfl.yaml; +import rfl; + namespace test_custom_class1 { diff --git a/tests/yaml/test_custom_class3.cpp b/tests/yaml/test_custom_class3.cpp index d5e44b8ce..c54fd2c61 100644 --- a/tests/yaml/test_custom_class3.cpp +++ b/tests/yaml/test_custom_class3.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.yaml; +import rfl; + namespace test_custom_class3 { diff --git a/tests/yaml/test_custom_class4.cpp b/tests/yaml/test_custom_class4.cpp index e1209fb15..d4d792041 100644 --- a/tests/yaml/test_custom_class4.cpp +++ b/tests/yaml/test_custom_class4.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.yaml; +import rfl; + namespace test_custom_class4 { diff --git a/tests/yaml/test_default_values.cpp b/tests/yaml/test_default_values.cpp index 2653a4a54..36a052c19 100644 --- a/tests/yaml/test_default_values.cpp +++ b/tests/yaml/test_default_values.cpp @@ -1,9 +1,11 @@ #include -#include #include #include #include "write_and_read.hpp" +import rfl.yaml; +import rfl; + namespace test_default_values { diff --git a/tests/yaml/test_deque.cpp b/tests/yaml/test_deque.cpp index c48d7af2b..2570653a9 100644 --- a/tests/yaml/test_deque.cpp +++ b/tests/yaml/test_deque.cpp @@ -1,7 +1,13 @@ -#include #include #include "write_and_read.hpp" +#include +#include +#include + +import rfl.yaml; +import rfl; + namespace test_deque { diff --git a/tests/yaml/test_double.cpp b/tests/yaml/test_double.cpp index 7a6d5e262..3b39cd552 100644 --- a/tests/yaml/test_double.cpp +++ b/tests/yaml/test_double.cpp @@ -1,7 +1,9 @@ -#include #include #include "write_and_read.hpp" +import rfl.yaml; +import rfl; + namespace test_double { diff --git a/tests/yaml/test_enum.cpp b/tests/yaml/test_enum.cpp index da149a90d..3b5afddf0 100644 --- a/tests/yaml/test_enum.cpp +++ b/tests/yaml/test_enum.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.yaml; +import rfl; + namespace test_enum { diff --git a/tests/yaml/test_field_variant.cpp b/tests/yaml/test_field_variant.cpp index 8d23b0574..02e8a0446 100644 --- a/tests/yaml/test_field_variant.cpp +++ b/tests/yaml/test_field_variant.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.yaml; +import rfl; + namespace test_field_variant { diff --git a/tests/yaml/test_flag_enum.cpp b/tests/yaml/test_flag_enum.cpp index 91c80c372..4d2419964 100644 --- a/tests/yaml/test_flag_enum.cpp +++ b/tests/yaml/test_flag_enum.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.yaml; +import rfl; + namespace test_flag_enum { diff --git a/tests/yaml/test_flag_enum_with_int.cpp b/tests/yaml/test_flag_enum_with_int.cpp index 44411b943..1c70bfb2c 100644 --- a/tests/yaml/test_flag_enum_with_int.cpp +++ b/tests/yaml/test_flag_enum_with_int.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.yaml; +import rfl; + namespace test_flag_enum_with_int { diff --git a/tests/yaml/test_flatten.cpp b/tests/yaml/test_flatten.cpp index b5b5f6f27..2d482355d 100644 --- a/tests/yaml/test_flatten.cpp +++ b/tests/yaml/test_flatten.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.yaml; +import rfl; + namespace test_flatten { diff --git a/tests/yaml/test_flatten_anonymous.cpp b/tests/yaml/test_flatten_anonymous.cpp index 456ebb159..fd9814c61 100644 --- a/tests/yaml/test_flatten_anonymous.cpp +++ b/tests/yaml/test_flatten_anonymous.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.yaml; +import rfl; + namespace test_flatten_anonymous { diff --git a/tests/yaml/test_forward_list.cpp b/tests/yaml/test_forward_list.cpp index 60255cbbd..092a16f7f 100644 --- a/tests/yaml/test_forward_list.cpp +++ b/tests/yaml/test_forward_list.cpp @@ -1,7 +1,13 @@ -#include #include #include "write_and_read.hpp" +#include +#include +#include + +import rfl.yaml; +import rfl; + namespace test_forward_list { diff --git a/tests/yaml/test_literal.cpp b/tests/yaml/test_literal.cpp index d9804cac1..5365a7042 100644 --- a/tests/yaml/test_literal.cpp +++ b/tests/yaml/test_literal.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.yaml; +import rfl; + namespace test_literal { diff --git a/tests/yaml/test_literal_map.cpp b/tests/yaml/test_literal_map.cpp index f811c833f..223652340 100644 --- a/tests/yaml/test_literal_map.cpp +++ b/tests/yaml/test_literal_map.cpp @@ -1,9 +1,11 @@ #include #include -#include #include #include "write_and_read.hpp" +import rfl.yaml; +import rfl; + namespace test_literal_map { diff --git a/tests/yaml/test_map.cpp b/tests/yaml/test_map.cpp index 25319f42b..70645984b 100644 --- a/tests/yaml/test_map.cpp +++ b/tests/yaml/test_map.cpp @@ -1,8 +1,12 @@ #include -#include #include #include "write_and_read.hpp" +#include + +import rfl.yaml; +import rfl; + namespace test_map { diff --git a/tests/yaml/test_map_with_key_validation.cpp b/tests/yaml/test_map_with_key_validation.cpp index a154583f4..dab96e0ef 100644 --- a/tests/yaml/test_map_with_key_validation.cpp +++ b/tests/yaml/test_map_with_key_validation.cpp @@ -1,8 +1,13 @@ #include -#include #include #include "write_and_read.hpp" +#include +#include + +import rfl.yaml; +import rfl; + namespace test_map_with_key_validation { diff --git a/tests/yaml/test_monster_example.cpp b/tests/yaml/test_monster_example.cpp index f80f1a90e..964d794a4 100644 --- a/tests/yaml/test_monster_example.cpp +++ b/tests/yaml/test_monster_example.cpp @@ -1,8 +1,10 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.yaml; +import rfl; + namespace test_monster_example { diff --git a/tests/yaml/test_multiline.cpp b/tests/yaml/test_multiline.cpp index e6afa3fab..176ab3a15 100644 --- a/tests/yaml/test_multiline.cpp +++ b/tests/yaml/test_multiline.cpp @@ -1,7 +1,9 @@ -#include #include #include "write_and_read.hpp" +import rfl.yaml; +import rfl; + struct MultilineTestStruct { std::string normal_string; diff --git a/tests/yaml/test_read_null.cpp b/tests/yaml/test_read_null.cpp index b03fd1dbd..87d85b0e8 100644 --- a/tests/yaml/test_read_null.cpp +++ b/tests/yaml/test_read_null.cpp @@ -3,9 +3,12 @@ #include #include #include -#include #include #include +#include + +import rfl.yaml; + namespace test_read_null { diff --git a/tests/yaml/test_readme_example.cpp b/tests/yaml/test_readme_example.cpp index 35ec709b6..16cf91bf9 100644 --- a/tests/yaml/test_readme_example.cpp +++ b/tests/yaml/test_readme_example.cpp @@ -1,8 +1,10 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.yaml; +import rfl; + namespace test_readme_example { diff --git a/tests/yaml/test_readme_example2.cpp b/tests/yaml/test_readme_example2.cpp index 7a6d487e1..4b8918d17 100644 --- a/tests/yaml/test_readme_example2.cpp +++ b/tests/yaml/test_readme_example2.cpp @@ -1,7 +1,9 @@ -#include #include #include "write_and_read.hpp" +import rfl.yaml; +import rfl; + namespace test_readme_example2 { diff --git a/tests/yaml/test_ref.cpp b/tests/yaml/test_ref.cpp index 558b23ee5..202298107 100644 --- a/tests/yaml/test_ref.cpp +++ b/tests/yaml/test_ref.cpp @@ -1,7 +1,11 @@ #include -#include #include "write_and_read.hpp" +#include + +import rfl.yaml; +import rfl; + namespace test_ref { diff --git a/tests/yaml/test_save_load.cpp b/tests/yaml/test_save_load.cpp index c6e50420c..0002b3e75 100644 --- a/tests/yaml/test_save_load.cpp +++ b/tests/yaml/test_save_load.cpp @@ -1,10 +1,11 @@ #include -#include -#include #include #include #include +import rfl; +import rfl.yaml; + namespace test_save_load { diff --git a/tests/yaml/test_set.cpp b/tests/yaml/test_set.cpp index e40dacc26..38029c6c5 100644 --- a/tests/yaml/test_set.cpp +++ b/tests/yaml/test_set.cpp @@ -1,7 +1,13 @@ -#include #include #include "write_and_read.hpp" +#include +#include +#include + +import rfl.yaml; +import rfl; + namespace test_set { diff --git a/tests/yaml/test_size.cpp b/tests/yaml/test_size.cpp index 46efa2a39..b1dd5a4a0 100644 --- a/tests/yaml/test_size.cpp +++ b/tests/yaml/test_size.cpp @@ -1,8 +1,10 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.yaml; +import rfl; + namespace test_size { diff --git a/tests/yaml/test_skip.cpp b/tests/yaml/test_skip.cpp index d6af8a92a..0afa89912 100644 --- a/tests/yaml/test_skip.cpp +++ b/tests/yaml/test_skip.cpp @@ -1,8 +1,10 @@ -#include -#include #include #include "write_and_read.hpp" +import rfl.yaml; +import rfl; +import rfl.json; + namespace test_skip { diff --git a/tests/yaml/test_snake_case_to_camel_case.cpp b/tests/yaml/test_snake_case_to_camel_case.cpp index 04a369fc7..c8cd5c96e 100644 --- a/tests/yaml/test_snake_case_to_camel_case.cpp +++ b/tests/yaml/test_snake_case_to_camel_case.cpp @@ -2,6 +2,7 @@ #include #include "write_and_read.hpp" +import rfl.yaml; namespace test_snake_case_to_camel_case { diff --git a/tests/yaml/test_snake_case_to_pascal_case.cpp b/tests/yaml/test_snake_case_to_pascal_case.cpp index 6c412456e..24677e152 100644 --- a/tests/yaml/test_snake_case_to_pascal_case.cpp +++ b/tests/yaml/test_snake_case_to_pascal_case.cpp @@ -2,6 +2,7 @@ #include #include "write_and_read.hpp" +import rfl.yaml; namespace test_snake_case_to_pascal_case { diff --git a/tests/yaml/test_string_map.cpp b/tests/yaml/test_string_map.cpp index d8a602d8c..fd14cfaf3 100644 --- a/tests/yaml/test_string_map.cpp +++ b/tests/yaml/test_string_map.cpp @@ -1,9 +1,11 @@ #include #include -#include #include #include "write_and_read.hpp" +import rfl.yaml; +import rfl; + namespace test_string_map { TEST(yaml, test_string_map) { diff --git a/tests/yaml/test_tagged_union.cpp b/tests/yaml/test_tagged_union.cpp index fd1760fbf..6e23d3dc3 100644 --- a/tests/yaml/test_tagged_union.cpp +++ b/tests/yaml/test_tagged_union.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.yaml; +import rfl; + namespace test_tagged_union { diff --git a/tests/yaml/test_timestamp.cpp b/tests/yaml/test_timestamp.cpp index 9ef4a4a1a..d231171d3 100644 --- a/tests/yaml/test_timestamp.cpp +++ b/tests/yaml/test_timestamp.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.yaml; +import rfl; + namespace test_timestamp { diff --git a/tests/yaml/test_unique_ptr.cpp b/tests/yaml/test_unique_ptr.cpp index a04322879..078a1af6b 100644 --- a/tests/yaml/test_unique_ptr.cpp +++ b/tests/yaml/test_unique_ptr.cpp @@ -1,9 +1,13 @@ #include -#include #include #include #include "write_and_read.hpp" +#include + +import rfl.yaml; +import rfl; + namespace test_unique_ptr { diff --git a/tests/yaml/test_unique_ptr2.cpp b/tests/yaml/test_unique_ptr2.cpp index b2a43a5b1..fa32908c5 100644 --- a/tests/yaml/test_unique_ptr2.cpp +++ b/tests/yaml/test_unique_ptr2.cpp @@ -1,7 +1,12 @@ #include -#include #include "write_and_read.hpp" +#include +#include + +import rfl.yaml; +import rfl; + namespace test_unique_ptr2 { diff --git a/tests/yaml/test_variant.cpp b/tests/yaml/test_variant.cpp index 53f831f5f..28848113b 100644 --- a/tests/yaml/test_variant.cpp +++ b/tests/yaml/test_variant.cpp @@ -1,6 +1,11 @@ -#include #include "write_and_read.hpp" +#include +#include + +import rfl.yaml; +import rfl; + namespace test_variant { diff --git a/tests/yaml/test_wstring.cpp b/tests/yaml/test_wstring.cpp index ea796bfc1..30c683322 100644 --- a/tests/yaml/test_wstring.cpp +++ b/tests/yaml/test_wstring.cpp @@ -1,7 +1,9 @@ -#include #include #include "write_and_read.hpp" +import rfl.yaml; +import rfl; + struct TestStruct { std::string theNormalString; diff --git a/tests/yaml/write_and_read.hpp b/tests/yaml/write_and_read.hpp index bda619a4d..e481d9eae 100644 --- a/tests/yaml/write_and_read.hpp +++ b/tests/yaml/write_and_read.hpp @@ -2,8 +2,12 @@ #define WRITE_AND_READ_ #include +#include +#include + +import rfl.yaml; + -#include template void write_and_read(const auto& _struct, rfl::yaml::Writer::Flags _flags = rfl::yaml::Writer::Flags::no_flags) { diff --git a/tests/yas/CMakeLists.txt b/tests/yas/CMakeLists.txt index 63f10fadc..6a15d1c19 100644 --- a/tests/yas/CMakeLists.txt +++ b/tests/yas/CMakeLists.txt @@ -6,7 +6,7 @@ add_executable( reflect-cpp-yas-tests ${SOURCES} ) -target_precompile_headers(reflect-cpp-yas-tests PRIVATE [["rfl.hpp"]] ) +target_precompile_headers(reflect-cpp-yas-tests PRIVATE ) target_link_libraries(reflect-cpp-yas-tests PRIVATE reflectcpp_tests_crt) diff --git a/tests/yas/test_add_struct_name.cpp b/tests/yas/test_add_struct_name.cpp index e96e996df..1d55fb544 100644 --- a/tests/yas/test_add_struct_name.cpp +++ b/tests/yas/test_add_struct_name.cpp @@ -2,6 +2,7 @@ #include #include "write_and_read.hpp" +import rfl.yas; namespace test_add_struct_name { diff --git a/tests/yas/test_array.cpp b/tests/yas/test_array.cpp index 3d2fc779a..2c94c1b0a 100644 --- a/tests/yas/test_array.cpp +++ b/tests/yas/test_array.cpp @@ -1,11 +1,14 @@ #include #include -#include #include -#include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.yas; + namespace test_array { diff --git a/tests/yas/test_box.cpp b/tests/yas/test_box.cpp index be52e9f67..3037065dd 100644 --- a/tests/yas/test_box.cpp +++ b/tests/yas/test_box.cpp @@ -1,10 +1,13 @@ #include -#include -#include #include #include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.yas; + namespace test_box { diff --git a/tests/yas/test_bytestring.cpp b/tests/yas/test_bytestring.cpp index 07ee527a5..a04538211 100644 --- a/tests/yas/test_bytestring.cpp +++ b/tests/yas/test_bytestring.cpp @@ -1,6 +1,10 @@ -#include #include "write_and_read.hpp" +#include + +import rfl.yas; +import rfl; + namespace test_bytestring { diff --git a/tests/yas/test_custom_class1.cpp b/tests/yas/test_custom_class1.cpp index 99723a9a9..974465958 100644 --- a/tests/yas/test_custom_class1.cpp +++ b/tests/yas/test_custom_class1.cpp @@ -1,9 +1,11 @@ #include -#include #include #include #include "write_and_read.hpp" +import rfl.yas; +import rfl; + namespace test_custom_class1 { diff --git a/tests/yas/test_custom_class3.cpp b/tests/yas/test_custom_class3.cpp index 074239f86..b833818a7 100644 --- a/tests/yas/test_custom_class3.cpp +++ b/tests/yas/test_custom_class3.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.yas; +import rfl; + namespace test_custom_class3 { diff --git a/tests/yas/test_custom_class4.cpp b/tests/yas/test_custom_class4.cpp index 60d595378..bbafa1d9c 100644 --- a/tests/yas/test_custom_class4.cpp +++ b/tests/yas/test_custom_class4.cpp @@ -1,8 +1,12 @@ #include -#include #include #include "write_and_read.hpp" +#include + +import rfl.yas; +import rfl; + namespace test_custom_class4 { diff --git a/tests/yas/test_default_values.cpp b/tests/yas/test_default_values.cpp index aebdf5b9d..468b9cac5 100644 --- a/tests/yas/test_default_values.cpp +++ b/tests/yas/test_default_values.cpp @@ -1,9 +1,11 @@ #include -#include #include #include #include "write_and_read.hpp" +import rfl.yas; +import rfl; + namespace test_default_values { diff --git a/tests/yas/test_deque.cpp b/tests/yas/test_deque.cpp index f7603ad8f..0c1d0e7dd 100644 --- a/tests/yas/test_deque.cpp +++ b/tests/yas/test_deque.cpp @@ -1,7 +1,13 @@ -#include #include #include "write_and_read.hpp" +#include +#include +#include + +import rfl.yas; +import rfl; + namespace test_deque { diff --git a/tests/yas/test_enum.cpp b/tests/yas/test_enum.cpp index 7e3072452..5492325ee 100644 --- a/tests/yas/test_enum.cpp +++ b/tests/yas/test_enum.cpp @@ -1,10 +1,11 @@ #include -#include -#include #include #include #include "write_and_read.hpp" +import rfl; +import rfl.yas; + namespace test_enum { diff --git a/tests/yas/test_field_variant.cpp b/tests/yas/test_field_variant.cpp index ebc40b10a..167d013b4 100644 --- a/tests/yas/test_field_variant.cpp +++ b/tests/yas/test_field_variant.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.yas; +import rfl; + namespace test_field_variant { diff --git a/tests/yas/test_field_variant_std.cpp b/tests/yas/test_field_variant_std.cpp index 97631f8a6..4ad1a063c 100644 --- a/tests/yas/test_field_variant_std.cpp +++ b/tests/yas/test_field_variant_std.cpp @@ -1,7 +1,11 @@ #include -#include #include "write_and_read.hpp" +#include + +import rfl.yas; +import rfl; + namespace test_field_variant_std { diff --git a/tests/yas/test_flag_enum.cpp b/tests/yas/test_flag_enum.cpp index 2bb5e3760..dff771d37 100644 --- a/tests/yas/test_flag_enum.cpp +++ b/tests/yas/test_flag_enum.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.yas; +import rfl; + namespace test_flag_enum { diff --git a/tests/yas/test_flag_enum_with_int.cpp b/tests/yas/test_flag_enum_with_int.cpp index e1abc18c4..fc06db3f4 100644 --- a/tests/yas/test_flag_enum_with_int.cpp +++ b/tests/yas/test_flag_enum_with_int.cpp @@ -1,7 +1,9 @@ #include -#include #include "write_and_read.hpp" +import rfl.yas; +import rfl; + namespace test_flag_enum_with_int { diff --git a/tests/yas/test_flatten.cpp b/tests/yas/test_flatten.cpp index 050979a97..5aaa2dda8 100644 --- a/tests/yas/test_flatten.cpp +++ b/tests/yas/test_flatten.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.yas; +import rfl; + namespace test_flatten { diff --git a/tests/yas/test_flatten_anonymous.cpp b/tests/yas/test_flatten_anonymous.cpp index 209f3491d..dd40f99ab 100644 --- a/tests/yas/test_flatten_anonymous.cpp +++ b/tests/yas/test_flatten_anonymous.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.yas; +import rfl; + namespace test_flatten_anonymous { diff --git a/tests/yas/test_forward_list.cpp b/tests/yas/test_forward_list.cpp index 300585ff1..a0e680318 100644 --- a/tests/yas/test_forward_list.cpp +++ b/tests/yas/test_forward_list.cpp @@ -1,7 +1,13 @@ -#include #include #include "write_and_read.hpp" +#include +#include +#include + +import rfl.yas; +import rfl; + namespace test_forward_list { diff --git a/tests/yas/test_generic.cpp b/tests/yas/test_generic.cpp index 738cc8331..f32eac1b5 100644 --- a/tests/yas/test_generic.cpp +++ b/tests/yas/test_generic.cpp @@ -1,8 +1,9 @@ -#include -#include #include #include "write_and_read.hpp" +import rfl; +import rfl.yas; + namespace test_generic { diff --git a/tests/yas/test_literal.cpp b/tests/yas/test_literal.cpp index f3a0f137e..76a512e48 100644 --- a/tests/yas/test_literal.cpp +++ b/tests/yas/test_literal.cpp @@ -1,9 +1,11 @@ #include -#include -#include #include #include "write_and_read.hpp" +import rfl.yas; +import rfl; +import rfl.json; + namespace test_literal { diff --git a/tests/yas/test_literal_map.cpp b/tests/yas/test_literal_map.cpp index 88f456bc5..9978b6ccf 100644 --- a/tests/yas/test_literal_map.cpp +++ b/tests/yas/test_literal_map.cpp @@ -1,9 +1,11 @@ #include #include -#include #include #include "write_and_read.hpp" +import rfl.yas; +import rfl; + namespace test_literal_map { diff --git a/tests/yas/test_map.cpp b/tests/yas/test_map.cpp index 5ab127b2d..3fd9d2f93 100644 --- a/tests/yas/test_map.cpp +++ b/tests/yas/test_map.cpp @@ -1,11 +1,15 @@ #include #include -#include -#include #include #include #include "write_and_read.hpp" +#include +#include + +import rfl; +import rfl.yas; + namespace test_map { diff --git a/tests/yas/test_map2.cpp b/tests/yas/test_map2.cpp index 0a64e7f93..d1d7010a7 100644 --- a/tests/yas/test_map2.cpp +++ b/tests/yas/test_map2.cpp @@ -1,9 +1,13 @@ #include -#include -#include #include #include "write_and_read.hpp" +#include + +import rfl.yas; +import rfl; +import rfl.json; + namespace test_map2 { diff --git a/tests/yas/test_monster_example.cpp b/tests/yas/test_monster_example.cpp index da129f2a7..66bed74a8 100644 --- a/tests/yas/test_monster_example.cpp +++ b/tests/yas/test_monster_example.cpp @@ -1,8 +1,10 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.yas; +import rfl; + namespace test_monster_example { diff --git a/tests/yas/test_optional_fields.cpp b/tests/yas/test_optional_fields.cpp index 63f6ac13c..d51a327da 100644 --- a/tests/yas/test_optional_fields.cpp +++ b/tests/yas/test_optional_fields.cpp @@ -1,9 +1,12 @@ #include -#include -#include #include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.yas; + namespace test_optional_fields { diff --git a/tests/yas/test_optionals_in_vectors.cpp b/tests/yas/test_optionals_in_vectors.cpp index 5a32ce1ca..39e49fd75 100644 --- a/tests/yas/test_optionals_in_vectors.cpp +++ b/tests/yas/test_optionals_in_vectors.cpp @@ -1,9 +1,13 @@ -#include -#include #include #include #include "write_and_read.hpp" +#include + +import rfl.yas; +import rfl; +import rfl.json; + namespace test_optionals_in_vectors { diff --git a/tests/yas/test_person.cpp b/tests/yas/test_person.cpp index 600ed688a..3a833ee3f 100644 --- a/tests/yas/test_person.cpp +++ b/tests/yas/test_person.cpp @@ -1,11 +1,12 @@ #include -#include -#include #include #include #include "write_and_read.hpp" +import rfl; +import rfl.yas; + namespace test_person { diff --git a/tests/yas/test_readme_example.cpp b/tests/yas/test_readme_example.cpp index f37c7a64d..ab452f446 100644 --- a/tests/yas/test_readme_example.cpp +++ b/tests/yas/test_readme_example.cpp @@ -1,9 +1,10 @@ -#include -#include #include #include #include "write_and_read.hpp" +import rfl; +import rfl.yas; + namespace test_readme_example { diff --git a/tests/yas/test_readme_example2.cpp b/tests/yas/test_readme_example2.cpp index dee13a10a..7a6430812 100644 --- a/tests/yas/test_readme_example2.cpp +++ b/tests/yas/test_readme_example2.cpp @@ -1,7 +1,9 @@ -#include #include #include "write_and_read.hpp" +import rfl.yas; +import rfl; + namespace test_readme_example2 { diff --git a/tests/yas/test_readme_example3.cpp b/tests/yas/test_readme_example3.cpp index 12d668373..f622249b0 100644 --- a/tests/yas/test_readme_example3.cpp +++ b/tests/yas/test_readme_example3.cpp @@ -1,8 +1,10 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.yas; +import rfl; + namespace test_readme_example3 { diff --git a/tests/yas/test_ref.cpp b/tests/yas/test_ref.cpp index 4835530fa..a8ff4a2de 100644 --- a/tests/yas/test_ref.cpp +++ b/tests/yas/test_ref.cpp @@ -1,7 +1,11 @@ #include -#include #include "write_and_read.hpp" +#include + +import rfl.yas; +import rfl; + namespace test_ref { diff --git a/tests/yas/test_rfl_tuple.cpp b/tests/yas/test_rfl_tuple.cpp index 1e325e6d0..592cf6cc2 100644 --- a/tests/yas/test_rfl_tuple.cpp +++ b/tests/yas/test_rfl_tuple.cpp @@ -1,10 +1,14 @@ #include -#include -#include #include #include "write_and_read.hpp" +#include + +import rfl.yas; +import rfl; +import rfl.json; + namespace test_rfl_tuple { diff --git a/tests/yas/test_rfl_variant.cpp b/tests/yas/test_rfl_variant.cpp index a341022de..e8ff600cb 100644 --- a/tests/yas/test_rfl_variant.cpp +++ b/tests/yas/test_rfl_variant.cpp @@ -1,7 +1,11 @@ #include -#include #include "write_and_read.hpp" +#include + +import rfl.yas; +import rfl; + namespace test_variant { diff --git a/tests/yas/test_save_load.cpp b/tests/yas/test_save_load.cpp index 8c26cc6be..d3029f470 100644 --- a/tests/yas/test_save_load.cpp +++ b/tests/yas/test_save_load.cpp @@ -1,10 +1,11 @@ #include -#include -#include #include #include #include "write_and_read.hpp" +import rfl; +import rfl.yas; + namespace test_save_load { struct Person { diff --git a/tests/yas/test_set.cpp b/tests/yas/test_set.cpp index 202c5d19e..bc49df85e 100644 --- a/tests/yas/test_set.cpp +++ b/tests/yas/test_set.cpp @@ -1,7 +1,13 @@ -#include #include #include "write_and_read.hpp" +#include +#include +#include + +import rfl.yas; +import rfl; + namespace test_set { diff --git a/tests/yas/test_shared_ptr.cpp b/tests/yas/test_shared_ptr.cpp index 72fdaf4b0..5d0966a79 100644 --- a/tests/yas/test_shared_ptr.cpp +++ b/tests/yas/test_shared_ptr.cpp @@ -1,10 +1,14 @@ #include -#include -#include #include #include #include "write_and_read.hpp" +#include + +import rfl.yas; +import rfl; +import rfl.json; + namespace test_shared_ptr { diff --git a/tests/yas/test_size.cpp b/tests/yas/test_size.cpp index 8ef4c40d8..7334169c6 100644 --- a/tests/yas/test_size.cpp +++ b/tests/yas/test_size.cpp @@ -1,8 +1,10 @@ -#include #include #include #include "write_and_read.hpp" +import rfl.yas; +import rfl; + namespace test_size { diff --git a/tests/yas/test_string_map.cpp b/tests/yas/test_string_map.cpp index e2ef2d518..d76ac9797 100644 --- a/tests/yas/test_string_map.cpp +++ b/tests/yas/test_string_map.cpp @@ -1,10 +1,12 @@ #include #include -#include -#include #include #include "write_and_read.hpp" +import rfl.yas; +import rfl; +import rfl.json; + namespace test_string_map { diff --git a/tests/yas/test_tagged_union.cpp b/tests/yas/test_tagged_union.cpp index 43e55b39e..35fbf82b3 100644 --- a/tests/yas/test_tagged_union.cpp +++ b/tests/yas/test_tagged_union.cpp @@ -1,10 +1,11 @@ #include -#include -#include #include #include #include "write_and_read.hpp" +import rfl; +import rfl.yas; + namespace test_tagged_union { diff --git a/tests/yas/test_timestamp.cpp b/tests/yas/test_timestamp.cpp index 8a594f93c..b57dfe4a2 100644 --- a/tests/yas/test_timestamp.cpp +++ b/tests/yas/test_timestamp.cpp @@ -1,10 +1,11 @@ #include -#include -#include #include #include #include "write_and_read.hpp" +import rfl; +import rfl.yas; + namespace test_timestamp { diff --git a/tests/yas/test_tuple.cpp b/tests/yas/test_tuple.cpp index e95efb98f..a87e3305d 100644 --- a/tests/yas/test_tuple.cpp +++ b/tests/yas/test_tuple.cpp @@ -1,11 +1,12 @@ #include -#include -#include #include #include #include #include "write_and_read.hpp" +import rfl; +import rfl.yas; + namespace test_tuple { diff --git a/tests/yas/test_unique_ptr.cpp b/tests/yas/test_unique_ptr.cpp index f047a34d5..8a3a35c16 100644 --- a/tests/yas/test_unique_ptr.cpp +++ b/tests/yas/test_unique_ptr.cpp @@ -1,11 +1,14 @@ #include #include -#include -#include #include #include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.yas; + namespace test_unique_ptr { diff --git a/tests/yas/test_unique_ptr2.cpp b/tests/yas/test_unique_ptr2.cpp index 70ace8845..b0ae476a1 100644 --- a/tests/yas/test_unique_ptr2.cpp +++ b/tests/yas/test_unique_ptr2.cpp @@ -1,7 +1,12 @@ #include -#include #include "write_and_read.hpp" +#include +#include + +import rfl.yas; +import rfl; + namespace test_unique_ptr2 { diff --git a/tests/yas/test_variant.cpp b/tests/yas/test_variant.cpp index 31f96dabe..b633aadbe 100644 --- a/tests/yas/test_variant.cpp +++ b/tests/yas/test_variant.cpp @@ -1,10 +1,13 @@ #include -#include -#include #include #include #include "write_and_read.hpp" +#include + +import rfl; +import rfl.yas; + namespace test_variant { diff --git a/tests/yas/test_variants_in_vectors.cpp b/tests/yas/test_variants_in_vectors.cpp index 0ef491948..4d8c2a9eb 100644 --- a/tests/yas/test_variants_in_vectors.cpp +++ b/tests/yas/test_variants_in_vectors.cpp @@ -1,9 +1,13 @@ -#include -#include #include #include #include "write_and_read.hpp" +#include + +import rfl.yas; +import rfl; +import rfl.json; + namespace test_variants_in_vectors { diff --git a/tests/yas/test_wstring.cpp b/tests/yas/test_wstring.cpp index 128123cc2..a2b67ed77 100644 --- a/tests/yas/test_wstring.cpp +++ b/tests/yas/test_wstring.cpp @@ -1,8 +1,10 @@ #include -#include #include #include "write_and_read.hpp" +import rfl.yas; +import rfl; + struct TestStruct { std::string theNormalString; diff --git a/tests/yas/write_and_read.hpp b/tests/yas/write_and_read.hpp index db8e4a080..981dd7082 100644 --- a/tests/yas/write_and_read.hpp +++ b/tests/yas/write_and_read.hpp @@ -2,9 +2,12 @@ #define WRITE_AND_READ_ #include +#include + +import rfl.json; +import rfl.yas; + -#include -#include template void write_and_read(const auto& _struct) {