[gjs/wip/3v1n0/toggle-queue-tests: 4/4] test: Move gjs-test code into Gjs::Test namespace
- From: Marco Trevisan <marcotrevi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs/wip/3v1n0/toggle-queue-tests: 4/4] test: Move gjs-test code into Gjs::Test namespace
- Date: Sun, 16 May 2021 14:56:46 +0000 (UTC)
commit 561ac0144c8dd4e18816b7e36fa11a7c6c77a99e
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 | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/test/gjs-tests.cpp b/test/gjs-tests.cpp
index 9034d879..64c247c7 100644
--- a/test/gjs-tests.cpp
+++ b/test/gjs-tests.cpp
@@ -45,10 +45,10 @@ 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 namespace Gjs::Test; // NOLINT(build/namespaces)
-
template <typename T>
T get_random_number() {
std::mt19937_64 gen(cpp_random_seed);
@@ -847,10 +847,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]