A Discrete-Event Network Simulator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
pcap-test.h File Reference
#include <sstream>
#include <string>
#include <stdint.h>
#include "pcap-file.h"
#include "ns3/test.h"
+ Include dependency graph for pcap-test.h:

Go to the source code of this file.


#define NS_PCAP_TEST_EXPECT_EQ(filename)
 Test that a pair of reference/new pcap files are equal. More...

Macro Definition Documentation

#define NS_PCAP_TEST_EXPECT_EQ (   filename)
do { \
std::ostringstream oss; \
oss << filename; \
std::string expected = CreateDataDirFilename (oss.str()); \
std::string got = CreateTempDirFilename (oss.str()); \
uint32_t sec(0), usec(0); \ \
bool diff = PcapFile::Diff (got, expected, sec, usec); \
NS_TEST_EXPECT_MSG_EQ (diff, false, \
"PCAP traces " << got << " and " << expected \
<< " differ starting from " << sec << " s " \
<< usec << " us"); \
} while (false)
#define NS_TEST_EXPECT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report if not.
Definition: test.h:244

Test that a pair of reference/new pcap files are equal.

The filename is interpreted as a stream.

filenameThe name of the file to read in the reference/temporary directories

Definition at line 18 of file pcap-test.h.

Referenced by ns3::olsr::Bug780Test::CheckResults(), PeerManagementProtocolRegressionTest::CheckResults(), FlameRegressionTest::CheckResults(), ns3::olsr::HelloRegressionTest::CheckResults(), HwmpProactiveRegressionTest::CheckResults(), ns3::aodv::Bug772ChainTest::CheckResults(), HwmpDoRfRegressionTest::CheckResults(), HwmpSimplestRegressionTest::CheckResults(), HwmpReactiveRegressionTest::CheckResults(), ns3::olsr::TcRegressionTest::CheckResults(), and ns3::aodv::ChainRegressionTest::CheckResults().