/// \brief Obtain pending load count
///
- /// Returns a count of the message of message arrays that have been
- /// registered with this class and will be loaded with the next call
- /// to loadDictionary().
+ /// Returns the number of message arrays that will be loaded by the next
+ /// call to loadDictionary().
///
/// \return Number of registered message arrays. This is reset to zero
/// when loadDictionary() is called.
Logger l2(ok2.c_str());
EXPECT_EQ(getRootLoggerName() + "." + ok2, l2.getName());
+ // Note: Not all systems have EXPECT_DEATH. As it is a macro we can just
+ // test for its presence and bypass the test if not available.
+#ifdef EXPECT_DEATH
// Too long a logger name should trigger an assertion failure.
// Note that we just check that it dies - we don't check what message is
// output.
- ASSERT_DEATH({
+ EXPECT_DEATH({
string ok3(Logger::MAX_LOGGER_NAME_SIZE + 1, 'x');
Logger l3(ok3.c_str());
}, ".*");
-
+#endif
}
-// Copyright (C) 2011 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2012 Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
-#include <string>
-#include <gtest/gtest.h>
-#include <boost/lexical_cast.hpp>
#include <log/message_dictionary.h>
#include <log/message_initializer.h>
+#include <boost/lexical_cast.hpp>
+#include <gtest/gtest.h>
+#include <string>
using namespace isc;
using namespace isc::log;
-// Copyright (C) 2011 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2012 Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
-// Copyright (C) 2011 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2012 Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
-#include <gtest/gtest.h>
#include <log/message_initializer.h>
+#include <gtest/gtest.h>
using namespace isc::log;
MessageInitializer initializer1(values);
}
+ // Note: Not all systems have EXPECT_DEATH. As it is a macro we can just
+ // test for its presence and bypass the test if not available.
+#ifdef EXPECT_DEATH
// Adding one more should take us over the limit.
- ASSERT_DEATH({
+ EXPECT_DEATH({
MessageInitializer initializer2(values);
}, ".*");
+#endif
}