diff options
author | Wenxian Li <wenxianl@cisco.com> | 2015-09-08 17:23:15 -0400 |
---|---|---|
committer | Wenxian Li <wenxianl@cisco.com> | 2015-09-08 17:23:15 -0400 |
commit | 569ca4f3a4fe533f067d0c21c0624269b9c36c31 (patch) | |
tree | 0c0fb5fb5eba0ac313972ff5cd356f675dd6b706 /src/bp_gtest.cpp | |
parent | 7670a2211246e252316c6c5193945cbe5118cbbc (diff) |
tuple generator phase 3.1, support random, support per template client/server generator, Dynamic sellection of client type
Signed-off-by: Wenxian Li <wenxianl@cisco.com>
Diffstat (limited to 'src/bp_gtest.cpp')
-rwxr-xr-x | src/bp_gtest.cpp | 42 |
1 files changed, 40 insertions, 2 deletions
diff --git a/src/bp_gtest.cpp b/src/bp_gtest.cpp index 020276cf..94037759 100755 --- a/src/bp_gtest.cpp +++ b/src/bp_gtest.cpp @@ -223,10 +223,10 @@ public: if ( m_req_ports ){ int i; - fl.m_threads_info[0]->m_smart_gen.FreePort(tuple.getClient(),tuple.getClientPort()); + fl.m_threads_info[0]->m_smart_gen.FreePort(0, tuple.getClientId(),tuple.getClientPort()); for (i=0 ; i<m_req_ports;i++) { - fl.m_threads_info[0]->m_smart_gen.FreePort(tuple.getClient(),ports[i]); + fl.m_threads_info[0]->m_smart_gen.FreePort(0,tuple.getClientId(),ports[i]); } delete []ports; } @@ -527,6 +527,44 @@ TEST_F(basic, sfr4) { EXPECT_EQ_UINT32(1, res?1:0)<< "pass"; } +TEST_F(basic, per_template_gen1) { + + CTestBasic t1; + CParserOption * po =&CGlobalInfo::m_options; + po->preview.setVMode(0); + po->preview.setFileWrite(true); + po->cfg_file ="cap2/per_template_gen1.yaml"; + po->out_file ="exp/sfr_4"; + bool res=t1.init(); + EXPECT_EQ_UINT32(1, res?1:0)<< "pass"; +} +TEST_F(basic, per_template_gen2) { + + CTestBasic t1; + CParserOption * po =&CGlobalInfo::m_options; + po->preview.setVMode(0); + po->preview.setFileWrite(true); + po->cfg_file ="cap2/per_template_gen2.yaml"; + po->out_file ="exp/sfr_4"; + bool res=t1.init(); + EXPECT_EQ_UINT32(1, res?1:0)<< "pass"; +} + + +/* +TEST_F(basic, sfr5) { + + CTestBasic t1; + CParserOption * po =&CGlobalInfo::m_options; + po->preview.setVMode(0); + po->preview.setFileWrite(true); + po->cfg_file ="cap2/sfr5.yaml"; + po->out_file ="exp/sfr_5"; + bool res=t1.init(); + EXPECT_EQ_UINT32(1, res?1:0)<< "pass"; +} +*/ + TEST_F(basic, ipv6_convert) { |