Browse Source

[trac510] fix tests in src/bin/auth

Yoshitaka Aharen 13 years ago
parent
commit
2cd7de7f84
1 changed files with 3 additions and 2 deletions
  1. 3 2
      src/bin/auth/tests/statistics_unittest.cc

+ 3 - 2
src/bin/auth/tests/statistics_unittest.cc

@@ -156,8 +156,9 @@ TEST_F(AuthCountersTest, incrementTCPCounter) {
 }
 
 TEST_F(AuthCountersTest, incrementInvalidCounter) {
-    // Expect to die.
-    EXPECT_DEATH(counters.inc(AuthCounters::SERVER_COUNTER_TYPES), "Assertion.+failed");
+    // Expect to throw an isc::OutOfRange
+    EXPECT_THROW(counters.inc(AuthCounters::SERVER_COUNTER_TYPES),
+                 isc::OutOfRange);
 }
 
 TEST_F(AuthCountersTest, submitStatisticsWithoutSession) {