Skip to content

Commit

Permalink
Update Catch2 to version 3.4.0 (#1287)
Browse files Browse the repository at this point in the history
  • Loading branch information
ibc authored Jan 1, 2024
1 parent e4f4991 commit 28ff4a7
Show file tree
Hide file tree
Showing 46 changed files with 65 additions and 73 deletions.
15 changes: 7 additions & 8 deletions worker/subprojects/catch2.wrap
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
[wrap-file]
directory = Catch2-2.13.7
source_url = https://github.com/catchorg/Catch2/archive/v2.13.7.zip
source_filename = Catch2-2.13.7.zip
source_hash = 3f3ccd90ad3a8fbb1beeb15e6db440ccdcbebe378dfd125d07a1f9a587a927e9
patch_filename = catch2_2.13.7-1_patch.zip
patch_url = https://wrapdb.mesonbuild.com/v2/catch2_2.13.7-1/get_patch
patch_hash = 2f7369645d747e5bd866317ac1dd4c3d04dc97d3aad4fc6b864bdf75d3b57158
directory = Catch2-3.4.0
source_url = https://github.com/catchorg/Catch2/archive/v3.4.0.tar.gz
source_filename = Catch2-3.4.0.tar.gz
source_hash = 122928b814b75717316c71af69bd2b43387643ba076a6ec16e7882bfb2dfacbb
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/catch2_3.4.0-1/Catch2-3.4.0.tar.gz
wrapdb_version = 3.4.0-1

[provide]
catch2 = catch2_dep

catch2-with-main = catch2_with_main_dep
29 changes: 11 additions & 18 deletions worker/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,32 +393,25 @@ def test(ctx):
shell=SHELL
);

mediasoup_worker_test = 'mediasoup-worker-test.exe' if os.name == 'nt' else 'mediasoup-worker-test';
mediasoup_test_tags = os.getenv('MEDIASOUP_TEST_TAGS') or '';

# On Windows lcov doesn't work (at least not yet) and we need to add .exe to
# the binary path.
if os.name == 'nt':
with ctx.cd(WORKER_DIR):
ctx.run(
f'"{BUILD_DIR}/mediasoup-worker-test.exe" --invisibles --use-colour=yes {mediasoup_test_tags}',
echo=True,
pty=PTY_SUPPORTED,
shell=SHELL
);
else:
# On Windows lcov doesn't work (at least not yet).
if os.name != 'nt':
ctx.run(
f'"{LCOV}" --directory "{WORKER_DIR}" --zerocounters',
echo=True,
pty=PTY_SUPPORTED,
shell=SHELL
);
with ctx.cd(WORKER_DIR):
ctx.run(
f'"{BUILD_DIR}/mediasoup-worker-test" --invisibles --use-colour=yes {mediasoup_test_tags}',
echo=True,
pty=PTY_SUPPORTED,
shell=SHELL
);

with ctx.cd(WORKER_DIR):
ctx.run(
f'"{BUILD_DIR}/{mediasoup_worker_test}" --invisibles --colour-mode=ansi {mediasoup_test_tags}',
echo=True,
pty=PTY_SUPPORTED,
shell=SHELL
);


@task(pre=[setup, flatc])
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "common.hpp"
#include "PayloadChannel/PayloadChannelNotification.hpp"
#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>

SCENARIO("PayloadChannelNotification", "[channel][notification]")
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "common.hpp"
#include "PayloadChannel/PayloadChannelRequest.hpp"
#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>

SCENARIO("PayloadChannelRequest", "[channel][request]")
{
Expand Down
2 changes: 1 addition & 1 deletion worker/test/src/RTC/Codecs/TestH264.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "common.hpp"
#include "RTC/Codecs/H264.hpp"
#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>
#include <cstring> // std::memcmp()

using namespace RTC;
Expand Down
2 changes: 1 addition & 1 deletion worker/test/src/RTC/Codecs/TestH264_SVC.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "common.hpp"
#include "RTC/Codecs/H264_SVC.hpp"
#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>
#include <cstring> // std::memcmp()

using namespace RTC;
Expand Down
2 changes: 1 addition & 1 deletion worker/test/src/RTC/Codecs/TestVP8.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "common.hpp"
#include "RTC/Codecs/VP8.hpp"
#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>
#include <cstring> // std::memcmp(), std::memcpy()

using namespace RTC;
Expand Down
2 changes: 1 addition & 1 deletion worker/test/src/RTC/Codecs/TestVP9.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "common.hpp"
#include "RTC/Codecs/VP9.hpp"
#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>
#include <cstring> // std::memcmp()

using namespace RTC;
Expand Down
2 changes: 1 addition & 1 deletion worker/test/src/RTC/RTCP/TestBye.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "common.hpp"
#include "RTC/RTCP/Bye.hpp"
#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>
#include <cstring> // std::memcmp()
#include <string>

Expand Down
2 changes: 1 addition & 1 deletion worker/test/src/RTC/RTCP/TestFeedbackPsAfb.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "common.hpp"
#include "RTC/RTCP/FeedbackPsAfb.hpp"
#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>
#include <cstring> // std::memcmp()

using namespace RTC::RTCP;
Expand Down
2 changes: 1 addition & 1 deletion worker/test/src/RTC/RTCP/TestFeedbackPsFir.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "common.hpp"
#include "RTC/RTCP/FeedbackPsFir.hpp"
#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>
#include <cstring> // std::memcmp()

using namespace RTC::RTCP;
Expand Down
2 changes: 1 addition & 1 deletion worker/test/src/RTC/RTCP/TestFeedbackPsLei.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "common.hpp"
#include "RTC/RTCP/FeedbackPsLei.hpp"
#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>
#include <cstring> // std::memcmp()

using namespace RTC::RTCP;
Expand Down
2 changes: 1 addition & 1 deletion worker/test/src/RTC/RTCP/TestFeedbackPsPli.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "common.hpp"
#include "RTC/RTCP/FeedbackPsPli.hpp"
#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>
#include <cstring> // std::memcmp()

using namespace RTC::RTCP;
Expand Down
2 changes: 1 addition & 1 deletion worker/test/src/RTC/RTCP/TestFeedbackPsRemb.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "common.hpp"
#include "RTC/RTCP/FeedbackPsRemb.hpp"
#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>
#include <cstring> // std::memcmp()

using namespace RTC::RTCP;
Expand Down
2 changes: 1 addition & 1 deletion worker/test/src/RTC/RTCP/TestFeedbackPsRpsi.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "common.hpp"
#include "RTC/RTCP/FeedbackPsRpsi.hpp"
#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>
#include <cstring> // std::memcmp()

using namespace RTC::RTCP;
Expand Down
2 changes: 1 addition & 1 deletion worker/test/src/RTC/RTCP/TestFeedbackPsSli.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "common.hpp"
#include "RTC/RTCP/FeedbackPsSli.hpp"
#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>
#include <cstring> // std::memcmp()

using namespace RTC::RTCP;
Expand Down
2 changes: 1 addition & 1 deletion worker/test/src/RTC/RTCP/TestFeedbackPsTst.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "common.hpp"
#include "RTC/RTCP/FeedbackPsTst.hpp"
#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>
#include <cstring> // std::memcmp()

using namespace RTC::RTCP;
Expand Down
2 changes: 1 addition & 1 deletion worker/test/src/RTC/RTCP/TestFeedbackPsVbcm.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "common.hpp"
#include "RTC/RTCP/FeedbackPsVbcm.hpp"
#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>
#include <cstring> // std::memcmp()

using namespace RTC::RTCP;
Expand Down
2 changes: 1 addition & 1 deletion worker/test/src/RTC/RTCP/TestFeedbackRtpEcn.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "common.hpp"
#include "RTC/RTCP/FeedbackRtpEcn.hpp"
#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>
#include <cstring> // std::memcmp()

using namespace RTC::RTCP;
Expand Down
2 changes: 1 addition & 1 deletion worker/test/src/RTC/RTCP/TestFeedbackRtpNack.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "common.hpp"
#include "RTC/RTCP/FeedbackRtpNack.hpp"
#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>
#include <cstring> // std::memcmp()

using namespace RTC::RTCP;
Expand Down
2 changes: 1 addition & 1 deletion worker/test/src/RTC/RTCP/TestFeedbackRtpSrReq.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "common.hpp"
#include "RTC/RTCP/FeedbackRtpSrReq.hpp"
#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>
#include <cstring> // std::memcmp()

using namespace RTC::RTCP;
Expand Down
2 changes: 1 addition & 1 deletion worker/test/src/RTC/RTCP/TestFeedbackRtpTllei.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "common.hpp"
#include "RTC/RTCP/FeedbackRtpTllei.hpp"
#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>
#include <cstring> // std::memcmp()

using namespace RTC::RTCP;
Expand Down
2 changes: 1 addition & 1 deletion worker/test/src/RTC/RTCP/TestFeedbackRtpTmmb.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "common.hpp"
#include "RTC/RTCP/FeedbackRtpTmmb.hpp"
#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>
#include <cstring> // std::memcmp()

using namespace RTC::RTCP;
Expand Down
2 changes: 1 addition & 1 deletion worker/test/src/RTC/RTCP/TestFeedbackRtpTransport.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "common.hpp"
#include "Logger.hpp"
#include "RTC/RTCP/FeedbackRtpTransport.hpp"
#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>
#include <cstring> // std::memcmp()

using namespace RTC::RTCP;
Expand Down
2 changes: 1 addition & 1 deletion worker/test/src/RTC/RTCP/TestPacket.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "common.hpp"
#include "RTC/RTCP/Packet.hpp"
#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>

using namespace RTC::RTCP;

Expand Down
2 changes: 1 addition & 1 deletion worker/test/src/RTC/RTCP/TestReceiverReport.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "common.hpp"
#include "RTC/RTCP/ReceiverReport.hpp"
#include "RTC/RTCP/SenderReport.hpp" // sizeof(SenderReport::Header)
#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>

using namespace RTC::RTCP;

Expand Down
2 changes: 1 addition & 1 deletion worker/test/src/RTC/RTCP/TestSdes.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "common.hpp"
#include "RTC/RTCP/Packet.hpp"
#include "RTC/RTCP/Sdes.hpp"
#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>
#include <cstring> // std::memcmp()
#include <string>

Expand Down
2 changes: 1 addition & 1 deletion worker/test/src/RTC/RTCP/TestSenderReport.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "common.hpp"
#include "RTC/RTCP/SenderReport.hpp"
#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>
#include <cstring> // std::memcmp()

using namespace RTC::RTCP;
Expand Down
2 changes: 1 addition & 1 deletion worker/test/src/RTC/RTCP/TestXr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include "RTC/RTCP/XR.hpp"
#include "RTC/RTCP/XrDelaySinceLastRr.hpp"
#include "RTC/RTCP/XrReceiverReferenceTime.hpp"
#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>
#include <cstring> // std::memcmp(), std::memcpy()

using namespace RTC::RTCP;
Expand Down
2 changes: 1 addition & 1 deletion worker/test/src/RTC/TestKeyFrameRequestManager.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "common.hpp"
#include "DepLibUV.hpp"
#include "RTC/KeyFrameRequestManager.hpp"
#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>

using namespace RTC;

Expand Down
2 changes: 1 addition & 1 deletion worker/test/src/RTC/TestNackGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "RTC/Codecs/PayloadDescriptorHandler.hpp"
#include "RTC/NackGenerator.hpp"
#include "RTC/RtpPacket.hpp"
#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>
#include <vector>

using namespace RTC;
Expand Down
2 changes: 1 addition & 1 deletion worker/test/src/RTC/TestRateCalculator.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "common.hpp"
#include "DepLibUV.hpp"
#include "RTC/RateCalculator.hpp"
#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>
#include <vector>

using namespace RTC;
Expand Down
2 changes: 1 addition & 1 deletion worker/test/src/RTC/TestRtpEncodingParameters.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "common.hpp"
#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>
#include <regex>

static const std::regex ScalabilityModeRegex(
Expand Down
2 changes: 1 addition & 1 deletion worker/test/src/RTC/TestRtpPacket.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "common.hpp"
#include "helpers.hpp"
#include "RTC/RtpPacket.hpp"
#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>
#include <cstring> // std::memset()
#include <string>
#include <vector>
Expand Down
2 changes: 1 addition & 1 deletion worker/test/src/RTC/TestRtpPacketH264Svc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include "helpers.hpp"
#include "RTC/Codecs/H264_SVC.hpp"
#include "RTC/RtpPacket.hpp"
#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>
#include <cstring> // std::memset()
#include <sstream>
#include <string>
Expand Down
2 changes: 1 addition & 1 deletion worker/test/src/RTC/TestRtpRetransmissionBuffer.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "common.hpp"
#include "RTC/RtpPacket.hpp"
#include "RTC/RtpRetransmissionBuffer.hpp"
#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>
#include <vector>

using namespace RTC;
Expand Down
2 changes: 1 addition & 1 deletion worker/test/src/RTC/TestRtpStreamRecv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "RTC/RtpPacket.hpp"
#include "RTC/RtpStream.hpp"
#include "RTC/RtpStreamRecv.hpp"
#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>
#include <vector>

using namespace RTC;
Expand Down
2 changes: 1 addition & 1 deletion worker/test/src/RTC/TestRtpStreamSend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "RTC/RtpPacket.hpp"
#include "RTC/RtpStream.hpp"
#include "RTC/RtpStreamSend.hpp"
#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>
#include <vector>

// #define PERFORMANCE_TEST 1
Expand Down
2 changes: 1 addition & 1 deletion worker/test/src/RTC/TestSeqManager.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "common.hpp"
#include "RTC/SeqManager.hpp"
#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>
#include <string>
#include <vector>

Expand Down
2 changes: 1 addition & 1 deletion worker/test/src/RTC/TestTrendCalculator.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "common.hpp"
#include "RTC/TrendCalculator.hpp"
#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>

using namespace RTC;

Expand Down
2 changes: 1 addition & 1 deletion worker/test/src/Utils/TestBits.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "common.hpp"
#include "Utils.hpp"
#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>

SCENARIO("Utils::Bits::CountSetBits()")
{
Expand Down
2 changes: 1 addition & 1 deletion worker/test/src/Utils/TestByte.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "common.hpp"
#include "Utils.hpp"
#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>

SCENARIO("Utils::Byte")
{
Expand Down
Loading

0 comments on commit 28ff4a7

Please sign in to comment.