]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[master] make the intentional dup'ed log messages for test consistent.
authorJINMEI Tatuya <jinmei@isc.org>
Thu, 14 Jun 2012 04:08:26 +0000 (21:08 -0700)
committerJINMEI Tatuya <jinmei@isc.org>
Thu, 14 Jun 2012 04:08:26 +0000 (21:08 -0700)
otherwise it might cause failure with --enable-logger-checks, depending on
which one is initialized first (which is ultimately enviornment dependent).
should be obvious, and also okayed on jabber.

made one piggyback cleanup: use an unnamed namespace instead of file-scope
static, and hid the initializer there, too.

src/lib/log/tests/message_dictionary_unittest.cc

index 394fea0a738662493a425fec0b3dfa758fa31418..b8bded364c797a9bec98973ecef6814015e6e4c9 100644 (file)
@@ -28,16 +28,17 @@ using namespace std;
 // global dictionary is loaded, the former should be marked as a duplicate
 // and the latter should be present.
 
-static const char* values[] = {
-    "LOG_DUPLICATE_NAMESPACE", "duplicate $NAMESPACE directive found",
+namespace {
+const char* values[] = {
+    // This message for DUPLICATE_NAMESPACE must be copied from
+    // ../log_messages.mes; otherwise logger check might fail.
+    "LOG_DUPLICATE_NAMESPACE", "line %1: duplicate $NAMESPACE directive found",
     "NEWSYM", "new symbol added",
     NULL
 };
 
 MessageInitializer init(values);
-
-
-
+}
 
 class MessageDictionaryTest : public ::testing::Test {
 protected: