code/bot/create_ws/src/libcreate/tests/test_data.cpp
// Number of packets for a given protocol are determined in the Data() constructor
Number of packets for a given protocol are determined in the Data() constructor
Number of packets for a given protocol are determined in the Data () constructor
TEST(DataTest, GetNumPackets)
{
  create::Data data_v_1(create::V_1);
  EXPECT_EQ(static_cast<int>(data_v_1.getNumPackets()), 20);
  create::Data data_v_2(create::V_2);
  EXPECT_EQ(static_cast<int>(data_v_2.getNumPackets()), 20);
  create::Data data_v_3(create::V_3);
  EXPECT_EQ(static_cast<int>(data_v_3.getNumPackets()), 30);
  create::Data data_v_all(create::V_ALL);
  EXPECT_EQ(static_cast<int>(data_v_all.getNumPackets()), 33);
}
TEST ( DataTest , GetNumPackets ) { create :: Data data_v_1 ( create :: V_1 ) ; EXPECT_EQ ( static_cast < int > ( data_v_1 . getNumPackets ( ) ) , 20 ) ; create :: Data data_v_2 ( create :: V_2 ) ; EXPECT_EQ ( static_cast < int > ( data_v_2 . getNumPackets ( ) ) , 20 ) ; create :: Data data_v_3 ( create :: V_3 ) ; EXPECT_EQ ( static_cast < int > ( data_v_3 . getNumPackets ( ) ) , 30 ) ; create :: Data data_v_all ( create :: V_ALL ) ; EXPECT_EQ ( static_cast < int > ( data_v_all . getNumPackets ( ) ) , 33 ) ; }
Number of packets for a given protocol are determined in the Data() constructor
Number of packets for a given protocol are determined in the Data () constructor
// Number of packets shared by all protocols is 17 // Number exclusive to V_1 = 3 // 17 + 3 = 20 // Number exclusive to V_2 = 3 // 17 + 3 = 20 // Number exclusive to V_3 = 13 // 17 + 13 = 30