client/cpp/encoder_unittest.cc
// Negative tests
// num_bits is negative.
Negative tests
num_bits is negative.
Negative tests num_bits is negative .
TEST_F(EncoderUint32Test, NumBitsMustBePositiveDeathTest) {
  ::testing::FLAGS_gtest_death_test_style = "threadsafe";
  delete params;
  params = new rappor::Params(-1,    
                              2,     
                              128,   
                              0.25,  
                              0.75,  
                              0.5);  
  EXPECT_DEATH(rappor::Encoder(encoder_id, *params, *deps),
               "Assertion.*failed");
}
TEST_F ( EncoderUint32Test , NumBitsMustBePositiveDeathTest ) { :: testing :: FLAGS_gtest_death_test_style = " " ; delete params ; params = new rappor :: Params ( -1 , 2 , 128 , 0.25 , 0.75 , 0.5 ) ; EXPECT_DEATH ( rappor :: Encoder ( encoder_id , * params , * deps ) , " " ) ; }
Negative tests
num_bits is negative.
Negative tests num_bits is negative .
// num_bits (k) [BAD] // num_hashes (h) // num_cohorts (m) // probability f for PRR // probability p for IRR // probability q for IRR