From: <den...@us...> - 2009-12-29 17:57:15
|
Revision: 32 http://dsim.svn.sourceforge.net/dsim/?rev=32&view=rev Author: denis_arnaud Date: 2009-12-29 17:57:04 +0000 (Tue, 29 Dec 2009) Log Message: ----------- [Test] Moved the dsim tests into a dedicated directory. Modified Paths: -------------- trunk/dsim/configure.ac trunk/dsim/test/Makefile.am Added Paths: ----------- trunk/dsim/test/dsim/ trunk/dsim/test/dsim/Makefile.am trunk/dsim/test/dsim/simulate.cpp Removed Paths: ------------- trunk/dsim/test/simulate.cpp Modified: trunk/dsim/configure.ac =================================================================== --- trunk/dsim/configure.ac 2009-12-29 16:05:42 UTC (rev 31) +++ trunk/dsim/configure.ac 2009-12-29 17:57:04 UTC (rev 32) @@ -481,6 +481,7 @@ test/airinv/Makefile test/rmol/Makefile test/simcrs/Makefile + test/dsim/Makefile ) AC_OUTPUT Modified: trunk/dsim/test/Makefile.am =================================================================== --- trunk/dsim/test/Makefile.am 2009-12-29 16:05:42 UTC (rev 31) +++ trunk/dsim/test/Makefile.am 2009-12-29 17:57:04 UTC (rev 32) @@ -4,25 +4,11 @@ MAINTAINERCLEANFILES = Makefile.in ## -SUBDIRS = boost stdair airsched airinv rmol simcrs +SUBDIRS = boost stdair airsched airinv rmol simcrs dsim +EXTRA_DIST = + ## -check_PROGRAMS = simulate +check_PROGRAMS = TESTS = $(check_PROGRAMS) XFAIL_TESTS = # - -#SimulationTestSuite_SOURCES = SimulationTestSuite.hpp \ - SimulationTestSuite.cpp -#SimulationTestSuite_CXXFLAGS= $(CPPUNIT_CFLAGS) $(BOOST_CFLAGS) -#SimulationTestSuite_LDADD = $(top_builddir)/test/com/libcppunitcore.la -#SimulationTestSuite_LDFLAGS = \ -# $(BOOST_LIBS) $(CPPUNIT_LIBS) \ -# $(top_builddir)/dsim/libdsim.la - -simulate_SOURCES = simulate.cpp -simulate_CXXFLAGS= $(CPPUNIT_CFLAGS) $(BOOST_CFLAGS) -simulate_LDADD = -simulate_LDFLAGS = $(BOOST_LIBS) \ - $(top_builddir)/dsim/core/libdsim.la - -EXTRA_DIST = Property changes on: trunk/dsim/test/dsim ___________________________________________________________________ Added: svn:ignore + .deps .libs Makefile.in Makefile simulate simulate.log Copied: trunk/dsim/test/dsim/Makefile.am (from rev 31, trunk/dsim/test/Makefile.am) =================================================================== --- trunk/dsim/test/dsim/Makefile.am (rev 0) +++ trunk/dsim/test/dsim/Makefile.am 2009-12-29 17:57:04 UTC (rev 32) @@ -0,0 +1,28 @@ +## test sub-directory +include $(top_srcdir)/Makefile.common + +MAINTAINERCLEANFILES = Makefile.in + +## +SUBDIRS = + +EXTRA_DIST = + +## +check_PROGRAMS = simulate +TESTS = $(check_PROGRAMS) +XFAIL_TESTS = # + +#SimulationTestSuite_SOURCES = SimulationTestSuite.hpp \ + SimulationTestSuite.cpp +#SimulationTestSuite_CXXFLAGS= $(CPPUNIT_CFLAGS) $(BOOST_CFLAGS) +#SimulationTestSuite_LDADD = $(top_builddir)/test/com/libcppunitcore.la +#SimulationTestSuite_LDFLAGS = \ +# $(BOOST_LIBS) $(CPPUNIT_LIBS) \ +# $(top_builddir)/dsim/libdsim.la + +simulate_SOURCES = simulate.cpp +simulate_CXXFLAGS= $(CPPUNIT_CFLAGS) $(BOOST_CFLAGS) +simulate_LDADD = +simulate_LDFLAGS = $(BOOST_LIBS) \ + $(top_builddir)/dsim/core/libdsim.la Copied: trunk/dsim/test/dsim/simulate.cpp (from rev 31, trunk/dsim/test/simulate.cpp) =================================================================== --- trunk/dsim/test/dsim/simulate.cpp (rev 0) +++ trunk/dsim/test/dsim/simulate.cpp 2009-12-29 17:57:04 UTC (rev 32) @@ -0,0 +1,40 @@ +// STL +#include <cassert> +#include <iostream> +#include <sstream> +#include <fstream> +#include <string> +// DSIM +#include <dsim/DSIM_Service.hpp> +#include <dsim/config/dsim-paths.hpp> + +// ///////// M A I N //////////// +int main (int argc, char* argv[]) { + + try { + + // Output log File + std::string lLogFilename ("simulate.log"); + + // Set the log parameters + std::ofstream logOutputFile; + // Open and clean the log outputfile + logOutputFile.open (lLogFilename.c_str()); + logOutputFile.clear(); + + // Initialise the list of classes/buckets + DSIM::DSIM_Service dsimService (logOutputFile); + + // Perform a simulation + dsimService.simulate(); + + } catch (const std::exception& stde) { + std::cerr << "Standard exception: " << stde.what() << std::endl; + return -1; + + } catch (...) { + return -1; + } + + return 0; +} Deleted: trunk/dsim/test/simulate.cpp =================================================================== --- trunk/dsim/test/simulate.cpp 2009-12-29 16:05:42 UTC (rev 31) +++ trunk/dsim/test/simulate.cpp 2009-12-29 17:57:04 UTC (rev 32) @@ -1,40 +0,0 @@ -// STL -#include <cassert> -#include <iostream> -#include <sstream> -#include <fstream> -#include <string> -// DSIM -#include <dsim/DSIM_Service.hpp> -#include <dsim/config/dsim-paths.hpp> - -// ///////// M A I N //////////// -int main (int argc, char* argv[]) { - - try { - - // Output log File - std::string lLogFilename ("simulate.log"); - - // Set the log parameters - std::ofstream logOutputFile; - // Open and clean the log outputfile - logOutputFile.open (lLogFilename.c_str()); - logOutputFile.clear(); - - // Initialise the list of classes/buckets - DSIM::DSIM_Service dsimService (logOutputFile); - - // Perform a simulation - dsimService.simulate(); - - } catch (const std::exception& stde) { - std::cerr << "Standard exception: " << stde.what() << std::endl; - return -1; - - } catch (...) { - return -1; - } - - return 0; -} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |