diff --git a/bindings/CXX11/adios2/cxx11/IO.h b/bindings/CXX11/adios2/cxx11/IO.h index 374bb0c804..cce90e6d01 100644 --- a/bindings/CXX11/adios2/cxx11/IO.h +++ b/bindings/CXX11/adios2/cxx11/IO.h @@ -311,18 +311,18 @@ class IO /** * Inspects variable type. This function can be used in conjunction with - * MACROS in an else if (type == adios2::GetDataType() ) {} loop + * MACROS in an else if (type == adios2::GetType() ) {} loop * @param name unique variable name identifier in current IO - * @return type as in adios2::GetDataType() (e.g. "double", "float"), + * @return type as in adios2::GetType() (e.g. "double", "float"), * empty std::string if variable not found */ std::string VariableType(const std::string &name) const; /** * Inspects attribute type. This function can be used in conjunction with - * MACROS in an else if (type == adios2::GetDataType() ) {} loop + * MACROS in an else if (type == adios2::GetType() ) {} loop * @param name unique attribute name identifier in current IO - * @return type as in adios2::GetDataType() (e.g. "double", "float"), + * @return type as in adios2::GetType() (e.g. "double", "float"), * empty std::string if attribute not found */ std::string AttributeType(const std::string &name) const; diff --git a/bindings/CXX11/adios2/cxx11/Types.cpp b/bindings/CXX11/adios2/cxx11/Types.cpp index 8edf81904b..9303e8a6a6 100644 --- a/bindings/CXX11/adios2/cxx11/Types.cpp +++ b/bindings/CXX11/adios2/cxx11/Types.cpp @@ -14,7 +14,7 @@ namespace adios2 { #define declare_template_instantiation(T) \ - template std::string GetDataType() noexcept; + template std::string GetType() noexcept; ADIOS2_FOREACH_TYPE_1ARG(declare_template_instantiation) #undef declare_template_instantiation diff --git a/bindings/CXX11/adios2/cxx11/Types.h b/bindings/CXX11/adios2/cxx11/Types.h index 21cdef93ad..fb8278bc91 100644 --- a/bindings/CXX11/adios2/cxx11/Types.h +++ b/bindings/CXX11/adios2/cxx11/Types.h @@ -20,12 +20,12 @@ namespace adios2 { template -std::string GetDataType() noexcept; +std::string GetType() noexcept; -// LIMIT TEMPLATE TYPES FOR adios2::GetDataType +// LIMIT TEMPLATE TYPES FOR adios2::GetType #define declare_template_instantiation(T) \ \ - extern template std::string GetDataType() noexcept; + extern template std::string GetType() noexcept; ADIOS2_FOREACH_TYPE_1ARG(declare_template_instantiation) #undef declare_template_instantiation diff --git a/bindings/CXX11/adios2/cxx11/Types.tcc b/bindings/CXX11/adios2/cxx11/Types.tcc index 41adeb4d4b..2ea59fd1d8 100644 --- a/bindings/CXX11/adios2/cxx11/Types.tcc +++ b/bindings/CXX11/adios2/cxx11/Types.tcc @@ -19,7 +19,7 @@ namespace adios2 { template -std::string GetDataType() noexcept +std::string GetType() noexcept { return ToString(helper::GetDataType::IOType>()); } diff --git a/docs/user_guide/source/advice/advice.rst b/docs/user_guide/source/advice/advice.rst index 544ea611d4..fabdeda626 100644 --- a/docs/user_guide/source/advice/advice.rst +++ b/docs/user_guide/source/advice/advice.rst @@ -53,7 +53,7 @@ The goal is to provide specific advice and good practices about the use of ADIOS 11. Prefer the high-level Python and C++ APIs for simple tasks that do not require performance. The more familiar Write/Read overloads for File I/O return native data constructs (``std::vector`` and ``numpy arrays``) immediately for a requested selection. ``open`` only explores the metadata index. -12. C++: prefer templates to ``void*`` to increase compile-time safety. Use ``IO::InquireVariableType("variableName")`` and ``adios2::GetDataType()`` to cast upfront to a ``Variable``. C++17 has ``std::any`` as an alternative to ``void*``. ADIOS 2 follows closely the STL model. +12. C++: prefer templates to ``void*`` to increase compile-time safety. Use ``IO::InquireVariableType("variableName")`` and ``adios2::GetType()`` to cast upfront to a ``Variable``. C++17 has ``std::any`` as an alternative to ``void*``. ADIOS 2 follows closely the STL model. 13. Understand ``Put`` and ``Get`` memory contracts from :ref:`Engine` diff --git a/examples/useCases/insituGlobalArrays/insituGlobalArraysReaderNxN.cpp b/examples/useCases/insituGlobalArrays/insituGlobalArraysReaderNxN.cpp index 0a5949a93c..1d94e015e0 100644 --- a/examples/useCases/insituGlobalArrays/insituGlobalArraysReaderNxN.cpp +++ b/examples/useCases/insituGlobalArrays/insituGlobalArraysReaderNxN.cpp @@ -102,7 +102,7 @@ ProcessMetadata(int rank, const adios2::Engine &reader, adios2::IO &io, // not supported } #define declare_template_instantiation(T) \ - else if (type == adios2::GetDataType()) \ + else if (type == adios2::GetType()) \ { \ ProcessVariableMetadata(rank, name, type, reader, io, varinfos); \ } diff --git a/testing/adios2/engine/bp/TestBPWriteAppendReadADIOS2.cpp b/testing/adios2/engine/bp/TestBPWriteAppendReadADIOS2.cpp index 3146380f05..32731b4695 100644 --- a/testing/adios2/engine/bp/TestBPWriteAppendReadADIOS2.cpp +++ b/testing/adios2/engine/bp/TestBPWriteAppendReadADIOS2.cpp @@ -425,121 +425,119 @@ TEST_F(BPWriteAppendReadTestADIOS2, ADIOS2BPWriteAppendRead2D2x4) EXPECT_TRUE(attr_s1); ASSERT_EQ(attr_s1.Name(), s1_Single); ASSERT_EQ(attr_s1.Data().size() == 1, true); - ASSERT_EQ(attr_s1.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_s1.Type(), adios2::GetType()); ASSERT_EQ(attr_s1.Data().front(), attributeTestData.S1); EXPECT_TRUE(attr_s1a); ASSERT_EQ(attr_s1a.Name(), s1_Array); ASSERT_EQ(attr_s1a.Data().size() == 1, true); - ASSERT_EQ(attr_s1a.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_s1a.Type(), adios2::GetType()); ASSERT_EQ(attr_s1a.Data()[0], attributeTestData.S1array[0]); EXPECT_TRUE(attr_i8); ASSERT_EQ(attr_i8.Name(), i8_Single); ASSERT_EQ(attr_i8.Data().size() == 1, true); - ASSERT_EQ(attr_i8.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_i8.Type(), adios2::GetType()); ASSERT_EQ(attr_i8.Data().front(), attributeTestData.I8.front()); EXPECT_TRUE(attr_i16); ASSERT_EQ(attr_i16.Name(), i16_Single); ASSERT_EQ(attr_i16.Data().size() == 1, true); - ASSERT_EQ(attr_i16.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_i16.Type(), adios2::GetType()); ASSERT_EQ(attr_i16.Data().front(), attributeTestData.I16.front()); EXPECT_TRUE(attr_i32); ASSERT_EQ(attr_i32.Name(), i32_Single); ASSERT_EQ(attr_i32.Data().size() == 1, true); - ASSERT_EQ(attr_i32.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_i32.Type(), adios2::GetType()); ASSERT_EQ(attr_i32.Data().front(), attributeTestData.I32.front()); EXPECT_TRUE(attr_i32a); ASSERT_EQ(attr_i32a.Name(), i32_Array); ASSERT_EQ(attr_i32a.Data().size() == attributeTestData.I32.size(), true); - ASSERT_EQ(attr_i32a.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_i32a.Type(), adios2::GetType()); ASSERT_EQ(attr_i32a.Data()[0], attributeTestData.I32[0]); EXPECT_TRUE(attr_i64); ASSERT_EQ(attr_i64.Name(), i64_Single); ASSERT_EQ(attr_i64.Data().size() == 1, true); - ASSERT_EQ(attr_i64.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_i64.Type(), adios2::GetType()); ASSERT_EQ(attr_i64.Data().front(), attributeTestData.I64.front()); EXPECT_TRUE(attr_u8); ASSERT_EQ(attr_u8.Name(), u8_Single); ASSERT_EQ(attr_u8.Data().size() == 1, true); - ASSERT_EQ(attr_u8.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_u8.Type(), adios2::GetType()); ASSERT_EQ(attr_u8.Data().front(), attributeTestData.U8.front()); EXPECT_TRUE(attr_u16); ASSERT_EQ(attr_u16.Name(), u16_Single); ASSERT_EQ(attr_u16.Data().size() == 1, true); - ASSERT_EQ(attr_u16.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_u16.Type(), adios2::GetType()); ASSERT_EQ(attr_u16.Data().front(), attributeTestData.U16.front()); EXPECT_TRUE(attr_u32); ASSERT_EQ(attr_u32.Name(), u32_Single); ASSERT_EQ(attr_u32.Data().size() == 1, true); - ASSERT_EQ(attr_u32.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_u32.Type(), adios2::GetType()); ASSERT_EQ(attr_u32.Data().front(), attributeTestData.U32.front()); EXPECT_TRUE(attr_u32a); ASSERT_EQ(attr_u32a.Name(), u32_Array); ASSERT_EQ(attr_u32a.Data().size() == attributeTestData.U32.size(), true); - ASSERT_EQ(attr_u32a.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_u32a.Type(), adios2::GetType()); ASSERT_EQ(attr_u32a.Data()[0], attributeTestData.U32[0]); EXPECT_TRUE(attr_u64); ASSERT_EQ(attr_u64.Name(), u64_Single); ASSERT_EQ(attr_u64.Data().size() == 1, true); - ASSERT_EQ(attr_u64.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_u64.Type(), adios2::GetType()); ASSERT_EQ(attr_u64.Data().front(), attributeTestData.U64.front()); EXPECT_TRUE(attr_r32); ASSERT_EQ(attr_r32.Name(), r32_Single); ASSERT_EQ(attr_r32.Data().size() == 1, true); - ASSERT_EQ(attr_r32.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_r32.Type(), adios2::GetType()); ASSERT_EQ(attr_r32.Data().front(), attributeTestData.R32.front()); EXPECT_TRUE(attr_r32a); ASSERT_EQ(attr_r32a.Name(), r32_Array); ASSERT_EQ(attr_r32a.Data().size() == attributeTestData.R32.size(), true); - ASSERT_EQ(attr_r32a.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_r32a.Type(), adios2::GetType()); ASSERT_EQ(attr_r32a.Data()[0], attributeTestData.R32[0]); EXPECT_TRUE(attr_r64); ASSERT_EQ(attr_r64.Name(), r64_Single); ASSERT_EQ(attr_r64.Data().size() == 1, true); - ASSERT_EQ(attr_r64.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_r64.Type(), adios2::GetType()); ASSERT_EQ(attr_r64.Data().front(), attributeTestData.R64.front()); EXPECT_TRUE(attr_r128); ASSERT_EQ(attr_r128.Name(), r128_Single); ASSERT_EQ(attr_r128.Data().size() == 1, true); - ASSERT_EQ(attr_r128.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_r128.Type(), adios2::GetType()); ASSERT_EQ(attr_r128.Data().front(), attributeTestData.R128.front()); EXPECT_TRUE(attr_cr32); ASSERT_EQ(attr_cr32.Name(), cr32_Single); ASSERT_EQ(attr_cr32.Data().size() == 1, true); - ASSERT_EQ(attr_cr32.Type(), adios2::GetDataType>()); + ASSERT_EQ(attr_cr32.Type(), adios2::GetType>()); ASSERT_EQ(attr_cr32.Data().front(), attributeTestData.CR32.front()); EXPECT_TRUE(attr_cr32a); ASSERT_EQ(attr_cr32a.Name(), cr32_Array); ASSERT_EQ(attr_cr32a.Data().size() == attributeTestData.CR32.size(), true); - ASSERT_EQ(attr_cr32a.Type(), - adios2::GetDataType>()); + ASSERT_EQ(attr_cr32a.Type(), adios2::GetType>()); ASSERT_EQ(attr_cr32a.Data()[0], attributeTestData.CR32[0]); EXPECT_TRUE(attr_cr64); ASSERT_EQ(attr_cr64.Name(), cr64_Single); ASSERT_EQ(attr_cr64.Data().size() == 1, true); - ASSERT_EQ(attr_cr64.Type(), - adios2::GetDataType>()); + ASSERT_EQ(attr_cr64.Type(), adios2::GetType>()); ASSERT_EQ(attr_cr64.Data().front(), attributeTestData.CR64.front()); EXPECT_EQ(bpReader.Steps(), 2 * NSteps); diff --git a/testing/adios2/engine/bp/TestBPWriteReadAttributes.cpp b/testing/adios2/engine/bp/TestBPWriteReadAttributes.cpp index 45f32231f0..c1fe0bcf5a 100644 --- a/testing/adios2/engine/bp/TestBPWriteReadAttributes.cpp +++ b/testing/adios2/engine/bp/TestBPWriteReadAttributes.cpp @@ -140,92 +140,91 @@ TEST_F(BPWriteReadAttributes, WriteReadSingleTypes) EXPECT_TRUE(attr_s1); ASSERT_EQ(attr_s1.Name(), s1_Single); ASSERT_EQ(attr_s1.Data().size() == 1, true); - ASSERT_EQ(attr_s1.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_s1.Type(), adios2::GetType()); ASSERT_EQ(attr_s1.Data().front(), currentTestData.S1); EXPECT_TRUE(attr_s1a); ASSERT_EQ(attr_s1a.Name(), s1_Array); ASSERT_EQ(attr_s1a.Data().size() == 1, true); - ASSERT_EQ(attr_s1a.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_s1a.Type(), adios2::GetType()); ASSERT_EQ(attr_s1a.Data()[0], currentTestData.S1array[0]); EXPECT_TRUE(attr_i8); ASSERT_EQ(attr_i8.Name(), i8_Single); ASSERT_EQ(attr_i8.Data().size() == 1, true); - ASSERT_EQ(attr_i8.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_i8.Type(), adios2::GetType()); ASSERT_EQ(attr_i8.Data().front(), currentTestData.I8.front()); EXPECT_TRUE(attr_i16); ASSERT_EQ(attr_i16.Name(), i16_Single); ASSERT_EQ(attr_i16.Data().size() == 1, true); - ASSERT_EQ(attr_i16.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_i16.Type(), adios2::GetType()); ASSERT_EQ(attr_i16.Data().front(), currentTestData.I16.front()); EXPECT_TRUE(attr_i32); ASSERT_EQ(attr_i32.Name(), i32_Single); ASSERT_EQ(attr_i32.Data().size() == 1, true); - ASSERT_EQ(attr_i32.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_i32.Type(), adios2::GetType()); ASSERT_EQ(attr_i32.Data().front(), currentTestData.I32.front()); EXPECT_TRUE(attr_i64); ASSERT_EQ(attr_i64.Name(), i64_Single); ASSERT_EQ(attr_i64.Data().size() == 1, true); - ASSERT_EQ(attr_i64.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_i64.Type(), adios2::GetType()); ASSERT_EQ(attr_i64.Data().front(), currentTestData.I64.front()); EXPECT_TRUE(attr_u8); ASSERT_EQ(attr_u8.Name(), u8_Single); ASSERT_EQ(attr_u8.Data().size() == 1, true); - ASSERT_EQ(attr_u8.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_u8.Type(), adios2::GetType()); ASSERT_EQ(attr_u8.Data().front(), currentTestData.U8.front()); EXPECT_TRUE(attr_u16); ASSERT_EQ(attr_u16.Name(), u16_Single); ASSERT_EQ(attr_u16.Data().size() == 1, true); - ASSERT_EQ(attr_u16.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_u16.Type(), adios2::GetType()); ASSERT_EQ(attr_u16.Data().front(), currentTestData.U16.front()); EXPECT_TRUE(attr_u32); ASSERT_EQ(attr_u32.Name(), u32_Single); ASSERT_EQ(attr_u32.Data().size() == 1, true); - ASSERT_EQ(attr_u32.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_u32.Type(), adios2::GetType()); ASSERT_EQ(attr_u32.Data().front(), currentTestData.U32.front()); EXPECT_TRUE(attr_u64); ASSERT_EQ(attr_u64.Name(), u64_Single); ASSERT_EQ(attr_u64.Data().size() == 1, true); - ASSERT_EQ(attr_u64.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_u64.Type(), adios2::GetType()); ASSERT_EQ(attr_u64.Data().front(), currentTestData.U64.front()); EXPECT_TRUE(attr_r32); ASSERT_EQ(attr_r32.Name(), r32_Single); ASSERT_EQ(attr_r32.Data().size() == 1, true); - ASSERT_EQ(attr_r32.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_r32.Type(), adios2::GetType()); ASSERT_EQ(attr_r32.Data().front(), currentTestData.R32.front()); EXPECT_TRUE(attr_r64); ASSERT_EQ(attr_r64.Name(), r64_Single); ASSERT_EQ(attr_r64.Data().size() == 1, true); - ASSERT_EQ(attr_r64.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_r64.Type(), adios2::GetType()); ASSERT_EQ(attr_r64.Data().front(), currentTestData.R64.front()); EXPECT_TRUE(attr_r128); ASSERT_EQ(attr_r128.Name(), r128_Single); ASSERT_EQ(attr_r128.Data().size() == 1, true); - ASSERT_EQ(attr_r128.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_r128.Type(), adios2::GetType()); ASSERT_EQ(attr_r128.Data().front(), currentTestData.R128.front()); EXPECT_TRUE(attr_cr32); ASSERT_EQ(attr_cr32.Name(), cr32_Single); ASSERT_EQ(attr_cr32.Data().size() == 1, true); - ASSERT_EQ(attr_cr32.Type(), adios2::GetDataType>()); + ASSERT_EQ(attr_cr32.Type(), adios2::GetType>()); ASSERT_EQ(attr_cr32.Data().front(), currentTestData.CR32.front()); EXPECT_TRUE(attr_cr64); ASSERT_EQ(attr_cr64.Name(), cr64_Single); ASSERT_EQ(attr_cr64.Data().size() == 1, true); - ASSERT_EQ(attr_cr64.Type(), - adios2::GetDataType>()); + ASSERT_EQ(attr_cr64.Type(), adios2::GetType>()); ASSERT_EQ(attr_cr64.Data().front(), currentTestData.CR64.front()); bpRead.Close(); @@ -361,73 +360,72 @@ TEST_F(BPWriteReadAttributes, WriteReadArrayTypes) EXPECT_TRUE(attr_s1); ASSERT_EQ(attr_s1.Name(), s1_Array); ASSERT_EQ(attr_s1.Data().size() == 1, false); - ASSERT_EQ(attr_s1.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_s1.Type(), adios2::GetType()); EXPECT_TRUE(attr_i8); ASSERT_EQ(attr_i8.Name(), i8_Array); ASSERT_EQ(attr_i8.Data().size() == 1, false); - ASSERT_EQ(attr_i8.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_i8.Type(), adios2::GetType()); EXPECT_TRUE(attr_i16); ASSERT_EQ(attr_i16.Name(), i16_Array); ASSERT_EQ(attr_i16.Data().size() == 1, false); - ASSERT_EQ(attr_i16.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_i16.Type(), adios2::GetType()); EXPECT_TRUE(attr_i32); ASSERT_EQ(attr_i32.Name(), i32_Array); ASSERT_EQ(attr_i32.Data().size() == 1, false); - ASSERT_EQ(attr_i32.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_i32.Type(), adios2::GetType()); EXPECT_TRUE(attr_i64); ASSERT_EQ(attr_i64.Name(), i64_Array); ASSERT_EQ(attr_i64.Data().size() == 1, false); - ASSERT_EQ(attr_i64.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_i64.Type(), adios2::GetType()); EXPECT_TRUE(attr_u8); ASSERT_EQ(attr_u8.Name(), u8_Array); ASSERT_EQ(attr_u8.Data().size() == 1, false); - ASSERT_EQ(attr_u8.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_u8.Type(), adios2::GetType()); EXPECT_TRUE(attr_u16); ASSERT_EQ(attr_u16.Name(), u16_Array); ASSERT_EQ(attr_u16.Data().size() == 1, false); - ASSERT_EQ(attr_u16.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_u16.Type(), adios2::GetType()); EXPECT_TRUE(attr_u32); ASSERT_EQ(attr_u32.Name(), u32_Array); ASSERT_EQ(attr_u32.Data().size() == 1, false); - ASSERT_EQ(attr_u32.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_u32.Type(), adios2::GetType()); EXPECT_TRUE(attr_u64); ASSERT_EQ(attr_u64.Name(), u64_Array); ASSERT_EQ(attr_u64.Data().size() == 1, false); - ASSERT_EQ(attr_u64.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_u64.Type(), adios2::GetType()); EXPECT_TRUE(attr_r32); ASSERT_EQ(attr_r32.Name(), r32_Array); ASSERT_EQ(attr_r32.Data().size() == 1, false); - ASSERT_EQ(attr_r32.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_r32.Type(), adios2::GetType()); EXPECT_TRUE(attr_r64); ASSERT_EQ(attr_r64.Name(), r64_Array); ASSERT_EQ(attr_r64.Data().size() == 1, false); - ASSERT_EQ(attr_r64.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_r64.Type(), adios2::GetType()); EXPECT_TRUE(attr_r128); ASSERT_EQ(attr_r128.Name(), r128_Array); ASSERT_EQ(attr_r128.Data().size() == 1, false); - ASSERT_EQ(attr_r128.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_r128.Type(), adios2::GetType()); EXPECT_TRUE(attr_cr32); ASSERT_EQ(attr_cr32.Name(), cr32_Array); ASSERT_EQ(attr_cr32.Data().size() == 1, false); - ASSERT_EQ(attr_cr32.Type(), adios2::GetDataType>()); + ASSERT_EQ(attr_cr32.Type(), adios2::GetType>()); EXPECT_TRUE(attr_cr64); ASSERT_EQ(attr_cr64.Name(), cr64_Array); ASSERT_EQ(attr_cr64.Data().size() == 1, false); - ASSERT_EQ(attr_cr64.Type(), - adios2::GetDataType>()); + ASSERT_EQ(attr_cr64.Type(), adios2::GetType>()); auto I8 = attr_i8.Data(); auto I16 = attr_i16.Data(); @@ -581,86 +579,85 @@ TEST_F(BPWriteReadAttributes, BPWriteReadSingleTypesVar) EXPECT_TRUE(attr_s1); ASSERT_EQ(attr_s1.Name(), var.Name() + separator + s1_Single); ASSERT_EQ(attr_s1.Data().size() == 1, true); - ASSERT_EQ(attr_s1.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_s1.Type(), adios2::GetType()); ASSERT_EQ(attr_s1.Data().front(), currentTestData.S1); EXPECT_TRUE(attr_i8); ASSERT_EQ(attr_i8.Name(), var.Name() + separator + i8_Single); ASSERT_EQ(attr_i8.Data().size() == 1, true); - ASSERT_EQ(attr_i8.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_i8.Type(), adios2::GetType()); ASSERT_EQ(attr_i8.Data().front(), currentTestData.I8.front()); EXPECT_TRUE(attr_i16); ASSERT_EQ(attr_i16.Name(), var.Name() + separator + i16_Single); ASSERT_EQ(attr_i16.Data().size() == 1, true); - ASSERT_EQ(attr_i16.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_i16.Type(), adios2::GetType()); ASSERT_EQ(attr_i16.Data().front(), currentTestData.I16.front()); EXPECT_TRUE(attr_i32); ASSERT_EQ(attr_i32.Name(), var.Name() + separator + i32_Single); ASSERT_EQ(attr_i32.Data().size() == 1, true); - ASSERT_EQ(attr_i32.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_i32.Type(), adios2::GetType()); ASSERT_EQ(attr_i32.Data().front(), currentTestData.I32.front()); EXPECT_TRUE(attr_i64); ASSERT_EQ(attr_i64.Name(), var.Name() + separator + i64_Single); ASSERT_EQ(attr_i64.Data().size() == 1, true); - ASSERT_EQ(attr_i64.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_i64.Type(), adios2::GetType()); ASSERT_EQ(attr_i64.Data().front(), currentTestData.I64.front()); EXPECT_TRUE(attr_u8); ASSERT_EQ(attr_u8.Name(), var.Name() + separator + u8_Single); ASSERT_EQ(attr_u8.Data().size() == 1, true); - ASSERT_EQ(attr_u8.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_u8.Type(), adios2::GetType()); ASSERT_EQ(attr_u8.Data().front(), currentTestData.U8.front()); EXPECT_TRUE(attr_u16); ASSERT_EQ(attr_u16.Name(), var.Name() + separator + u16_Single); ASSERT_EQ(attr_u16.Data().size() == 1, true); - ASSERT_EQ(attr_u16.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_u16.Type(), adios2::GetType()); ASSERT_EQ(attr_u16.Data().front(), currentTestData.U16.front()); EXPECT_TRUE(attr_u32); ASSERT_EQ(attr_u32.Name(), var.Name() + separator + u32_Single); ASSERT_EQ(attr_u32.Data().size() == 1, true); - ASSERT_EQ(attr_u32.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_u32.Type(), adios2::GetType()); ASSERT_EQ(attr_u32.Data().front(), currentTestData.U32.front()); EXPECT_TRUE(attr_u64); ASSERT_EQ(attr_u64.Name(), var.Name() + separator + u64_Single); ASSERT_EQ(attr_u64.Data().size() == 1, true); - ASSERT_EQ(attr_u64.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_u64.Type(), adios2::GetType()); ASSERT_EQ(attr_u64.Data().front(), currentTestData.U64.front()); EXPECT_TRUE(attr_r32); ASSERT_EQ(attr_r32.Name(), var.Name() + separator + r32_Single); ASSERT_EQ(attr_r32.Data().size() == 1, true); - ASSERT_EQ(attr_r32.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_r32.Type(), adios2::GetType()); ASSERT_EQ(attr_r32.Data().front(), currentTestData.R32.front()); EXPECT_TRUE(attr_r64); ASSERT_EQ(attr_r64.Name(), var.Name() + separator + r64_Single); ASSERT_EQ(attr_r64.Data().size() == 1, true); - ASSERT_EQ(attr_r64.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_r64.Type(), adios2::GetType()); ASSERT_EQ(attr_r64.Data().front(), currentTestData.R64.front()); EXPECT_TRUE(attr_r128); ASSERT_EQ(attr_r128.Name(), var.Name() + separator + r128_Single); ASSERT_EQ(attr_r128.Data().size() == 1, true); - ASSERT_EQ(attr_r128.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_r128.Type(), adios2::GetType()); ASSERT_EQ(attr_r128.Data().front(), currentTestData.R128.front()); EXPECT_TRUE(attr_cr32); ASSERT_EQ(attr_cr32.Name(), var.Name() + separator + cr32_Single); ASSERT_EQ(attr_cr32.Data().size() == 1, true); - ASSERT_EQ(attr_cr32.Type(), adios2::GetDataType>()); + ASSERT_EQ(attr_cr32.Type(), adios2::GetType>()); ASSERT_EQ(attr_cr32.Data().front(), currentTestData.CR32.front()); EXPECT_TRUE(attr_cr64); ASSERT_EQ(attr_cr64.Name(), var.Name() + separator + cr64_Single); ASSERT_EQ(attr_cr64.Data().size() == 1, true); - ASSERT_EQ(attr_cr64.Type(), - adios2::GetDataType>()); + ASSERT_EQ(attr_cr64.Type(), adios2::GetType>()); ASSERT_EQ(attr_cr64.Data().front(), currentTestData.CR64.front()); bpRead.Close(); @@ -803,73 +800,72 @@ TEST_F(BPWriteReadAttributes, WriteReadArrayTypesVar) EXPECT_TRUE(attr_s1); ASSERT_EQ(attr_s1.Name(), var.Name() + separator + s1_Array); ASSERT_EQ(attr_s1.Data().size() == 1, false); - ASSERT_EQ(attr_s1.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_s1.Type(), adios2::GetType()); EXPECT_TRUE(attr_i8); ASSERT_EQ(attr_i8.Name(), var.Name() + separator + i8_Array); ASSERT_EQ(attr_i8.Data().size() == 1, false); - ASSERT_EQ(attr_i8.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_i8.Type(), adios2::GetType()); EXPECT_TRUE(attr_i16); ASSERT_EQ(attr_i16.Name(), var.Name() + separator + i16_Array); ASSERT_EQ(attr_i16.Data().size() == 1, false); - ASSERT_EQ(attr_i16.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_i16.Type(), adios2::GetType()); EXPECT_TRUE(attr_i32); ASSERT_EQ(attr_i32.Name(), var.Name() + separator + i32_Array); ASSERT_EQ(attr_i32.Data().size() == 1, false); - ASSERT_EQ(attr_i32.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_i32.Type(), adios2::GetType()); EXPECT_TRUE(attr_i64); ASSERT_EQ(attr_i64.Name(), var.Name() + separator + i64_Array); ASSERT_EQ(attr_i64.Data().size() == 1, false); - ASSERT_EQ(attr_i64.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_i64.Type(), adios2::GetType()); EXPECT_TRUE(attr_u8); ASSERT_EQ(attr_u8.Name(), var.Name() + separator + u8_Array); ASSERT_EQ(attr_u8.Data().size() == 1, false); - ASSERT_EQ(attr_u8.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_u8.Type(), adios2::GetType()); EXPECT_TRUE(attr_u16); ASSERT_EQ(attr_u16.Name(), var.Name() + separator + u16_Array); ASSERT_EQ(attr_u16.Data().size() == 1, false); - ASSERT_EQ(attr_u16.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_u16.Type(), adios2::GetType()); EXPECT_TRUE(attr_u32); ASSERT_EQ(attr_u32.Name(), var.Name() + separator + u32_Array); ASSERT_EQ(attr_u32.Data().size() == 1, false); - ASSERT_EQ(attr_u32.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_u32.Type(), adios2::GetType()); EXPECT_TRUE(attr_u64); ASSERT_EQ(attr_u64.Name(), var.Name() + separator + u64_Array); ASSERT_EQ(attr_u64.Data().size() == 1, false); - ASSERT_EQ(attr_u64.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_u64.Type(), adios2::GetType()); EXPECT_TRUE(attr_r32); ASSERT_EQ(attr_r32.Name(), var.Name() + separator + r32_Array); ASSERT_EQ(attr_r32.Data().size() == 1, false); - ASSERT_EQ(attr_r32.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_r32.Type(), adios2::GetType()); EXPECT_TRUE(attr_r64); ASSERT_EQ(attr_r64.Name(), var.Name() + separator + r64_Array); ASSERT_EQ(attr_r64.Data().size() == 1, false); - ASSERT_EQ(attr_r64.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_r64.Type(), adios2::GetType()); EXPECT_TRUE(attr_r128); ASSERT_EQ(attr_r128.Name(), var.Name() + separator + r128_Array); ASSERT_EQ(attr_r128.Data().size() == 1, false); - ASSERT_EQ(attr_r128.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_r128.Type(), adios2::GetType()); EXPECT_TRUE(attr_cr32); ASSERT_EQ(attr_cr32.Name(), var.Name() + separator + cr32_Array); ASSERT_EQ(attr_cr32.Data().size() == 1, false); - ASSERT_EQ(attr_cr32.Type(), adios2::GetDataType>()); + ASSERT_EQ(attr_cr32.Type(), adios2::GetType>()); EXPECT_TRUE(attr_cr64); ASSERT_EQ(attr_cr64.Name(), var.Name() + separator + cr64_Array); ASSERT_EQ(attr_cr64.Data().size() == 1, false); - ASSERT_EQ(attr_cr64.Type(), - adios2::GetDataType>()); + ASSERT_EQ(attr_cr64.Type(), adios2::GetType>()); auto I8 = attr_i8.Data(); auto I16 = attr_i16.Data(); diff --git a/testing/adios2/engine/common/TestEngineCommon.cpp b/testing/adios2/engine/common/TestEngineCommon.cpp index 0ad0c644d9..0a4829b661 100644 --- a/testing/adios2/engine/common/TestEngineCommon.cpp +++ b/testing/adios2/engine/common/TestEngineCommon.cpp @@ -236,7 +236,7 @@ TEST_F(Common, NewAttributeEveryStep) uint64_t expectedAttributeValue = step + 1; EXPECT_TRUE(aStep); ASSERT_EQ(aStep.Data().size() == 1, true); - ASSERT_EQ(aStep.Type(), adios2::GetDataType()); + ASSERT_EQ(aStep.Type(), adios2::GetType()); ASSERT_EQ(aStep.Data().front(), expectedAttributeValue); if (!rank) diff --git a/testing/adios2/engine/hdf5/TestHDF5WriteReadAttributesADIOS2.cpp b/testing/adios2/engine/hdf5/TestHDF5WriteReadAttributesADIOS2.cpp index 617d63eeec..a7d851401b 100644 --- a/testing/adios2/engine/hdf5/TestHDF5WriteReadAttributesADIOS2.cpp +++ b/testing/adios2/engine/hdf5/TestHDF5WriteReadAttributesADIOS2.cpp @@ -111,73 +111,73 @@ TEST_F(BPWriteReadAttributeTestADIOS2, ADIOS2BPWriteReadSingleTypes) EXPECT_TRUE(attr_s1); ASSERT_EQ(attr_s1.Name(), s1_Single); ASSERT_EQ(attr_s1.Data().size() == 1, true); - ASSERT_EQ(attr_s1.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_s1.Type(), adios2::GetType()); ASSERT_EQ(attr_s1.Data().front(), currentTestData.S1); EXPECT_TRUE(attr_s1a); ASSERT_EQ(attr_s1a.Name(), s1_Array); ASSERT_EQ(attr_s1a.Data().size() == 1, true); - ASSERT_EQ(attr_s1a.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_s1a.Type(), adios2::GetType()); ASSERT_EQ(attr_s1a.Data()[0], currentTestData.S1array[0]); EXPECT_TRUE(attr_i8); ASSERT_EQ(attr_i8.Name(), i8_Single); ASSERT_EQ(attr_i8.Data().size() == 1, true); - ASSERT_EQ(attr_i8.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_i8.Type(), adios2::GetType()); ASSERT_EQ(attr_i8.Data().front(), currentTestData.I8.front()); EXPECT_TRUE(attr_i16); ASSERT_EQ(attr_i16.Name(), i16_Single); ASSERT_EQ(attr_i16.Data().size() == 1, true); - ASSERT_EQ(attr_i16.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_i16.Type(), adios2::GetType()); ASSERT_EQ(attr_i16.Data().front(), currentTestData.I16.front()); EXPECT_TRUE(attr_i32); ASSERT_EQ(attr_i32.Name(), i32_Single); ASSERT_EQ(attr_i32.Data().size() == 1, true); - ASSERT_EQ(attr_i32.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_i32.Type(), adios2::GetType()); ASSERT_EQ(attr_i32.Data().front(), currentTestData.I32.front()); EXPECT_TRUE(attr_i64); ASSERT_EQ(attr_i64.Name(), i64_Single); ASSERT_EQ(attr_i64.Data().size() == 1, true); - ASSERT_EQ(attr_i64.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_i64.Type(), adios2::GetType()); ASSERT_EQ(attr_i64.Data().front(), currentTestData.I64.front()); EXPECT_TRUE(attr_u8); ASSERT_EQ(attr_u8.Name(), u8_Single); ASSERT_EQ(attr_u8.Data().size() == 1, true); - ASSERT_EQ(attr_u8.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_u8.Type(), adios2::GetType()); ASSERT_EQ(attr_u8.Data().front(), currentTestData.U8.front()); EXPECT_TRUE(attr_u16); ASSERT_EQ(attr_u16.Name(), u16_Single); ASSERT_EQ(attr_u16.Data().size() == 1, true); - ASSERT_EQ(attr_u16.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_u16.Type(), adios2::GetType()); ASSERT_EQ(attr_u16.Data().front(), currentTestData.U16.front()); EXPECT_TRUE(attr_u32); ASSERT_EQ(attr_u32.Name(), u32_Single); ASSERT_EQ(attr_u32.Data().size() == 1, true); - ASSERT_EQ(attr_u32.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_u32.Type(), adios2::GetType()); ASSERT_EQ(attr_u32.Data().front(), currentTestData.U32.front()); EXPECT_TRUE(attr_u64); ASSERT_EQ(attr_u64.Name(), u64_Single); ASSERT_EQ(attr_u64.Data().size() == 1, true); - ASSERT_EQ(attr_u64.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_u64.Type(), adios2::GetType()); ASSERT_EQ(attr_u64.Data().front(), currentTestData.U64.front()); EXPECT_TRUE(attr_r32); ASSERT_EQ(attr_r32.Name(), r32_Single); ASSERT_EQ(attr_r32.Data().size() == 1, true); - ASSERT_EQ(attr_r32.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_r32.Type(), adios2::GetType()); ASSERT_EQ(attr_r32.Data().front(), currentTestData.R32.front()); EXPECT_TRUE(attr_r64); ASSERT_EQ(attr_r64.Name(), r64_Single); ASSERT_EQ(attr_r64.Data().size() == 1, true); - ASSERT_EQ(attr_r64.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_r64.Type(), adios2::GetType()); ASSERT_EQ(attr_r64.Data().front(), currentTestData.R64.front()); bpRead.Close(); @@ -284,57 +284,57 @@ TEST_F(BPWriteReadAttributeTestADIOS2, ADIOS2BPWriteReadArrayTypes) EXPECT_TRUE(attr_s1); ASSERT_EQ(attr_s1.Name(), s1_Array); ASSERT_EQ(attr_s1.Data().size() == 1, false); - ASSERT_EQ(attr_s1.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_s1.Type(), adios2::GetType()); EXPECT_TRUE(attr_i8); ASSERT_EQ(attr_i8.Name(), i8_Array); ASSERT_EQ(attr_i8.Data().size() == 1, false); - ASSERT_EQ(attr_i8.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_i8.Type(), adios2::GetType()); EXPECT_TRUE(attr_i16); ASSERT_EQ(attr_i16.Name(), i16_Array); ASSERT_EQ(attr_i16.Data().size() == 1, false); - ASSERT_EQ(attr_i16.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_i16.Type(), adios2::GetType()); EXPECT_TRUE(attr_i32); ASSERT_EQ(attr_i32.Name(), i32_Array); ASSERT_EQ(attr_i32.Data().size() == 1, false); - ASSERT_EQ(attr_i32.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_i32.Type(), adios2::GetType()); EXPECT_TRUE(attr_i64); ASSERT_EQ(attr_i64.Name(), i64_Array); ASSERT_EQ(attr_i64.Data().size() == 1, false); - ASSERT_EQ(attr_i64.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_i64.Type(), adios2::GetType()); EXPECT_TRUE(attr_u8); ASSERT_EQ(attr_u8.Name(), u8_Array); ASSERT_EQ(attr_u8.Data().size() == 1, false); - ASSERT_EQ(attr_u8.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_u8.Type(), adios2::GetType()); EXPECT_TRUE(attr_u16); ASSERT_EQ(attr_u16.Name(), u16_Array); ASSERT_EQ(attr_u16.Data().size() == 1, false); - ASSERT_EQ(attr_u16.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_u16.Type(), adios2::GetType()); EXPECT_TRUE(attr_u32); ASSERT_EQ(attr_u32.Name(), u32_Array); ASSERT_EQ(attr_u32.Data().size() == 1, false); - ASSERT_EQ(attr_u32.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_u32.Type(), adios2::GetType()); EXPECT_TRUE(attr_u64); ASSERT_EQ(attr_u64.Name(), u64_Array); ASSERT_EQ(attr_u64.Data().size() == 1, false); - ASSERT_EQ(attr_u64.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_u64.Type(), adios2::GetType()); EXPECT_TRUE(attr_r32); ASSERT_EQ(attr_r32.Name(), r32_Array); ASSERT_EQ(attr_r32.Data().size() == 1, false); - ASSERT_EQ(attr_r32.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_r32.Type(), adios2::GetType()); EXPECT_TRUE(attr_r64); ASSERT_EQ(attr_r64.Name(), r64_Array); ASSERT_EQ(attr_r64.Data().size() == 1, false); - ASSERT_EQ(attr_r64.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_r64.Type(), adios2::GetType()); auto I8 = attr_i8.Data(); auto I16 = attr_i16.Data(); @@ -465,67 +465,67 @@ TEST_F(BPWriteReadAttributeTestADIOS2, BPWriteReadSingleTypesVar) EXPECT_TRUE(attr_s1); ASSERT_EQ(attr_s1.Name(), var.Name() + separator + s1_Single); ASSERT_EQ(attr_s1.Data().size() == 1, true); - ASSERT_EQ(attr_s1.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_s1.Type(), adios2::GetType()); ASSERT_EQ(attr_s1.Data().front(), currentTestData.S1); EXPECT_TRUE(attr_i8); ASSERT_EQ(attr_i8.Name(), var.Name() + separator + i8_Single); ASSERT_EQ(attr_i8.Data().size() == 1, true); - ASSERT_EQ(attr_i8.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_i8.Type(), adios2::GetType()); ASSERT_EQ(attr_i8.Data().front(), currentTestData.I8.front()); EXPECT_TRUE(attr_i16); ASSERT_EQ(attr_i16.Name(), var.Name() + separator + i16_Single); ASSERT_EQ(attr_i16.Data().size() == 1, true); - ASSERT_EQ(attr_i16.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_i16.Type(), adios2::GetType()); ASSERT_EQ(attr_i16.Data().front(), currentTestData.I16.front()); EXPECT_TRUE(attr_i32); ASSERT_EQ(attr_i32.Name(), var.Name() + separator + i32_Single); ASSERT_EQ(attr_i32.Data().size() == 1, true); - ASSERT_EQ(attr_i32.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_i32.Type(), adios2::GetType()); ASSERT_EQ(attr_i32.Data().front(), currentTestData.I32.front()); EXPECT_TRUE(attr_i64); ASSERT_EQ(attr_i64.Name(), var.Name() + separator + i64_Single); ASSERT_EQ(attr_i64.Data().size() == 1, true); - ASSERT_EQ(attr_i64.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_i64.Type(), adios2::GetType()); ASSERT_EQ(attr_i64.Data().front(), currentTestData.I64.front()); EXPECT_TRUE(attr_u8); ASSERT_EQ(attr_u8.Name(), var.Name() + separator + u8_Single); ASSERT_EQ(attr_u8.Data().size() == 1, true); - ASSERT_EQ(attr_u8.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_u8.Type(), adios2::GetType()); ASSERT_EQ(attr_u8.Data().front(), currentTestData.U8.front()); EXPECT_TRUE(attr_u16); ASSERT_EQ(attr_u16.Name(), var.Name() + separator + u16_Single); ASSERT_EQ(attr_u16.Data().size() == 1, true); - ASSERT_EQ(attr_u16.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_u16.Type(), adios2::GetType()); ASSERT_EQ(attr_u16.Data().front(), currentTestData.U16.front()); EXPECT_TRUE(attr_u32); ASSERT_EQ(attr_u32.Name(), var.Name() + separator + u32_Single); ASSERT_EQ(attr_u32.Data().size() == 1, true); - ASSERT_EQ(attr_u32.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_u32.Type(), adios2::GetType()); ASSERT_EQ(attr_u32.Data().front(), currentTestData.U32.front()); EXPECT_TRUE(attr_u64); ASSERT_EQ(attr_u64.Name(), var.Name() + separator + u64_Single); ASSERT_EQ(attr_u64.Data().size() == 1, true); - ASSERT_EQ(attr_u64.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_u64.Type(), adios2::GetType()); ASSERT_EQ(attr_u64.Data().front(), currentTestData.U64.front()); EXPECT_TRUE(attr_r32); ASSERT_EQ(attr_r32.Name(), var.Name() + separator + r32_Single); ASSERT_EQ(attr_r32.Data().size() == 1, true); - ASSERT_EQ(attr_r32.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_r32.Type(), adios2::GetType()); ASSERT_EQ(attr_r32.Data().front(), currentTestData.R32.front()); EXPECT_TRUE(attr_r64); ASSERT_EQ(attr_r64.Name(), var.Name() + separator + r64_Single); ASSERT_EQ(attr_r64.Data().size() == 1, true); - ASSERT_EQ(attr_r64.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_r64.Type(), adios2::GetType()); ASSERT_EQ(attr_r64.Data().front(), currentTestData.R64.front()); bpRead.Close(); @@ -638,57 +638,57 @@ TEST_F(BPWriteReadAttributeTestADIOS2, ADIOS2BPWriteReadArrayTypesVar) EXPECT_TRUE(attr_s1); ASSERT_EQ(attr_s1.Name(), var.Name() + separator + s1_Array); ASSERT_EQ(attr_s1.Data().size() == 1, false); - ASSERT_EQ(attr_s1.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_s1.Type(), adios2::GetType()); EXPECT_TRUE(attr_i8); ASSERT_EQ(attr_i8.Name(), var.Name() + separator + i8_Array); ASSERT_EQ(attr_i8.Data().size() == 1, false); - ASSERT_EQ(attr_i8.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_i8.Type(), adios2::GetType()); EXPECT_TRUE(attr_i16); ASSERT_EQ(attr_i16.Name(), var.Name() + separator + i16_Array); ASSERT_EQ(attr_i16.Data().size() == 1, false); - ASSERT_EQ(attr_i16.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_i16.Type(), adios2::GetType()); EXPECT_TRUE(attr_i32); ASSERT_EQ(attr_i32.Name(), var.Name() + separator + i32_Array); ASSERT_EQ(attr_i32.Data().size() == 1, false); - ASSERT_EQ(attr_i32.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_i32.Type(), adios2::GetType()); EXPECT_TRUE(attr_i64); ASSERT_EQ(attr_i64.Name(), var.Name() + separator + i64_Array); ASSERT_EQ(attr_i64.Data().size() == 1, false); - ASSERT_EQ(attr_i64.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_i64.Type(), adios2::GetType()); EXPECT_TRUE(attr_u8); ASSERT_EQ(attr_u8.Name(), var.Name() + separator + u8_Array); ASSERT_EQ(attr_u8.Data().size() == 1, false); - ASSERT_EQ(attr_u8.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_u8.Type(), adios2::GetType()); EXPECT_TRUE(attr_u16); ASSERT_EQ(attr_u16.Name(), var.Name() + separator + u16_Array); ASSERT_EQ(attr_u16.Data().size() == 1, false); - ASSERT_EQ(attr_u16.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_u16.Type(), adios2::GetType()); EXPECT_TRUE(attr_u32); ASSERT_EQ(attr_u32.Name(), var.Name() + separator + u32_Array); ASSERT_EQ(attr_u32.Data().size() == 1, false); - ASSERT_EQ(attr_u32.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_u32.Type(), adios2::GetType()); EXPECT_TRUE(attr_u64); ASSERT_EQ(attr_u64.Name(), var.Name() + separator + u64_Array); ASSERT_EQ(attr_u64.Data().size() == 1, false); - ASSERT_EQ(attr_u64.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_u64.Type(), adios2::GetType()); EXPECT_TRUE(attr_r32); ASSERT_EQ(attr_r32.Name(), var.Name() + separator + r32_Array); ASSERT_EQ(attr_r32.Data().size() == 1, false); - ASSERT_EQ(attr_r32.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_r32.Type(), adios2::GetType()); EXPECT_TRUE(attr_r64); ASSERT_EQ(attr_r64.Name(), var.Name() + separator + r64_Array); ASSERT_EQ(attr_r64.Data().size() == 1, false); - ASSERT_EQ(attr_r64.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_r64.Type(), adios2::GetType()); auto I8 = attr_i8.Data(); auto I16 = attr_i16.Data(); diff --git a/testing/adios2/engine/staging-common/TestCommonReadAttrs.cpp b/testing/adios2/engine/staging-common/TestCommonReadAttrs.cpp index 5bfa345c73..db823f6598 100644 --- a/testing/adios2/engine/staging-common/TestCommonReadAttrs.cpp +++ b/testing/adios2/engine/staging-common/TestCommonReadAttrs.cpp @@ -112,49 +112,49 @@ TEST_F(CommonReadTest, ADIOS2CommonRead1D8) EXPECT_TRUE(attr_s1); ASSERT_EQ(attr_s1.Name(), s1_Single); ASSERT_EQ(attr_s1.Data().size() == 1, true); - ASSERT_EQ(attr_s1.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_s1.Type(), adios2::GetType()); ASSERT_EQ(attr_s1.Data().front(), data_S1); // EXPECT_TRUE(attr_s1a); // ASSERT_EQ(attr_s1a.Name(), s1_Array); // ASSERT_EQ(attr_s1a.Data().size() == 1, true); - // ASSERT_EQ(attr_s1a.Type(), adios2::GetDataType()); + // ASSERT_EQ(attr_s1a.Type(), adios2::GetType()); // ASSERT_EQ(attr_s1a.Data()[0], currentTestData.S1array[0]); EXPECT_TRUE(attr_i8); ASSERT_EQ(attr_i8.Name(), i8_Single); ASSERT_EQ(attr_i8.Data().size() == 1, true); - ASSERT_EQ(attr_i8.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_i8.Type(), adios2::GetType()); ASSERT_EQ(attr_i8.Data().front(), data_I8.front()); EXPECT_TRUE(attr_i16); ASSERT_EQ(attr_i16.Name(), i16_Single); ASSERT_EQ(attr_i16.Data().size() == 1, true); - ASSERT_EQ(attr_i16.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_i16.Type(), adios2::GetType()); ASSERT_EQ(attr_i16.Data().front(), data_I16.front()); EXPECT_TRUE(attr_i32); ASSERT_EQ(attr_i32.Name(), i32_Single); ASSERT_EQ(attr_i32.Data().size() == 1, true); - ASSERT_EQ(attr_i32.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_i32.Type(), adios2::GetType()); ASSERT_EQ(attr_i32.Data().front(), data_I32.front()); EXPECT_TRUE(attr_i64); ASSERT_EQ(attr_i64.Name(), i64_Single); ASSERT_EQ(attr_i64.Data().size() == 1, true); - ASSERT_EQ(attr_i64.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_i64.Type(), adios2::GetType()); ASSERT_EQ(attr_i64.Data().front(), data_I64.front()); EXPECT_TRUE(attr_r32); ASSERT_EQ(attr_r32.Name(), r32_Single); ASSERT_EQ(attr_r32.Data().size() == 1, true); - ASSERT_EQ(attr_r32.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_r32.Type(), adios2::GetType()); ASSERT_EQ(attr_r32.Data().front(), data_R32.front()); EXPECT_TRUE(attr_r64); ASSERT_EQ(attr_r64.Name(), r64_Single); ASSERT_EQ(attr_r64.Data().size() == 1, true); - ASSERT_EQ(attr_r64.Type(), adios2::GetDataType()); + ASSERT_EQ(attr_r64.Type(), adios2::GetType()); ASSERT_EQ(attr_r64.Data().front(), data_R64.front()); auto scalar_r64 = io.InquireVariable("scalar_r64"); diff --git a/testing/adios2/interface/TestADIOSDefineAttribute.cpp b/testing/adios2/interface/TestADIOSDefineAttribute.cpp index ebf93f289b..4ae737af9a 100644 --- a/testing/adios2/interface/TestADIOSDefineAttribute.cpp +++ b/testing/adios2/interface/TestADIOSDefineAttribute.cpp @@ -712,17 +712,17 @@ TEST_F(ADIOSDefineAttributeTest, DefineCheckType) io.DefineAttribute("r32", 32); io.DefineAttribute("r64", 64); - EXPECT_EQ(io.AttributeType("iString"), adios2::GetDataType()); - EXPECT_EQ(io.AttributeType("i8"), adios2::GetDataType()); - EXPECT_EQ(io.AttributeType("i16"), adios2::GetDataType()); - EXPECT_EQ(io.AttributeType("i32"), adios2::GetDataType()); - EXPECT_EQ(io.AttributeType("i64"), adios2::GetDataType()); - EXPECT_EQ(io.AttributeType("u8"), adios2::GetDataType()); - EXPECT_EQ(io.AttributeType("u16"), adios2::GetDataType()); - EXPECT_EQ(io.AttributeType("u32"), adios2::GetDataType()); - EXPECT_EQ(io.AttributeType("u64"), adios2::GetDataType()); - EXPECT_EQ(io.AttributeType("r32"), adios2::GetDataType()); - EXPECT_EQ(io.AttributeType("r64"), adios2::GetDataType()); + EXPECT_EQ(io.AttributeType("iString"), adios2::GetType()); + EXPECT_EQ(io.AttributeType("i8"), adios2::GetType()); + EXPECT_EQ(io.AttributeType("i16"), adios2::GetType()); + EXPECT_EQ(io.AttributeType("i32"), adios2::GetType()); + EXPECT_EQ(io.AttributeType("i64"), adios2::GetType()); + EXPECT_EQ(io.AttributeType("u8"), adios2::GetType()); + EXPECT_EQ(io.AttributeType("u16"), adios2::GetType()); + EXPECT_EQ(io.AttributeType("u32"), adios2::GetType()); + EXPECT_EQ(io.AttributeType("u64"), adios2::GetType()); + EXPECT_EQ(io.AttributeType("r32"), adios2::GetType()); + EXPECT_EQ(io.AttributeType("r64"), adios2::GetType()); } TEST_F(ADIOSDefineAttributeTest, VariableException) diff --git a/testing/adios2/interface/TestADIOSDefineVariable.cpp b/testing/adios2/interface/TestADIOSDefineVariable.cpp index 9ac105cfee..ced1e64a49 100644 --- a/testing/adios2/interface/TestADIOSDefineVariable.cpp +++ b/testing/adios2/interface/TestADIOSDefineVariable.cpp @@ -637,24 +637,22 @@ TEST_F(ADIOSDefineVariableTest, DefineCheckType) io.DefineVariable("l", shape, start, count); io.DefineVariable("ul", shape, start, count); - EXPECT_EQ(io.VariableType("iString"), adios2::GetDataType()); - EXPECT_EQ(io.VariableType("i8"), adios2::GetDataType()); - EXPECT_EQ(io.VariableType("i16"), adios2::GetDataType()); - EXPECT_EQ(io.VariableType("i32"), adios2::GetDataType()); - EXPECT_EQ(io.VariableType("i64"), adios2::GetDataType()); - EXPECT_EQ(io.VariableType("u8"), adios2::GetDataType()); - EXPECT_EQ(io.VariableType("u16"), adios2::GetDataType()); - EXPECT_EQ(io.VariableType("u32"), adios2::GetDataType()); - EXPECT_EQ(io.VariableType("u64"), adios2::GetDataType()); - EXPECT_EQ(io.VariableType("r32"), adios2::GetDataType()); - EXPECT_EQ(io.VariableType("r64"), adios2::GetDataType()); - EXPECT_EQ(io.VariableType("c32"), - adios2::GetDataType>()); - EXPECT_EQ(io.VariableType("c64"), - adios2::GetDataType>()); - EXPECT_EQ(io.VariableType("char"), adios2::GetDataType()); - EXPECT_EQ(io.VariableType("l"), adios2::GetDataType()); - EXPECT_EQ(io.VariableType("ul"), adios2::GetDataType()); + EXPECT_EQ(io.VariableType("iString"), adios2::GetType()); + EXPECT_EQ(io.VariableType("i8"), adios2::GetType()); + EXPECT_EQ(io.VariableType("i16"), adios2::GetType()); + EXPECT_EQ(io.VariableType("i32"), adios2::GetType()); + EXPECT_EQ(io.VariableType("i64"), adios2::GetType()); + EXPECT_EQ(io.VariableType("u8"), adios2::GetType()); + EXPECT_EQ(io.VariableType("u16"), adios2::GetType()); + EXPECT_EQ(io.VariableType("u32"), adios2::GetType()); + EXPECT_EQ(io.VariableType("u64"), adios2::GetType()); + EXPECT_EQ(io.VariableType("r32"), adios2::GetType()); + EXPECT_EQ(io.VariableType("r64"), adios2::GetType()); + EXPECT_EQ(io.VariableType("c32"), adios2::GetType>()); + EXPECT_EQ(io.VariableType("c64"), adios2::GetType>()); + EXPECT_EQ(io.VariableType("char"), adios2::GetType()); + EXPECT_EQ(io.VariableType("l"), adios2::GetType()); + EXPECT_EQ(io.VariableType("ul"), adios2::GetType()); } int main(int argc, char **argv)