Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.


Channels ▼
RSS

Unit Testing & CxxTest


December, 2005: Unit Testing & CxxTest

Listing 1

#include <cxxtest/TestSuite.h>

class MainTest : public CxxTest::TestSuite
{
public:
  void testMain()
  {
   string Input("c:/Work/EJG Benchmarks.csv");
   string Output("c:/Work/Parser.out");
   Main_c ThisMain;
   TS_TRACE("Parsing input file " + Input + "...");
   Parser_c ThisParser = ThisMain.GetData(Input,Output);
   TS_TRACE(" Done!" + '\n');
   //if(!Debug.empty())
    {
     TS_TRACE("Dumping matrix data to " + Output + "...");
     ofstream OutputStream(Output.c_str());
     ThisParser.PrintCells(OutputStream,"Raw Data");
     TS_TRACE("Done!" + '\n');
    }
  }
};


Related Reading


More Insights