[MOAB-dev] commit/MOAB: danwu: Added a new test case (load an NC file with NOMESH option and a NULL file set) to TestErrorHandling example. Note, this error is only reproducible for serial read. For parallel read, a new file set will be created in ReadParallel::load_file() if the input one is NULL.
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Tue Mar 11 15:54:05 CDT 2014
1 new commit in MOAB:
https://bitbucket.org/fathomteam/moab/commits/2e872bfd776a/
Changeset: 2e872bfd776a
Branch: error_handling_enhancement
User: danwu
Date: 2014-03-11 21:53:48
Summary: Added a new test case (load an NC file with NOMESH option and a NULL file set) to TestErrorHandling example. Note, this error is only reproducible for serial read. For parallel read, a new file set will be created in ReadParallel::load_file() if the input one is NULL.
Affected #: 1 file
diff --git a/examples/TestErrorHandling.cpp b/examples/TestErrorHandling.cpp
index 7ae140a..89bdf60 100644
--- a/examples/TestErrorHandling.cpp
+++ b/examples/TestErrorHandling.cpp
@@ -64,9 +64,23 @@ ErrorCode TestErrorHandling_4()
return MB_SUCCESS;
}
+// In this test case, an error MB_FAILURE is returned by MOAB
+// Note, this error is only reproducible for serial read
+ErrorCode TestErrorHandling_5()
+{
+ Core moab;
+ Interface& mb = moab;
+
+ // Load a CAM-FV file with NOMESH option and a NULL file set
+ string test_file = string(MESH_DIR) + string("/io/fv26x46x72.t.3.nc");
+ ErrorCode rval = mb.load_file(test_file.c_str(), NULL, "NOMESH;VARIABLE=");CHK_ERR(rval);
+
+ return MB_SUCCESS;
+}
+
int main(int argc, char** argv)
{
- // The required arg is a test case number (1 to 4)
+ // The required arg is a test case number (1 to 5)
if (argc < 2) {
cout << "Usage: " << argv[0] << " <test_case_num>" << endl;
return 0;
@@ -93,6 +107,9 @@ int main(int argc, char** argv)
else if (4 == test_case_num) {
rval = TestErrorHandling_4();CHK_ERR(rval);
}
+ else if (5 == test_case_num) {
+ rval = TestErrorHandling_5();CHK_ERR(rval);
+ }
MBErrorHandler_Finalize();
Repository URL: https://bitbucket.org/fathomteam/moab/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the moab-dev
mailing list