Skip to content

Commit 58f155c

Browse files
committed
Use namespace test_scoped_critical_section_ns (standard approach to guard against name clashes).
1 parent 009756f commit 58f155c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/test_scoped_critical_section.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
# include <barrier>
1313
#endif
1414

15+
namespace test_scoped_critical_section_ns {
16+
1517
// Referenced test implementation: https://github.com/PyO3/pyo3/blob/v0.25.0/src/sync.rs#L874
1618
class BoolWrapper {
1719
public:
@@ -157,7 +159,11 @@ void test_scoped_critical_section2_same_object_no_deadlock(const py::handle &) {
157159

158160
#endif
159161

162+
} // namespace test_scoped_critical_section_ns
163+
160164
TEST_SUBMODULE(scoped_critical_section, m) {
165+
using namespace test_scoped_critical_section_ns;
166+
161167
m.attr("defined_THREAD_SANITIZER") =
162168
#if defined(THREAD_SANITIZER)
163169
true;

0 commit comments

Comments
 (0)