Skip to content

Commit

Permalink
Merge pull request tshino#42 from tshino/name-test-namespaces
Browse files Browse the repository at this point in the history
Add names to anonymous test namespaces
  • Loading branch information
tshino authored Nov 19, 2023
2 parents fecc1b7 + b5f7cc0 commit 459d664
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 12 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to the Softcam library will be documented in this file.

### [Unreleased]
- Refactoring:
- Named namespaces of each test code for better visualization. [#42](https://github.com/tshino/softcam/pull/42)

### [1.6] - 2023-09-10
- Fixed a deadlock issue. [#39](https://github.com/tshino/softcam/pull/39)

Expand Down
4 changes: 2 additions & 2 deletions tests/core_tests/DShowSoftcamTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <algorithm>


namespace {
namespace DShowSoftcamTest {
namespace sc = softcam;


Expand Down Expand Up @@ -960,4 +960,4 @@ TEST_F(SoftcamStream, releaseFrameBuffer_must_not_lock_the_filter_state)
}


} //namespace
} //namespace DShowSoftcamTest
4 changes: 2 additions & 2 deletions tests/core_tests/FrameBufferTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <thread>


namespace {
namespace FrameBufferTest {
namespace sc = softcam;


Expand Down Expand Up @@ -352,4 +352,4 @@ TEST(FrameBuffer, ReleaseOnReceiverDisconnects) {
EXPECT_EQ( sender.active(), true );
}

} //namespace
} //namespace FrameBufferTest
4 changes: 2 additions & 2 deletions tests/core_tests/MiscTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <cmath>


namespace {
namespace MiscTest {
namespace sc = softcam;

const char SHMEM_NAME[] = "shmemtest";
Expand Down Expand Up @@ -218,4 +218,4 @@ TEST(SharedMemory, MultipleOpenSucceeds) {
EXPECT_GE( view3.size(), SHMEM_SIZE );
}

} //namespace
} //namespace MiscTest
4 changes: 2 additions & 2 deletions tests/core_tests/SenderAPITest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <softcamcore/Misc.h>


namespace {
namespace SenderAPITest {
namespace sc = softcam;
namespace sender = softcam::sender;

Expand Down Expand Up @@ -346,4 +346,4 @@ TEST(SenderWaitForConnection, InvalidArgs)
EXPECT_EQ( ret, false );
}

} //namespace
} //namespace SenderAPITest
4 changes: 2 additions & 2 deletions tests/core_tests/WatchdogTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <chrono>


namespace {
namespace WatchdogTest {
namespace sc = softcam;

#define SLEEP_S(sec) \
Expand Down Expand Up @@ -143,4 +143,4 @@ TEST(Watchdog, MonitorTimeouts)
EXPECT_EQ( monitor.alive(), false );
}

} //namespace
} //namespace WatchdogTest
4 changes: 2 additions & 2 deletions tests/dll_tests/raw_api_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include <gtest/gtest.h>


namespace {
namespace RawAPITest {

TEST(scCreateCamera, Basic) {
{
Expand Down Expand Up @@ -93,4 +93,4 @@ TEST(scDeleteCamera, IgnoresInvalidPointer) {
scDeleteCamera(&x);
}

} //namespace
} //namespace RawAPITest

0 comments on commit 459d664

Please sign in to comment.