diff options
author | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2017-12-04 18:21:12 (GMT) |
---|---|---|
committer | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2017-12-04 18:21:12 (GMT) |
commit | e33d677636b860f8f6b95c0ee3736395541a2610 (patch) | |
tree | d70dd01c6e75aa27ef6d286c553de06625aa0b8d /c++/test/tlinks.cpp | |
parent | f116545ce465181928ca97214b9cfa87092a3ee9 (diff) | |
download | hdf5-e33d677636b860f8f6b95c0ee3736395541a2610.zip hdf5-e33d677636b860f8f6b95c0ee3736395541a2610.tar.gz hdf5-e33d677636b860f8f6b95c0ee3736395541a2610.tar.bz2 |
Various code cleanup
Description:
- Replaced H5Location::exists with H5Location::nameExists and marked
H5Location::exists as deprecated.
- Miscellaneous test cleanup for consistency.
Platforms tested:
Linux/32 2.6 (jam)
Linux/64 (jelly)
Darwin (osx1010test)
Diffstat (limited to 'c++/test/tlinks.cpp')
-rw-r--r-- | c++/test/tlinks.cpp | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/c++/test/tlinks.cpp b/c++/test/tlinks.cpp index dc592b3..e348d64 100644 --- a/c++/test/tlinks.cpp +++ b/c++/test/tlinks.cpp @@ -328,9 +328,6 @@ static const char *FILENAME[] = { * * Programmer Binh-Minh Ribler * October 16, 2009 - * - * Modifications: - * *------------------------------------------------------------------------- */ static void test_basic_links(hid_t fapl_id, hbool_t new_format) @@ -414,6 +411,11 @@ static void test_basic_links(hid_t fapl_id, hbool_t new_format) H5File file(filename, H5F_ACC_RDWR, FileCreatPropList::DEFAULT, fapl); // Verify link existence + if(file.nameExists("dset1", LinkAccPropList::DEFAULT) != TRUE) + throw InvalidActionException("H5File::nameExists", "dset1 doesn't exist"); + if(file.nameExists("grp1/soft", LinkAccPropList::DEFAULT) != TRUE) + throw InvalidActionException("H5File::nameExists", "grp1/soft doesn't exist"); + // Deprecated if(file.exists("dset1", LinkAccPropList::DEFAULT) != TRUE) throw InvalidActionException("H5File::exists", "dset1 doesn't exist"); if(file.exists("grp1/soft", LinkAccPropList::DEFAULT) != TRUE) @@ -446,9 +448,6 @@ static void test_basic_links(hid_t fapl_id, hbool_t new_format) * * Programmer Binh-Minh Ribler * October 16, 2009 - * - * Modifications: - * *------------------------------------------------------------------------- */ static void test_num_links(hid_t fapl_id, hbool_t new_format) @@ -483,6 +482,7 @@ static void test_num_links(hid_t fapl_id, hbool_t new_format) issue_fail_msg("test_num_links()", __LINE__, __FILE__, E.getCDetailMsg()); } } // test_num_links + /*------------------------------------------------------------------------- * Function: test_links @@ -493,7 +493,6 @@ static void test_num_links(hid_t fapl_id, hbool_t new_format) * * Programmer Binh-Minh Ribler * October 16, 2009 - * *------------------------------------------------------------------------- */ extern "C" @@ -671,18 +670,13 @@ void test_links() } + /*------------------------------------------------------------------------- * Function: cleanup_links * * Purpose Cleanup temporary test files * * Return none - * - * Programmer Binh-Minh Ribler - * October 16, 2009 - * - * Modifications: - * *------------------------------------------------------------------------- */ extern "C" |