From: <den...@us...> - 2010-09-13 18:56:58
|
Revision: 337 http://rmol.svn.sourceforge.net/rmol/?rev=337&view=rev Author: denis_arnaud Date: 2010-09-13 18:56:50 +0000 (Mon, 13 Sep 2010) Log Message: ----------- [Test] Moved the valarrays test into a dedicated sub-directory. Modified Paths: -------------- trunk/rmol/configure.ac trunk/rmol/test/Makefile.am Added Paths: ----------- trunk/rmol/test/valarrays/ trunk/rmol/test/valarrays/Makefile.am trunk/rmol/test/valarrays/valarrays.cpp Removed Paths: ------------- trunk/rmol/test/valarrays.cpp Property Changed: ---------------- trunk/rmol/ trunk/rmol/test/ Property changes on: trunk/rmol ___________________________________________________________________ Modified: svn:externals - config https://stdair.svn.sourceforge.net/svnroot/stdair/trunk/stdair/config test/samples https://stdair.svn.sourceforge.net/svnroot/stdair/trunk/stdair/test/samples + https://stdair.svn.sourceforge.net/svnroot/stdair/trunk/stdair/config config Modified: trunk/rmol/configure.ac =================================================================== --- trunk/rmol/configure.ac 2010-09-13 16:42:57 UTC (rev 336) +++ trunk/rmol/configure.ac 2010-09-13 18:56:50 UTC (rev 337) @@ -365,6 +365,7 @@ po/Makefile.in test/Makefile test/samples/Makefile + test/valarrays/Makefile test/rmol/Makefile win32/Makefile) AC_OUTPUT Property changes on: trunk/rmol/test ___________________________________________________________________ Modified: svn:ignore - .deps .libs Makefile Makefile.in optimise simulate sim.gnumeric OptimiseTestSuite OptimiseTestSuite.log OptimiseTestSuite_results.xml SimulateTestSuite SimulateTestSuite_results.xml rmol.log ForecasterTestSuite ForecasterTestSuite.log ForecasterTestSuite_results.xml UnconstrainerTestSuite UnconstrainerTestSuite.log UnconstrainerTestSuite_results.xml valarrays bomsforforecaster bomsforforecaster.log + .deps .libs Makefile Makefile.in Modified: svn:externals - + https://stdair.svn.sourceforge.net/svnroot/stdair/trunk/stdair/test/samples samples Modified: trunk/rmol/test/Makefile.am =================================================================== --- trunk/rmol/test/Makefile.am 2010-09-13 16:42:57 UTC (rev 336) +++ trunk/rmol/test/Makefile.am 2010-09-13 18:56:50 UTC (rev 337) @@ -4,18 +4,13 @@ MAINTAINERCLEANFILES = Makefile.in ## -SUBDIRS = rmol +SUBDIRS = rmol valarrays ## -EXTRA_TESTS = valarrays +EXTRA_TESTS = STD_CHECKS = check_PROGRAMS = $(STD_CHECKS) $(EXTRA_TESTS) TESTS = $(STD_CHECKS) -XFAIL_TESTS = #valarrays +XFAIL_TESTS = # - -valarrays_SOURCES = valarrays.cpp -valarrays_CXXFLAGS= $(BOOST_CFLAGS) $(CPPUNIT_CFLAGS) -valarrays_LDADD = -valarrays_LDFLAGS = $(BOOST_LIBS) Property changes on: trunk/rmol/test/valarrays ___________________________________________________________________ Added: svn:ignore + .deps .libs Makefile.in Makefile valarrays Added: trunk/rmol/test/valarrays/Makefile.am =================================================================== --- trunk/rmol/test/valarrays/Makefile.am (rev 0) +++ trunk/rmol/test/valarrays/Makefile.am 2010-09-13 18:56:50 UTC (rev 337) @@ -0,0 +1,22 @@ +## test/valarrays sub-directory +include $(top_srcdir)/Makefile.common + +MAINTAINERCLEANFILES = Makefile.in + +## +SUBDIRS = + +## +EXTRA_TESTS = valarrays + +STD_CHECKS = +check_PROGRAMS = $(STD_CHECKS) $(EXTRA_TESTS) +TESTS = $(STD_CHECKS) +XFAIL_TESTS = #valarrays + + +valarrays_SOURCES = valarrays.cpp +valarrays_CXXFLAGS= $(BOOST_CFLAGS) $(CPPUNIT_CFLAGS) +valarrays_LDADD = +valarrays_LDFLAGS = $(BOOST_LIBS) + Copied: trunk/rmol/test/valarrays/valarrays.cpp (from rev 336, trunk/rmol/test/valarrays.cpp) =================================================================== --- trunk/rmol/test/valarrays/valarrays.cpp (rev 0) +++ trunk/rmol/test/valarrays/valarrays.cpp 2010-09-13 18:56:50 UTC (rev 337) @@ -0,0 +1,58 @@ +// ////////////////////////////////////////////////////////////// +// Test case for the STL valarray structure. +// It is not very robust and well supported (see p547 of the +// N. Josuttis' book: The C++ Standard Library - ISBN: 0201379260). +// Alternatives may be: +// * Boost.Array class (by the same N. Josuttis: +// http://www.boost.org/doc/libs/1_37_0/doc/html/boost/array.html) +// which however does not provide the + operator we are wanting here. +// * Blitz Numerics Arrays (http://www.oonumerics.org/blitz/) +// ////////////////////////////////////////////////////////////// +// STL +#include <iostream> +#include <valarray> +#include <string> +// Blitz +// #include <blitz/array.h> + +// /////////////////////////////////////////////////////////////// +typedef std::valarray<int> List_T; + +// /////////////////////////////////////////////////////////////// +void display (const std::string& iMessage, const List_T& iList) { + + std::cout << iMessage << std::endl; + + + for (unsigned int idx = 0; idx != iList.size(); ++idx) { + std::cout << "[" << idx << "]: " << iList[idx] << std::endl; + } +} + + +// /////////////////////// M A I N ////////////////////////////// +int main (int argc, char* agrv[]) { + + // Initialise two vectors of integers + const unsigned int lSize = 10; + List_T v1(lSize), v2(lSize); + for (unsigned int i = 0; i != lSize; ++i) { + v1[i] = i; + v2[i] = lSize - i; + } + + // + display ("v1", v1); + display ("v2", v2); + + // Create a third vector being the sum of the two above + List_T v3 = v1 + v2; + + // + display ("v3", v3); + + // //// Blitz //// + // blitz::Array<int,1> bv1(lSize), bv2(lSize); + + return 0; +} Deleted: trunk/rmol/test/valarrays.cpp =================================================================== --- trunk/rmol/test/valarrays.cpp 2010-09-13 16:42:57 UTC (rev 336) +++ trunk/rmol/test/valarrays.cpp 2010-09-13 18:56:50 UTC (rev 337) @@ -1,58 +0,0 @@ -// ////////////////////////////////////////////////////////////// -// Test case for the STL valarray structure. -// It is not very robust and well supported (see p547 of the -// N. Josuttis' book: The C++ Standard Library - ISBN: 0201379260). -// Alternatives may be: -// * Boost.Array class (by the same N. Josuttis: -// http://www.boost.org/doc/libs/1_37_0/doc/html/boost/array.html) -// which however does not provide the + operator we are wanting here. -// * Blitz Numerics Arrays (http://www.oonumerics.org/blitz/) -// ////////////////////////////////////////////////////////////// -// STL -#include <iostream> -#include <valarray> -#include <string> -// Blitz -// #include <blitz/array.h> - -// /////////////////////////////////////////////////////////////// -typedef std::valarray<int> List_T; - -// /////////////////////////////////////////////////////////////// -void display (const std::string& iMessage, const List_T& iList) { - - std::cout << iMessage << std::endl; - - - for (unsigned int idx = 0; idx != iList.size(); ++idx) { - std::cout << "[" << idx << "]: " << iList[idx] << std::endl; - } -} - - -// /////////////////////// M A I N ////////////////////////////// -int main (int argc, char* agrv[]) { - - // Initialise two vectors of integers - const unsigned int lSize = 10; - List_T v1(lSize), v2(lSize); - for (unsigned int i = 0; i != lSize; ++i) { - v1[i] = i; - v2[i] = lSize - i; - } - - // - display ("v1", v1); - display ("v2", v2); - - // Create a third vector being the sum of the two above - List_T v3 = v1 + v2; - - // - display ("v3", v3); - - // //// Blitz //// - // blitz::Array<int,1> bv1(lSize), bv2(lSize); - - return 0; -} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |