/* Fuzzing enabled. */
#mesondefine FUZZING
-/* Fuzzing running in CI. */
-#mesondefine FUZZING_IN_CI
-
/* AFL compiler enabled. */
#mesondefine HAVE_AFL
-/* Whether you have the <botan/asio_stream.h> header file. */
-#mesondefine HAVE_BOTAN_ASIO_STREAM_H
-
/* Whether gtest defines edit_distance::CreateUnifiedDiff */
#mesondefine HAVE_CREATE_UNIFIED_DIFF
#### Configuration Data
-# 'HAVE_BOTAN_ASIO_STREAM_H': false,
-# 'HAVE_PGSQL_SSL': false,
-# 'USE_STATIC_LINK': false,
+# TODO: Remaining define macros used in code, but not handled by meson:
+# - HAVE_PGSQL_SSL
+# - USE_STATIC_LINK
+
conf_data = configuration_data(
{
'PACKAGE': 'kea',
#### Other checks.
if POSTGRESQL_DEP.found()
- # TODO: change to proper check, not version check.
version = POSTGRESQL_DEP.version()
conf_data.set(
'HAVE_PGSQL_TCP_USER_TIMEOUT',
# TODO: Change to config.h.in when autotools are removed.
configure_file(
- input: 'meson-config.h.in',
+ input: 'config.h.in',
output: 'config.h',
configuration: conf_data,
install: true,
# TODO: Change to kea_version.h.in when autotools are removed.
configure_file(
- input: 'meson-kea_version.h.in',
+ input: 'kea_version.h.in',
output: 'kea_version.h',
configuration: conf_data,
install: true,
-// Copyright (C) 2017-2024 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2017-2025 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
#include <cc/cfg_to_element.h>
#include <gtest/gtest.h>
#include <string>
-#ifdef HAVE_IS_BASE_OF
#include <type_traits>
-#endif
#ifndef CONFIG_H_WAS_INCLUDED
#error config.h must be included before test_to_element.h
void
runToElementTest(const std::string& expected, const Cfg& cfg) {
using namespace isc::data;
-#ifdef HAVE_IS_BASE_OF
static_assert(std::is_base_of<CfgToElement, Cfg>::value,
"CfgToElement is not a base of the template parameter");
-#endif
ConstElementPtr json;
ASSERT_NO_THROW(json = Element::fromJSON(expected)) << expected;
ConstElementPtr unparsed;
/// @param cfg an instance of the Cfg class
template<typename Cfg>
void runToElementTest(isc::data::ConstElementPtr expected, const Cfg& cfg) {
-#ifdef HAVE_IS_BASE_OF
static_assert(std::is_base_of<isc::data::CfgToElement, Cfg>::value,
"CfgToElement is not a base of the template parameter");
-#endif
isc::data::ConstElementPtr unparsed;
ASSERT_NO_THROW(unparsed = cfg.toElement());
if (!isEquivalent(expected, unparsed)) {