M module-apps/application-alarm-clock/tests/CMakeLists.txt => module-apps/application-alarm-clock/tests/CMakeLists.txt +0 -1
@@ 2,7 2,6 @@ add_catch2_executable(
NAME
app-alarm
SRCS
- tests-main.cpp
test-AlarmPresenter.cpp
LIBS
module-apps
M module-apps/application-calculator/tests/CMakeLists.txt => module-apps/application-calculator/tests/CMakeLists.txt +0 -1
@@ 2,7 2,6 @@
NAME
calculator
SRCS
- tests-main.cpp
CalculatorInput_tests.cpp
CalculatorUtility_tests.cpp
LIBS
D module-apps/application-calculator/tests/tests-main.cpp => module-apps/application-calculator/tests/tests-main.cpp +0 -5
@@ 1,5 0,0 @@
-// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
-// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-
-#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file
-#include <catch2/catch.hpp>
M module-apps/tests/CMakeLists.txt => module-apps/tests/CMakeLists.txt +0 -1
@@ 2,7 2,6 @@ add_catch2_executable(
NAME
apps-common
SRCS
- tests-main.cpp
test-CallbackStorage.cpp
test-PhoneModesPolicies.cpp
tests-BluetoothSettingsModel.cpp
D module-apps/tests/tests-main.cpp => module-apps/tests/tests-main.cpp +0 -5
@@ 1,5 0,0 @@
-// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
-// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-
-#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file
-#include <catch2/catch.hpp>
M module-audio/Audio/test/unittest_audio.cpp => module-audio/Audio/test/unittest_audio.cpp +0 -2
@@ 1,8 1,6 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-#define CATCH_CONFIG_MAIN
-
#include <catch2/catch.hpp>
#include "Audio/decoder/Decoder.hpp"
M module-audio/Audio/test/unittest_equalizer.cpp => module-audio/Audio/test/unittest_equalizer.cpp +0 -2
@@ 1,8 1,6 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-#define CATCH_CONFIG_MAIN
-
#include <catch2/catch.hpp>
#include <module-audio/Audio/equalizer/Equalizer.hpp>
#include <Utils.hpp>
M module-audio/Audio/test/unittest_scaler.cpp => module-audio/Audio/test/unittest_scaler.cpp +0 -2
@@ 1,8 1,6 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-#define CATCH_CONFIG_MAIN
-
#include <catch2/catch.hpp>
#include <module-audio/Audio/VolumeScaler.hpp>
M module-bluetooth/tests/CMakeLists.txt => module-bluetooth/tests/CMakeLists.txt +0 -1
@@ 2,7 2,6 @@ add_catch2_executable(
NAME
Bluetooth-tests
SRCS
- tests-main.cpp
tests-StatefulController.cpp
tests-BluetoothDevicesModel.cpp
LIBS
D module-bluetooth/tests/tests-main.cpp => module-bluetooth/tests/tests-main.cpp +0 -5
@@ 1,5 0,0 @@
-// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
-// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-
-#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file
-#include <catch2/catch.hpp>
M module-bsp/hal/CMakeLists.txt => module-bsp/hal/CMakeLists.txt +0 -1
@@ 10,7 10,6 @@ target_sources(hal
include/hal/temperature_source/TemperatureSource.hpp
include/hal/GenericFactory.hpp
include/hal/battery_charger/AbstractBatteryCharger.hpp
- include/hal/Units.hpp
include/hal/cellular/SIM.hpp
include/hal/key_input/RawKey.hpp
include/hal/key_input/KeyEventDefinitions.hpp
M module-bsp/tests/CMakeLists.txt => module-bsp/tests/CMakeLists.txt +0 -1
@@ 2,7 2,6 @@
NAME
module-bsp
SRCS
- tests-main.cpp
test-battery-charger-utils.cpp
LIBS
module-sys
D module-bsp/tests/tests-main.cpp => module-bsp/tests/tests-main.cpp +0 -5
@@ 1,5 0,0 @@
-// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
-// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-
-#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file
-#include <catch2/catch.hpp>
M module-cellular/test/unittest_ATStream.cpp => module-cellular/test/unittest_ATStream.cpp +0 -2
@@ 2,8 2,6 @@
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include <string>
-#define CATCH_CONFIG_MAIN
-
#include <catch2/catch.hpp>
#include "modem/ATStream.hpp"
#include "Result.hpp"
M module-cellular/test/unittest_ATURCStream.cpp => module-cellular/test/unittest_ATURCStream.cpp +0 -1
@@ 2,7 2,6 @@
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include <string>
-#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include "modem/ATURCStream.hpp"
M module-cellular/test/unittest_CellularResult.cpp => module-cellular/test/unittest_CellularResult.cpp +0 -2
@@ 1,8 1,6 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-#define CATCH_CONFIG_MAIN
-
#include <catch2/catch.hpp>
#include <bsp/cellular/CellularResult.hpp>
M module-cellular/test/unittest_URC.cpp => module-cellular/test/unittest_URC.cpp +0 -1
@@ 5,7 5,6 @@
#include <algorithm>
#include <cstdint>
#include <string>
-#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include <time/time_conversion.hpp>
M module-cellular/test/unittest_cmux.cpp => module-cellular/test/unittest_cmux.cpp +0 -2
@@ 1,8 1,6 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-#define CATCH_CONFIG_MAIN
-
#include <catch2/catch.hpp>
#include <modem/mux/CellularMuxFrame.h>
#include <modem/mux/CellularMuxTypes.h>
M module-cellular/test/unittest_parse_result.cpp => module-cellular/test/unittest_parse_result.cpp +0 -2
@@ 2,8 2,6 @@
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include <string>
-#define CATCH_CONFIG_MAIN
-
#include <catch2/catch.hpp>
#include <at/cmd/CLCC.hpp>
M module-cellular/test/unittest_response.cpp => module-cellular/test/unittest_response.cpp +0 -2
@@ 1,8 1,6 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-#define CATCH_CONFIG_MAIN
-
#include <catch2/catch.hpp>
#include <response.hpp>
#include <Result.hpp>
M module-db/tests/CMakeLists.txt => module-db/tests/CMakeLists.txt +0 -1
@@ 25,7 25,6 @@ add_catch2_executable(
SMSTemplateTable_tests.cpp
ThreadRecord_tests.cpp
ThreadsTable_tests.cpp
- tests-main.cpp
common.cpp
LIBS
M module-db/tests/test-initializer/CMakeLists.txt => module-db/tests/test-initializer/CMakeLists.txt +0 -1
@@ 3,7 3,6 @@ add_catch2_executable(
db-initializer
SRCS
"${CMAKE_CURRENT_SOURCE_DIR}/unittest.cpp"
- "${CMAKE_CURRENT_SOURCE_DIR}/tests-main.cpp"
LIBS
module-sys
D module-db/tests/test-initializer/tests-main.cpp => module-db/tests/test-initializer/tests-main.cpp +0 -5
@@ 1,5 0,0 @@
-// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
-// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-
-#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file
-#include <catch2/catch.hpp>
D module-db/tests/tests-main.cpp => module-db/tests/tests-main.cpp +0 -5
@@ 1,5 0,0 @@
-// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
-// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-
-#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file
-#include <catch2/catch.hpp>
M module-gui/test/test-catch-text/CMakeLists.txt => module-gui/test/test-catch-text/CMakeLists.txt +0 -1
@@ 3,7 3,6 @@ add_catch2_executable(
NAME
gui-text
SRCS
- main.cpp
../mock/buildTextDocument.cpp
../mock/multi-line-string.cpp
../mock/InitializedFontManager.cpp
M module-gui/test/test-catch/test-gui-image.cpp => module-gui/test/test-catch/test-gui-image.cpp +0 -1
@@ 2,7 2,6 @@
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include <catch2/catch.hpp>
-#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file
#include <list>
M module-gui/test/test-catch/test-gui.cpp => module-gui/test/test-catch/test-gui.cpp +0 -1
@@ 4,7 4,6 @@
/// These are random tests what could be salvaged from old tests
#include "mock/InitializedFontManager.hpp"
-#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file
#include <memory>
#include <functional>
M module-platform/linux/tests/unittest_disk_manager.cpp => module-platform/linux/tests/unittest_disk_manager.cpp +1 -1
@@ 1,6 1,5 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include <purefs/blkdev/disk_manager.hpp>
@@ 9,6 8,7 @@
#include "test-setup.hpp"
#include <filesystem>
+#include <fstream>
namespace
{
M module-platform/linux/tests/unittest_filesystem_core.cpp => module-platform/linux/tests/unittest_filesystem_core.cpp +1 -1
@@ 1,7 1,6 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include <platform/linux/DiskImage.hpp>
@@ 16,6 15,7 @@
#include "test-setup.hpp"
#include <tuple>
+#include <cstring>
#include <sys/statvfs.h>
#include <sys/stat.h>
M module-platform/linux/tests/unittest_filesystem_dualmount.cpp => module-platform/linux/tests/unittest_filesystem_dualmount.cpp +1 -1
@@ 1,7 1,6 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include <platform/linux/DiskImage.hpp>
@@ 13,6 12,7 @@
#include "test-setup.hpp"
+#include <cstring>
#include <sys/statvfs.h>
#include <sys/stat.h>
#include <fcntl.h>
M module-platform/linux/tests/unittest_filesystem_ext4.cpp => module-platform/linux/tests/unittest_filesystem_ext4.cpp +0 -1
@@ 1,7 1,6 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include <platform/linux/DiskImage.hpp>
M module-platform/linux/tests/unittest_filesystem_littlefs.cpp => module-platform/linux/tests/unittest_filesystem_littlefs.cpp +1 -1
@@ 1,6 1,6 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-#define CATCH_CONFIG_MAIN
+
#include <catch2/catch.hpp>
#include <platform/linux/DiskImage.hpp>
M module-platform/linux/tests/unittest_iosys.cpp => module-platform/linux/tests/unittest_iosys.cpp +1 -2
@@ 1,12 1,11 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-#define CATCH_CONFIG_MAIN
-
#include <catch2/catch.hpp>
#include <platform/linux/LinuxPlatform.hpp>
#include <filesystem>
+#include <fstream>
TEST_CASE("VFS linux support")
{
M module-services/service-appmgr/tests/CMakeLists.txt => module-services/service-appmgr/tests/CMakeLists.txt +0 -3
@@ 2,7 2,6 @@ add_catch2_executable(
NAME
actions-registry-tests
SRCS
- tests-main.cpp
test-ActionsRegistry.cpp
LIBS
service-appmgr
@@ 13,7 12,6 @@ add_catch2_executable(
NAME
application-manifest-tests
SRCS
- tests-main.cpp
test-ApplicationManifest.cpp
LIBS
service-appmgr
@@ 24,7 22,6 @@ add_catch2_executable(
NAME
application-stack-tests
SRCS
- tests-main.cpp
test-ApplicationStack.cpp
LIBS
service-appmgr
D module-services/service-appmgr/tests/tests-main.cpp => module-services/service-appmgr/tests/tests-main.cpp +0 -5
@@ 1,5 0,0 @@
-// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
-// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-
-#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file
-#include <catch2/catch.hpp>
M module-services/service-cellular/tests/unittest_datatransfer.cpp => module-services/service-cellular/tests/unittest_datatransfer.cpp +0 -2
@@ 1,8 1,6 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-#define CATCH_CONFIG_MAIN
-
#include <catch2/catch.hpp>
#include "Result.hpp"
M module-services/service-cellular/tests/unittest_qmbn.cpp => module-services/service-cellular/tests/unittest_qmbn.cpp +0 -2
@@ 1,8 1,6 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-#define CATCH_CONFIG_MAIN
-
#include <catch2/catch.hpp>
#include <service-cellular/QMBNManager.hpp>
M module-services/service-cellular/tests/unittest_request_factory.cpp => module-services/service-cellular/tests/unittest_request_factory.cpp +0 -2
@@ 1,8 1,6 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-#define CATCH_CONFIG_MAIN
-
#include <catch2/catch.hpp>
#include <service-cellular/RequestFactory.hpp>
#include <service-cellular/requests/CallForwardingRequest.hpp>
M module-services/service-cellular/tests/unittest_simcard.cpp => module-services/service-cellular/tests/unittest_simcard.cpp +0 -2
@@ 1,8 1,6 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-#define CATCH_CONFIG_MAIN
-
#include <catch2/catch.hpp>
#include <service-cellular/src/SimCard.hpp>
M module-services/service-cellular/tests/unittest_smsPartsHandler.cpp => module-services/service-cellular/tests/unittest_smsPartsHandler.cpp +1 -3
@@ 1,8 1,6 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-#define CATCH_CONFIG_MAIN
-
#include <catch2/catch.hpp>
#include <service-cellular/src/SMSPartsHandler.hpp>
@@ 149,4 147,4 @@ TEST_CASE("EGD-7372 cases")
CHECK(parts.getNextSmsPart().length() <= singleSMSLimitUCS2);
CHECK(parts.getNextSmsPart().length() <= singleSMSLimitUCS2);
}
-}>
\ No newline at end of file
+}
M module-services/service-cellular/tests/unittest_smssendhandler.cpp => module-services/service-cellular/tests/unittest_smssendhandler.cpp +0 -2
@@ 1,8 1,6 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-#define CATCH_CONFIG_MAIN
-
#include <catch2/catch.hpp>
#include <service-cellular/src/SMSSendHandler.hpp>
M module-services/service-cellular/tests/unittest_tetheringHandler.cpp => module-services/service-cellular/tests/unittest_tetheringHandler.cpp +0 -2
@@ 1,8 1,6 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-#define CATCH_CONFIG_MAIN
-
#include <catch2/catch.hpp>
#include <module-services/service-cellular/src/TetheringHandler.hpp>
M module-services/service-db/test/CMakeLists.txt => module-services/service-db/test/CMakeLists.txt +0 -2
@@ 3,7 3,6 @@ add_catch2_executable(
NAME
service-db
SRCS
- main.cpp
test-service-db-api.cpp
test-service-db-settings-messages.cpp
test-service-db-quotes.cpp
@@ 24,7 23,6 @@ add_catch2_executable(
NAME
entry-path
SRCS
- main.cpp
test-entry-path.cpp
${CMAKE_SOURCE_DIR}/module-services/service-db/EntryPath.cpp
LIBS
D module-services/service-db/test/main.cpp => module-services/service-db/test/main.cpp +0 -5
@@ 1,5 0,0 @@
-// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
-// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-
-#define CATCH_CONFIG_MAIN
-#include <catch2/catch.hpp>
M module-services/service-db/test/test-settings-Settings/CMakeLists.txt => module-services/service-db/test/test-settings-Settings/CMakeLists.txt +0 -1
@@ 3,7 3,6 @@ add_catch2_executable(
NAME
settings-Settings
SRCS
- main.cpp
test-settings-Interface.cpp
test-settings-Settings.cpp
${CMAKE_SOURCE_DIR}/module-services/service-db/agents/settings/Settings.cpp
D module-services/service-db/test/test-settings-Settings/main.cpp => module-services/service-db/test/test-settings-Settings/main.cpp +0 -5
@@ 1,5 0,0 @@
-// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
-// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-
-#define CATCH_CONFIG_MAIN
-#include <catch2/catch.hpp>
M module-services/service-desktop/tests/CMakeLists.txt => module-services/service-desktop/tests/CMakeLists.txt +0 -1
@@ 17,7 17,6 @@ add_catch2_executable(
service-desktop
SRCS
unittest.cpp
- tests-main.cpp
LIBS
service-desktop
module-utils
D module-services/service-desktop/tests/tests-main.cpp => module-services/service-desktop/tests/tests-main.cpp +0 -5
@@ 1,5 0,0 @@
-// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
-// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-
-#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file
-#include <catch2/catch.hpp>
M module-services/service-evtmgr/tests/CMakeLists.txt => module-services/service-evtmgr/tests/CMakeLists.txt +0 -1
@@ 2,7 2,6 @@
NAME
service-evtmgr
SRCS
- tests-main.cpp
test-ScreenLightControlFunctions.cpp
LIBS
service-evtmgr
D module-services/service-evtmgr/tests/tests-main.cpp => module-services/service-evtmgr/tests/tests-main.cpp +0 -5
@@ 1,5 0,0 @@
-// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
-// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-
-#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file
-#include <catch2/catch.hpp>
M module-services/service-gui/tests/CMakeLists.txt => module-services/service-gui/tests/CMakeLists.txt +0 -3
@@ 2,7 2,6 @@ add_catch2_executable(
NAME
context-pool-tests
SRCS
- tests-main.cpp
test-ContextPool.cpp
MockedSynchronizationMechanism.hpp
LIBS
@@ 13,7 12,6 @@ add_catch2_executable(
NAME
commands-queue-tests
SRCS
- tests-main.cpp
test-DrawCommandsQueue.cpp
MockedSynchronizationMechanism.hpp
LIBS
@@ 24,7 22,6 @@ add_catch2_executable(
NAME
render-cache-tests
SRCS
- tests-main.cpp
test-RenderCache.cpp
LIBS
service-gui
D module-services/service-gui/tests/tests-main.cpp => module-services/service-gui/tests/tests-main.cpp +0 -5
@@ 1,5 0,0 @@
-// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
-// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-
-#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file
-#include <catch2/catch.hpp>
M module-services/service-time/tests/CMakeLists.txt => module-services/service-time/tests/CMakeLists.txt +0 -1
@@ 12,7 12,6 @@ add_catch2_executable(
NAME
service-time-alarm-tests
SRCS
- tests-main.cpp
tests-AlarmHandlerFactory.cpp
MockAlarmHandler.hpp
LIBS
D module-services/service-time/tests/tests-main.cpp => module-services/service-time/tests/tests-main.cpp +0 -5
@@ 1,5 0,0 @@
-// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
-// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-
-#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file
-#include <catch2/catch.hpp>
M module-services/service-time/tests/unittest_timezone_handler.cpp => module-services/service-time/tests/unittest_timezone_handler.cpp +0 -2
@@ 1,8 1,6 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-#define CATCH_CONFIG_MAIN
-
#include <module-services/service-time/service-time/TimezoneHandler.hpp>
#include <catch2/catch.hpp>
M module-sys/Service/tests/CMakeLists.txt => module-sys/Service/tests/CMakeLists.txt +1 -2
@@ 2,8 2,7 @@ add_catch2_executable(
NAME
system_messages-tests
SRCS
- tests-main.cpp
test-system_messages.cpp
LIBS
module-sys
-)>
\ No newline at end of file
+)
D module-sys/Service/tests/tests-main.cpp => module-sys/Service/tests/tests-main.cpp +0 -5
@@ 1,5 0,0 @@
-// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
-// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-
-#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file
-#include <catch2/catch.hpp>
M module-sys/SystemManager/tests/CMakeLists.txt => module-sys/SystemManager/tests/CMakeLists.txt +1 -2
@@ 2,7 2,6 @@ add_catch2_executable(
NAME
dependency-graph-tests
SRCS
- tests-main.cpp
test-DependencyGraph.cpp
LIBS
module-sys
@@ 15,4 14,4 @@ add_catch2_executable(
unittest_CpuSentinelsGovernor.cpp
LIBS
module-sys
-)>
\ No newline at end of file
+)
D module-sys/SystemManager/tests/tests-main.cpp => module-sys/SystemManager/tests/tests-main.cpp +0 -5
@@ 1,5 0,0 @@
-// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
-// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-
-#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file
-#include <catch2/catch.hpp>
M module-sys/SystemManager/tests/unittest_CpuSentinelsGovernor.cpp => module-sys/SystemManager/tests/unittest_CpuSentinelsGovernor.cpp +0 -2
@@ 1,8 1,6 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-#define CATCH_CONFIG_MAIN
-
#include <catch2/catch.hpp>
#include <SystemManager/CpuGovernor.hpp>
#include <SystemManager/CpuSentinel.hpp>
M module-utils/Clipboard/test/unittest_clipboard.cpp => module-utils/Clipboard/test/unittest_clipboard.cpp +0 -2
@@ 6,8 6,6 @@
#include <memory>
#include <unistd.h>
-#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file
-
#include <catch2/catch.hpp>
#include <Clipboard.hpp>
M module-utils/i18n/tests/test_i18n.cpp => module-utils/i18n/tests/test_i18n.cpp +0 -1
@@ 1,7 1,6 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file
#include <catch2/catch.hpp>
#include <i18n/i18n.hpp>
M module-utils/log/tests/test_LoggerBuffer.cpp => module-utils/log/tests/test_LoggerBuffer.cpp +0 -1
@@ 1,7 1,6 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file
#include <catch2/catch.hpp>
#include "RandomStringGenerator.hpp"
M module-utils/log/tests/test_log.cpp => module-utils/log/tests/test_log.cpp +0 -1
@@ 1,7 1,6 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file
#include <catch2/catch.hpp>
#include <log/log.hpp>
M module-utils/log/tests/test_logDumps.cpp => module-utils/log/tests/test_logDumps.cpp +0 -1
@@ 1,7 1,6 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file
#include <catch2/catch.hpp>
#include <string>
M module-utils/math/tests/test_math.cpp => module-utils/math/tests/test_math.cpp +0 -2
@@ 1,8 1,6 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file
-
#include <catch2/catch.hpp>
#include <Math.hpp>
M module-utils/phonenumber/tests/unittest_phonenumber.cpp => module-utils/phonenumber/tests/unittest_phonenumber.cpp +0 -1
@@ 4,7 4,6 @@
#include "PhoneNumber.hpp"
#include "country.hpp"
-#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include <string>
M module-utils/rotator/tests/test_Rotator.cpp => module-utils/rotator/tests/test_Rotator.cpp +2 -2
@@ 1,11 1,11 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-#define CATCH_CONFIG_MAIN
-
#include <catch2/catch.hpp>
+
#include <rotator/Rotator.hpp>
+#include <fstream>
#include <iostream>
#include <filesystem>
M module-utils/rrule/test/unittest_rrule.cpp => module-utils/rrule/test/unittest_rrule.cpp +0 -2
@@ 11,8 11,6 @@
#include <chrono>
#include <regex>
-#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file
-
#include <catch2/catch.hpp>
namespace rrule
M module-utils/time/test/unittest_TimeRangeParser.cpp => module-utils/time/test/unittest_TimeRangeParser.cpp +0 -1
@@ 1,7 1,6 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include <time/TimeRangeParser.hpp>
M module-utils/time/test/unittest_TimeZone.cpp => module-utils/time/test/unittest_TimeZone.cpp +0 -1
@@ 1,7 1,6 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include <time/TimeZone.hpp>
#include <chrono>
M module-utils/time/test/unittest_dateCommon.cpp => module-utils/time/test/unittest_dateCommon.cpp +0 -1
@@ 1,7 1,6 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include <time/dateCommon.hpp>
M module-utils/time/test/unittest_time.cpp => module-utils/time/test/unittest_time.cpp +0 -2
@@ 13,8 13,6 @@
#include "time/time_conversion_factory.hpp"
#include "mock/TimeSettingsMock.hpp"
-#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file
-
#include <catch2/catch.hpp>
using namespace utils::time;
M module-utils/unicode/ucs2/test/unittest_ucs2.cpp => module-utils/unicode/ucs2/test/unittest_ucs2.cpp +0 -1
@@ 1,7 1,6 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file
#include <catch2/catch.hpp>
#include <ucs2/UCS2.hpp>
M module-utils/unicode/utf8/test/unittest_utf8.cpp => module-utils/unicode/utf8/test/unittest_utf8.cpp +0 -1
@@ 1,7 1,6 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file
#include <catch2/catch.hpp>
#include "utf8/UTF8.hpp"
M module-utils/utility/tests/test-Utility-ConditionalInvoke.cpp => module-utils/utility/tests/test-Utility-ConditionalInvoke.cpp +0 -1
@@ 1,7 1,6 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include <Utility.hpp>
M module-utils/utility/tests/unittest_utils.cpp => module-utils/utility/tests/unittest_utils.cpp +0 -3
@@ 5,9 5,6 @@
#include <filesystem>
#include <iostream>
#include <memory>
-#include <unistd.h>
-
-#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file
#include <catch2/catch.hpp>
M module-vfs/tests/unittest_filesystem_inotify.cpp => module-vfs/tests/unittest_filesystem_inotify.cpp +1 -1
@@ 1,6 1,6 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-#define CATCH_CONFIG_MAIN
+
#include <catch2/catch.hpp>
#include <purefs/fs/notifier.hpp>
#include <purefs/fs/inotify_message.hpp>
M products/BellHybrid/services/evtmgr/tests/unittest_GenericLongPressSequence.cpp => products/BellHybrid/services/evtmgr/tests/unittest_GenericLongPressSequence.cpp +0 -1
@@ 1,6 1,5 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include <internal/key_sequences/GenericLongPressSequence.hpp>
M products/BellHybrid/services/evtmgr/tests/unittest_KeySequenceMgr.cpp => products/BellHybrid/services/evtmgr/tests/unittest_KeySequenceMgr.cpp +0 -2
@@ 1,8 1,6 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-#define CATCH_CONFIG_MAIN
-
#include <catch2/catch.hpp>
#include <internal/key_sequences/KeySequenceMgr.hpp>
#include <internal/key_sequences/GenericLongPressSequence.hpp>
M products/PurePhone/test/test-settings/CMakeLists.txt => products/PurePhone/test/test-settings/CMakeLists.txt +0 -1
@@ 3,7 3,6 @@ add_catch2_executable(
NAME
service-db-settings
SRCS
- main.cpp
test-service-db-settings-api.cpp
LIBS
db
D products/PurePhone/test/test-settings/main.cpp => products/PurePhone/test/test-settings/main.cpp +0 -5
@@ 1,5 0,0 @@
-// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
-// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-
-#define CATCH_CONFIG_MAIN
-#include <catch2/catch.hpp>
M test/CMakeLists.txt => test/CMakeLists.txt +7 -1
@@ 120,6 120,12 @@ function(add_gtest_executable)
set_tests_properties(${_TEST_LIST} PROPERTIES LABELS ${_TEST_LABELS})
endfunction()
+# Compile Catch2 main entry point as a separate cmake target. This way, it is not needed to recompile the whole catch2
+# each time something changes inside specific test case.
+add_library(catch2_main STATIC catch2_main.cpp)
+add_library(Catch2::main ALIAS catch2_main)
+target_link_libraries(catch2_main PUBLIC Catch2::Catch2)
+
function(add_catch2_executable)
cmake_parse_arguments(
_TEST_ARGS
@@ 158,7 164,7 @@ function(add_catch2_executable)
enable_test_filesystem()
endif()
- target_link_libraries(${_TESTNAME} PRIVATE Catch2::Catch2 log-api)
+ target_link_libraries(${_TESTNAME} PRIVATE Catch2::main log-api)
foreach(lib ${_TEST_ARGS_LIBS})
target_link_libraries(${_TESTNAME} PRIVATE ${lib})
endforeach(lib)
R module-apps/application-alarm-clock/tests/tests-main.cpp => test/catch2_main.cpp +1 -0
@@ 2,4 2,5 @@
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file
+
#include <catch2/catch.hpp>