mirror of
https://github.com/pavel-odintsov/fastnetmon
synced 2024-11-23 05:02:10 +01:00
Removed old tests
This commit is contained in:
parent
2839d989af
commit
f2a428772c
@ -3,9 +3,6 @@
|
||||
|
||||
#include "fast_library.hpp"
|
||||
|
||||
#include "bgp_protocol.hpp"
|
||||
#include "bgp_protocol_flow_spec.hpp"
|
||||
|
||||
#include <fstream>
|
||||
|
||||
#include "log4cpp/Appender.hh"
|
||||
@ -21,67 +18,6 @@
|
||||
|
||||
log4cpp::Category& logger = log4cpp::Category::getRoot();
|
||||
|
||||
// Flow Spec actions tests
|
||||
|
||||
TEST(BgpFlowSpecAction, rate_limit) {
|
||||
bgp_flow_spec_action_t my_action;
|
||||
my_action.set_type(FLOW_SPEC_ACTION_RATE_LIMIT);
|
||||
my_action.set_rate_limit(1024);
|
||||
|
||||
EXPECT_EQ(my_action.serialize(), "rate-limit 1024;");
|
||||
}
|
||||
|
||||
TEST(BgpFlowSpecAction, discard) {
|
||||
bgp_flow_spec_action_t my_action;
|
||||
my_action.set_type(FLOW_SPEC_ACTION_DISCARD);
|
||||
|
||||
EXPECT_EQ(my_action.serialize(), "discard;");
|
||||
}
|
||||
|
||||
TEST(BgpFlowSpecAction, accept) {
|
||||
bgp_flow_spec_action_t my_action;
|
||||
my_action.set_type(FLOW_SPEC_ACTION_ACCEPT);
|
||||
|
||||
EXPECT_EQ(my_action.serialize(), "accept;");
|
||||
}
|
||||
|
||||
TEST(BgpFlowSpecAction, default_constructor) {
|
||||
bgp_flow_spec_action_t my_action;
|
||||
|
||||
EXPECT_EQ(my_action.serialize(), "accept;");
|
||||
}
|
||||
|
||||
// Serializers tests
|
||||
|
||||
TEST(serialize_vector_by_string, single_element) {
|
||||
std::vector<std::string> vect;
|
||||
vect.push_back("123");
|
||||
|
||||
EXPECT_EQ(serialize_vector_by_string(vect, ","), "123");
|
||||
}
|
||||
|
||||
TEST(serialize_vector_by_string, few_elements) {
|
||||
std::vector<std::string> vect;
|
||||
vect.push_back("123");
|
||||
vect.push_back("456");
|
||||
|
||||
EXPECT_EQ(serialize_vector_by_string(vect, ","), "123,456");
|
||||
}
|
||||
|
||||
TEST(serialize_vector_by_string_with_prefix, single_element) {
|
||||
std::vector<uint16_t> vect;
|
||||
vect.push_back(123);
|
||||
|
||||
EXPECT_EQ(serialize_vector_by_string_with_prefix(vect, ",", "^"), "^123");
|
||||
}
|
||||
|
||||
TEST(serialize_vector_by_string_with_prefix, few_elements) {
|
||||
std::vector<uint16_t> vect;
|
||||
vect.push_back(123);
|
||||
vect.push_back(456);
|
||||
|
||||
EXPECT_EQ(serialize_vector_by_string_with_prefix(vect, ",", "^"), "^123,^456");
|
||||
}
|
||||
|
||||
/* Patricia tests */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user