Skip to content

Commit

Permalink
Refs #8509 Fixing OSX complier error
Browse files Browse the repository at this point in the history
OSX didn't like a std::ofstream being given a const std::string, so i've added .c_str() to all calls to getTestFileName() within an ofstream constructor
  • Loading branch information
keithnbrown committed Nov 25, 2013
1 parent 760a6b6 commit 939ae3b
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions Code/Mantid/Framework/DataHandling/test/LoadAscii2Test.h
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ class LoadAscii2Test : public CxxTest::TestSuite
void test_fail_five_columns()
{
m_testno++;
std::ofstream file(getTestFileName());
std::ofstream file(getTestFileName().c_str());
m_abspath = getAbsPath();
file << std::scientific;
file << "# X , Y, E, DX, Z" << std::endl;
Expand All @@ -179,7 +179,7 @@ class LoadAscii2Test : public CxxTest::TestSuite
void test_fail_one_column()
{
m_testno++;
std::ofstream file(getTestFileName());
std::ofstream file(getTestFileName().c_str());
m_abspath = getAbsPath();
file << std::scientific;
file << "# X" << std::endl;
Expand All @@ -200,7 +200,7 @@ class LoadAscii2Test : public CxxTest::TestSuite
void test_fail_mismatching_bins()
{
m_testno++;
std::ofstream file(getTestFileName());
std::ofstream file(getTestFileName().c_str());
m_abspath = getAbsPath();
file << std::scientific;
file << "# X , Y, E, DX" << std::endl;
Expand All @@ -227,7 +227,7 @@ class LoadAscii2Test : public CxxTest::TestSuite
void test_fail_mismatching_columns()
{
m_testno++;
std::ofstream file(getTestFileName());
std::ofstream file(getTestFileName().c_str());
m_abspath = getAbsPath();
file << std::scientific;
file << "# X , Y, E, DX" << std::endl;
Expand Down Expand Up @@ -260,7 +260,7 @@ class LoadAscii2Test : public CxxTest::TestSuite
void test_fail_line_start_letter()
{
m_testno++;
std::ofstream file(getTestFileName());
std::ofstream file(getTestFileName().c_str());
m_abspath = getAbsPath();
file << std::scientific;
file << "# X , Y, E, DX" << std::endl;
Expand Down Expand Up @@ -295,7 +295,7 @@ class LoadAscii2Test : public CxxTest::TestSuite
void test_fail_line_start_noncomment_symbol()
{
m_testno++;
std::ofstream file(getTestFileName());
std::ofstream file(getTestFileName().c_str());
m_abspath = getAbsPath();
file << std::scientific;
file << "# X , Y, E, DX" << std::endl;
Expand Down Expand Up @@ -329,7 +329,7 @@ class LoadAscii2Test : public CxxTest::TestSuite
void test_fail_line_mixed_letter_number()
{
m_testno++;
std::ofstream file(getTestFileName());
std::ofstream file(getTestFileName().c_str());
m_abspath = getAbsPath();
file << std::scientific;
file << "# X , Y, E, DX" << std::endl;
Expand Down Expand Up @@ -364,7 +364,7 @@ class LoadAscii2Test : public CxxTest::TestSuite
void test_fail_line_mixed_symbol_number()
{
m_testno++;
std::ofstream file(getTestFileName());
std::ofstream file(getTestFileName().c_str());
m_abspath = getAbsPath();
file << std::scientific;
file << "# X , Y, E, DX" << std::endl;
Expand Down Expand Up @@ -398,7 +398,7 @@ class LoadAscii2Test : public CxxTest::TestSuite
void test_fail_spectra_ID_inclusion_inconisitant()
{
m_testno++;
std::ofstream file(getTestFileName());
std::ofstream file(getTestFileName().c_str());
m_abspath = getAbsPath();

file << std::scientific;
Expand Down Expand Up @@ -448,7 +448,7 @@ class LoadAscii2Test : public CxxTest::TestSuite
if (cols < 3)
{
//saveascii2 doens't save 2 column files it has to be made manually
std::ofstream file(getTestFileName());
std::ofstream file(getTestFileName().c_str());
if (scientific)
{
file << std::scientific;
Expand Down

0 comments on commit 939ae3b

Please sign in to comment.