message: testing/cxx11: add equivalent set of tests for CXX11 binding
  Which allows me access to some of the things I could not get from
  the C API.
diff: @@ -22,6 +22,48 @@ TEST(ADIOSInterface, MPICommRemoved)
  #endif
  +class ADIOS2_CXX11_API : public ::testing::Test
  +{
  +public:
  + ADIOS2_CXX11_API()
  +#ifdef ADIOS2_HAVE_MPI
  + : ad(MPI_COMM_WORLD, adios2::DebugON)
  +#else
  + : ad(adios2::DebugON)
  +#endif
  + {
  +#ifdef ADIOS2_HAVE_MPI
  + MPI_Comm_rank(MPI_COMM_WORLD, &rank);
  + MPI_Comm_size(MPI_COMM_WORLD, &size);
  +#endif
  + }
  +
  + adios2::ADIOS ad;
  + int rank = 0;
  + int size = 1;
  +};
  +
  +class ADIOS2_CXX11_API_IO : public ADIOS2_CXX11_API
  +{
  +public:
  + ADIOS2_CXX11_API_IO() : io(ad.DeclareIO("CXX11_API_TestIO")) {}
  +
  + adios2::IO io;
  +};
  +
  +TEST_F(ADIOS2_CXX11_API_IO, Engine)
  +{
  + io.SetEngine("bpfile");
  + EXPECT_EQ(io.EngineType(), "bpfile");
  +
  + adios2::Engine engine = io.Open("types.bp", adios2::Mode::Write);
  + EXPECT_EQ(engine.Name(), "types.bp");
  + EXPECT_EQ(engine.Type(), "BP3");
  +
  + EXPECT_EQ(io.EngineType(), "bp"); // FIXME? Is it expected that adios2_open
  + // changes the engine_type string?
  +}
  +
  int main(int argc, char **argv)
  {
  #ifdef ADIOS2_HAVE_MPI
  