diff --git a/dash/test/iterator/GlobIterTest.cc b/dash/test/StlAlgoTest.cc similarity index 82% rename from dash/test/iterator/GlobIterTest.cc rename to dash/test/StlAlgoTest.cc index 21d221b33..571c641ac 100644 --- a/dash/test/iterator/GlobIterTest.cc +++ b/dash/test/StlAlgoTest.cc @@ -1,12 +1,12 @@ -#include "GlobIterTest.h" +#include "StlAlgoTest.h" #include #include -TEST_F(GlobIterTest, CompilerADLTest){ +TEST_F(StlAlgoTest, CompilerADLTest){ dash::Array arr(dash::size()); - arr.local[0] = static_cast(dash::myid()); + arr.local[0] = dash::myid(); arr.barrier(); if(dash::myid() == 0){ @@ -39,10 +39,10 @@ TEST_F(GlobIterTest, CompilerADLTest){ } } -TEST_F(GlobIterTest, Swap) { +TEST_F(StlAlgoTest, Swap) { using std::swap; dash::Array arr(dash::size()); - arr.local[0] = static_cast(dash::myid()); + arr.local[0] = dash::myid(); arr.barrier(); if(dash::myid() == 0){ @@ -53,14 +53,14 @@ TEST_F(GlobIterTest, Swap) { } arr.barrier(); int newbegval = arr[0]; - int newendval = arr[static_cast(dash::size()-1)]; + int newendval = arr[dash::size()-1]; ASSERT_EQ_U(newbegval, dash::size()-1); ASSERT_EQ_U(newendval, 0); } -TEST_F(GlobIterTest, IterSwap) { +TEST_F(StlAlgoTest, IterSwap) { dash::Array arr(dash::size()); - arr.local[0] = static_cast(dash::myid()); + arr.local[0] = dash::myid(); arr.barrier(); if(dash::myid() == 0){ @@ -68,12 +68,12 @@ TEST_F(GlobIterTest, IterSwap) { } arr.barrier(); int newbegval = arr[0]; - int newendval = arr[static_cast(dash::size()-1)]; + int newendval = arr[dash::size()-1]; ASSERT_EQ_U(newbegval, dash::size()-1); ASSERT_EQ_U(newendval, 0); } -TEST_F(GlobIterTest, Sort) { +TEST_F(StlAlgoTest, Sort) { // do not use that in production as this is inefficient as hell! dash::Array arr(dash::size()); // init array in reverse order [n-1,n-2,...,0] diff --git a/dash/test/StlAlgoTest.h b/dash/test/StlAlgoTest.h new file mode 100644 index 000000000..913f0d361 --- /dev/null +++ b/dash/test/StlAlgoTest.h @@ -0,0 +1,21 @@ +#ifndef DASH__TEST__STL_ALGO_TEST_H_ +#define DASH__TEST__STL_ALGO_TEST_H_ + +#include "TestBase.h" + +/** + * Tests compability of dash iterators and STL algorithms + */ +class StlAlgoTest : public dash::test::TestBase { +protected: + + StlAlgoTest() { + LOG_MESSAGE(">>> Test suite: StlAlgoTest"); + } + + virtual ~StlAlgoTest() { + LOG_MESSAGE("<<< Closing test suite: StlAlgoTest"); + } +}; + +#endif // DASH__TEST__STL_ALGO_TEST_H_ diff --git a/dash/test/iterator/GlobIterTest.h b/dash/test/iterator/GlobIterTest.h deleted file mode 100644 index 91d984f08..000000000 --- a/dash/test/iterator/GlobIterTest.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef DASH__TEST__GLOB_ITER_REF_TEST_H_ -#define DASH__TEST__GLOB_ITER_REF_TEST_H_ - -#include "../TestBase.h" - -/** - * Test fixture for non-blocking operations using \c dash::GlobAsyncRef. - */ -class GlobIterTest : public dash::test::TestBase { -protected: - - GlobIterTest() { - LOG_MESSAGE(">>> Test suite: GlobIterTest"); - } - - virtual ~GlobIterTest() { - LOG_MESSAGE("<<< Closing test suite: GlobIterTest"); - } -}; - -#endif // DASH__TEST__GLOB_ASYNC_REF_TEST_H_