Bug 1225 - NS_TEST_SOURCEDIR is being treated as if were a std::string

This commit is contained in:
Mitch Watrous
2011-07-29 13:24:16 -07:00
parent 8a38290eb8
commit 112b892b18
2 changed files with 6 additions and 2 deletions

View File

@@ -16,6 +16,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <string>
#include "ns3/log.h"
#include "ns3/abort.h"
#include "ns3/test.h"
@@ -110,7 +112,8 @@ Ns3TcpInteroperabilityTestCase::DoSetup (void)
// We expect there to be a file called tcp-interop-response-vectors.pcap in
// response-vectors/ of this directory
//
m_pcapFilename = NS_TEST_SOURCEDIR + "/response-vectors/ns3tcp-interop-response-vectors.pcap";
m_pcapFilename = static_cast<std::string> (NS_TEST_SOURCEDIR) +
static_cast<std::string> ("/response-vectors/ns3tcp-interop-response-vectors.pcap");
if (m_writeVectors)
{

View File

@@ -17,6 +17,7 @@
*/
#include <iomanip>
#include <string>
#include "ns3/log.h"
#include "ns3/abort.h"
@@ -116,7 +117,7 @@ Ns3TcpStateTestCase::DoSetup (void)
//
std::ostringstream oss;
oss << "/response-vectors/ns3tcp-state" << m_testCase << "-response-vectors.pcap";
m_pcapFilename = NS_TEST_SOURCEDIR + oss.str ();
m_pcapFilename = static_cast<std::string> (NS_TEST_SOURCEDIR) + oss.str ();
if (m_writeVectors)
{