summaryrefslogtreecommitdiffstats
path: root/src/gtest/trex_stateless_gtest.cpp
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2015-11-26 06:26:27 -0500
committerimarom <imarom@cisco.com>2015-11-26 06:26:27 -0500
commit59548ae8f65f8aa387900a321b437b8501046fde (patch)
tree6f6406331b7e2f7bc49192a7b240768ea5c88a1e /src/gtest/trex_stateless_gtest.cpp
parentd9a11302236095e055247295021bdfce6c988802 (diff)
Hanoch's review - changed update model to differential
also, graph is calculated on demand and once for each update
Diffstat (limited to 'src/gtest/trex_stateless_gtest.cpp')
-rw-r--r--src/gtest/trex_stateless_gtest.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/gtest/trex_stateless_gtest.cpp b/src/gtest/trex_stateless_gtest.cpp
index 5b298023..ea54a935 100644
--- a/src/gtest/trex_stateless_gtest.cpp
+++ b/src/gtest/trex_stateless_gtest.cpp
@@ -1713,13 +1713,15 @@ TEST_F(basic_stl, graph_generator1) {
streams.push_back(stream);
- const TrexStreamsGraphObj &obj = graph.generate(streams);
- EXPECT_EQ(obj.get_max_bps(), 405120);
- EXPECT_EQ(obj.get_max_pps(), 50);
+ const TrexStreamsGraphObj *obj = graph.generate(streams);
+ EXPECT_EQ(obj->get_max_bps(), 405120);
+ EXPECT_EQ(obj->get_max_pps(), 50);
for (auto stream : streams) {
delete stream;
}
+
+ delete obj;
}
@@ -1761,15 +1763,17 @@ TEST_F(basic_stl, graph_generator2) {
streams.push_back(stream);
- const TrexStreamsGraphObj &obj = graph.generate(streams);
- EXPECT_EQ(obj.get_max_pps(), 1000.0);
+ const TrexStreamsGraphObj *obj = graph.generate(streams);
+ EXPECT_EQ(obj->get_max_pps(), 1000.0);
- EXPECT_EQ(obj.get_max_bps(), (1000 * (128 + 4) * 8));
+ EXPECT_EQ(obj->get_max_bps(), (1000 * (128 + 4) * 8));
for (auto stream : streams) {
delete stream;
}
+
+ delete obj;
}
/* stress test */