diff options
Diffstat (limited to 'c++/test/ttypes.cpp')
-rw-r--r-- | c++/test/ttypes.cpp | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/c++/test/ttypes.cpp b/c++/test/ttypes.cpp index 0cc8918..22db539 100644 --- a/c++/test/ttypes.cpp +++ b/c++/test/ttypes.cpp @@ -248,12 +248,28 @@ static void test_query() index = tid2.getMemberIndex("ORANGE"); verify_val(index, 3, "EnumType::getMemberIndex()", __LINE__, __FILE__); - // Commit compound datatype and close it + // Commit compound datatype, and test getting the datatype creation + // prop list, then close it tid1.commit(file, CompT_NAME); + PropList tcpl = tid1.getCreatePlist(); + if (!IdComponent::isValid(tcpl.getId())) + { + // Throw an invalid action exception + throw InvalidActionException("H5Object::createAttribute", "Datatype creation property list is not valid"); + } + tcpl.close(); tid1.close(); - // Commit enumeration datatype and close it + // Commit enumeration datatype, and test getting the datatype creation + // prop list, then close it tid2.commit(file, EnumT_NAME); + tcpl = tid2.getCreatePlist(); + if (!IdComponent::isValid(tcpl.getId())) + { + // Throw an invalid action exception + throw InvalidActionException("H5Object::createAttribute", "Datatype creation property list is not valid"); + } + tcpl.close(); tid2.close(); // Open the datatypes for query |