Skip to content

Commit

Permalink
Refs #8962 ofstream constructor needed c strings
Browse files Browse the repository at this point in the history
the mac buildserver fialed due to my ofstream constructors being passed std::strings, when they wanted c strings.
  • Loading branch information
keithnbrown committed Apr 11, 2014
1 parent 4bb03ec commit b407634
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Code/Mantid/Framework/DataHandling/test/LoadReflTBLTest.h
Expand Up @@ -31,7 +31,7 @@ class LoadReflTBLTest : public CxxTest::TestSuite
void testFileNoQuotes()
{
//create a file with each line containing different but valid data format
std::ofstream file(m_filename);
std::ofstream file(m_filename.c_str());
file << "13460,0.7,13463,0.01,0.06,,,,,,,,,,,0.04,2" << std::endl;
file << "13469,0.7,13463,0.01,0.06,13470,2.3,13463,0.035,0.3,,,,,,0.04,2" << std::endl;
file << "13460,0.7,13463,0.01,0.06,13462,2.3,13463,0.035,0.3,13470,2.3,13463,0.035,0.3,0.04,2" << std::endl;
Expand Down Expand Up @@ -94,7 +94,7 @@ class LoadReflTBLTest : public CxxTest::TestSuite
void testQuotedFile()
{
//create a file with each line containing different but valid data format
std::ofstream file(m_filename);
std::ofstream file(m_filename.c_str());
file << "13460,0.7,\"13463,13464\",0.01,0.06,,,,,,,,,,,0.04,2" << std::endl;
file << "13469,0.7,\"13463,13464\",0.01,0.06,13470,2.3,\"13463,13464\",0.035,0.3,,,,,,0.04,2" << std::endl;
file << "13460,0.7,\"13463,13464\",0.01,0.06,13462,2.3,\"13463,13464\",0.035,0.3,13470,2.3,\"13463,13464\",0.035,0.3,0.04,2" << std::endl;
Expand Down Expand Up @@ -157,7 +157,7 @@ class LoadReflTBLTest : public CxxTest::TestSuite
void testFewColumns()
{
//create a file with each line containing too few columns
std::ofstream file(m_filename);
std::ofstream file(m_filename.c_str());
file << "13460,0.7,\"13463,13464\",0.01,0.06,,,,,,,0.04,2" << std::endl;
file << "13469,0.7,\"13463,13464\",0.01,0.06,13470,2.3,\"13463,13464\",0.035,0.3,,0.04,2" << std::endl;
file << "13460,0.7,\"13463,13464\",,\"13463,13464\",,13470,2.3,\"13463,13464\",0.035,0.04,2" << std::endl;
Expand All @@ -180,7 +180,7 @@ class LoadReflTBLTest : public CxxTest::TestSuite
void testManyColumns()
{
//create a file with each line containing too many columns
std::ofstream file(m_filename);
std::ofstream file(m_filename.c_str());
file << "13460,0.7,13463,0.01,0.06,,,,,,,,,,,0.04,2,,,,0.04,2" << std::endl;
file << "13469,0.7,13463,0.01,0.06,13470,2.3,13463,0.035,0.3,,,,,,0.04,2,,,,0.04,2" << std::endl;
file << "13460,0.7,13463,0.01,0.06,13462,2.3,13463,0.035,0.3,13470,2.3,13463,0.035,0.3,0.04,2,,,,0.04,2" << std::endl;
Expand All @@ -203,7 +203,7 @@ class LoadReflTBLTest : public CxxTest::TestSuite
void testManyColumnsTwo()
{
//create a file with each line containing too many columns
std::ofstream file(m_filename);
std::ofstream file(m_filename.c_str());
file << "13460,0.7,\"13463,0.01\",0.06,,,,,,,,,,,0.04,2,,,,0.04,2" << std::endl;
file << "13469,0.7,13463,\"0.01,0.06\",13470,2.3,13463,0.06,\"13470,0.06,13470\",2.3,13463,0.035,0.3,,,,,,,,,0.04,2,,,,0.04,2" << std::endl;
file << "13460,0.7,13463,0.01,0.06,13462,2.3,13463,0.035,0.3,13470,2.3,13463,0.035,0.3,0.04,2,,,,0.04,2" << std::endl;
Expand All @@ -225,7 +225,7 @@ class LoadReflTBLTest : public CxxTest::TestSuite

void testBlankFile()
{
std::ofstream file(m_filename);
std::ofstream file(m_filename.c_str());
file.close();

Mantid::API::IAlgorithm_sptr alg = Mantid::API::AlgorithmManager::Instance().create("LoadReflTBL");
Expand Down Expand Up @@ -253,7 +253,7 @@ class LoadReflTBLTest : public CxxTest::TestSuite
void testNoDataFile()
{
//create a file with content, and the right amount of delimiters, but no valid data
std::ofstream file(m_filename);
std::ofstream file(m_filename.c_str());
file << ",,,,,,,,,,,,,,,," << std::endl;
file << ",,,,,,,,,,,,,,,," << std::endl;
file << ",,,,,,,,,,,,,,,," << std::endl;
Expand Down

0 comments on commit b407634

Please sign in to comment.