NebulaStream  0.6.213
NebulaStream is a data and application management framework for the internet of things
TestHarness.hpp File Reference
#include <API/AttributeField.hpp>
#include <API/Query.hpp>
#include <Configurations/Worker/PhysicalSourceTypes/CSVSourceType.hpp>
#include <Operators/LogicalOperators/Sinks/FileSinkDescriptor.hpp>
#include <Operators/LogicalOperators/Sinks/SinkLogicalOperator.hpp>
#include <Plans/Query/QueryPlan.hpp>
#include <Runtime/BufferManager.hpp>
#include <Services/RequestHandlerService.hpp>
#include <Util/Core.hpp>
#include <Util/TestHarness/TestHarnessWorkerConfiguration.hpp>
#include <Util/TestUtils.hpp>
#include <cstring>
#include <filesystem>
#include <type_traits>
#include <utility>
Include dependency graph for TestHarness.hpp:
This graph shows which files directly or indirectly include this file:

Classes

class  NES::TestHarness
 

Namespaces

 NES
 This exception represents a network error.
 

Macros

#define SETUP_COMPILE_TIME_TESTS(name, f)
 
#define SETUP_COMPILE_TIME_TEST_ARGS(name, func)
 
#define SETUP_COMPILE_TIME_TEST(name, func)
 

Typedefs

using NES::CSVSourceTypePtr = std::shared_ptr< CSVSourceType >
 

Macro Definition Documentation

◆ SETUP_COMPILE_TIME_TEST

#define SETUP_COMPILE_TIME_TEST (   name,
  func 
)
Value:
namespace detail { \
template<typename, typename...> \
struct name##FromType : std::false_type {}; \
template<typename... Ts> \
struct name##FromType<decltype(func(std::declval<Ts>()...)), Ts...> : std::true_type {}; \
} \
template<typename... Args> \
using name##CompilesFromType = detail::name##FromType<Args...>

Check if function #func compiles from argument of given types produce the expected return type that is provided as the check's first template argument.

◆ SETUP_COMPILE_TIME_TEST_ARGS

#define SETUP_COMPILE_TIME_TEST_ARGS (   name,
  func 
)
Value:
namespace detail { \
template<typename, auto...> \
struct name##FromArgs : std::false_type {}; \
template<auto... args> \
struct name##FromArgs<decltype(func(args...)), args...> : std::true_type {}; \
} \
template<typename R, auto... a> \
using name##Compiles = detail::name##FromArgs<R, a...>

Check if function #func compiles from constexpr arguments and produce the expected return type that is provided as the check's first template argument.

◆ SETUP_COMPILE_TIME_TESTS

#define SETUP_COMPILE_TIME_TESTS (   name,
 
)
Value:
SETUP_COMPILE_TIME_TEST_ARGS(name, f)

Create compile-time tests that allow checking a specific function's type for a specific function by calling [function-name]CompilesFromType<Return Type, Types of arguments, ...> or [function-name]Compiles<Return Type, argument 1, argument 2>.

Note that the non-type compile time checks for the non-type template arguments are limited to consteval- constructible and non-floating point types. Another limitation is that as of now, type and non type template argument tests cannot be mixed.