[gjs/wip/3v1n0/toggle-queue-tests: 4/4] test: Move gjs-test code into Gjs::Test namespace




commit 416e33d4c1615b9e08dd0310dd5faf51d9a57d5b
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date:   Sun May 16 16:55:33 2021 +0200

    test: Move gjs-test code into Gjs::Test namespace
    
    Will help avoiding clashes in unity builds

 test/gjs-tests.cpp | 7 +++++++
 1 file changed, 7 insertions(+)
---
diff --git a/test/gjs-tests.cpp b/test/gjs-tests.cpp
index 60928c22..e49d5808 100644
--- a/test/gjs-tests.cpp
+++ b/test/gjs-tests.cpp
@@ -45,6 +45,8 @@ void g_assertion_message(const char*, const char*, int, const char*,
 
 #define VALID_UTF8_STRING "\303\211\303\226 foobar \343\203\237"
 
+namespace Gjs {
+namespace Test {
 static unsigned cpp_random_seed = 0;
 
 using Gjs::Test::assert_equal;
@@ -847,10 +849,15 @@ static void gjstest_test_func_gjs_context_argv_array() {
     g_assert_false(ok);
 }
 
+}  // namespace Test
+}  // namespace Gjs
+
 int
 main(int    argc,
      char **argv)
 {
+    using namespace Gjs::Test;  // NOLINT(build/namespaces)
+
     /* Avoid interference in the tests from stray environment variable */
     g_unsetenv("GJS_ENABLE_PROFILER");
     g_unsetenv("GJS_TRACE_FD");


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]