Commit c2d30a88 authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

build test cases using the death test only when it's supported. (it's not...

build test cases using the death test only when it's supported.  (it's not marked as "supported" for BSDs)
okayed in jabber.


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@3846 e5f2f494-b856-4b98-b285-d166d9295462
parent de4ae8a0
......@@ -52,12 +52,14 @@ private:
const static int max_ = 10;
};
/// Some validation tests will incur performance penalty, so the tests are
/// made only in "debug" version with assert(). But if NDEBUG is defined
/// the tests will be failed since assert() is non-op in non-debug version.
/// The "#ifndef NDEBUG" is added to make the tests be performed only in
/// non-debug environment.
#ifndef NDEBUG
// Some validation tests will incur performance penalty, so the tests are
// made only in "debug" version with assert(). But if NDEBUG is defined
// the tests will be failed since assert() is non-op in non-debug version.
// The "#ifndef NDEBUG" is added to make the tests be performed only in
// non-debug environment.
// Note: the death test is not supported by all platforms. We need to
// compile tests using it selectively.
#if !defined(NDEBUG) && defined(GTEST_HAS_DEATH_TEST)
// Test of the constructor
TEST_F(UniformRandomIntegerGeneratorTest, Constructor) {
// The range must be min<=max
......@@ -107,7 +109,7 @@ TEST_F(WeightedRandomIntegerGeneratorTest, Constructor) {
/// the tests will be failed since assert() is non-op in non-debug version.
/// The "#ifndef NDEBUG" is added to make the tests be performed only in
/// non-debug environment.
#ifndef NDEBUG
#if !defined(NDEBUG) && defined(GTEST_HAS_DEATH_TEST)
//The probability must be >= 0
probabilities.push_back(-0.1);
probabilities.push_back(1.1);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment