summaryrefslogtreecommitdiffstats
path: root/c++/test/h5cpputil.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'c++/test/h5cpputil.cpp')
-rw-r--r--c++/test/h5cpputil.cpp108
1 files changed, 54 insertions, 54 deletions
diff --git a/c++/test/h5cpputil.cpp b/c++/test/h5cpputil.cpp
index f271eed..b93f136 100644
--- a/c++/test/h5cpputil.cpp
+++ b/c++/test/h5cpputil.cpp
@@ -28,11 +28,11 @@ using std::cerr;
using std::endl;
#include <string>
-#include "H5Cpp.h" // C++ API header file
+#include "H5Cpp.h" // C++ API header file
using namespace H5;
#include "h5test.h"
-#include "h5cpputil.h" // C++ utilility header file
+#include "h5cpputil.h" // C++ utilility header file
/*-------------------------------------------------------------------------
* Function: test_report
@@ -49,24 +49,21 @@ using namespace H5;
* Friday, February 6, 2001
*-------------------------------------------------------------------------
*/
-int test_report( int nerrors, const H5std_string& testname )
+int
+test_report(int nerrors, const H5std_string &testname)
{
- if (nerrors)
- {
- nerrors = MAX(1, nerrors);
+ if (nerrors) {
+ nerrors = MAX(1, nerrors);
if (1 == nerrors)
- cerr << "***** " << nerrors << testname
- << " TEST FAILED! *****" << endl;
+ cerr << "***** " << nerrors << testname << " TEST FAILED! *****" << endl;
else
- cerr << "***** " << nerrors << testname
- << " TESTS FAILED! *****" << endl;
- return 1;
- }
- else
- {
- cerr << "All" << testname << " tests passed." << endl;
- return 0;
- }
+ cerr << "***** " << nerrors << testname << " TESTS FAILED! *****" << endl;
+ return 1;
+ }
+ else {
+ cerr << "All" << testname << " tests passed." << endl;
+ return 0;
+ }
}
/*-------------------------------------------------------------------------
@@ -81,14 +78,14 @@ int test_report( int nerrors, const H5std_string& testname )
*
*-------------------------------------------------------------------------
*/
-void issue_fail_msg(const char* where, int line, const char* file_name,
- const char* message)
+void
+issue_fail_msg(const char *where, int line, const char *file_name, const char *message)
{
- if (GetTestVerbosity()>=VERBO_HI)
- {
+ if (GetTestVerbosity() >= VERBO_HI) {
cerr << endl;
- cerr << ">>> FAILED in " << where << " at line " << line
- << " in " << file_name << " - " << message << endl << endl;
+ cerr << ">>> FAILED in " << where << " at line " << line << " in " << file_name << " - " << message
+ << endl
+ << endl;
}
}
@@ -104,15 +101,15 @@ void issue_fail_msg(const char* where, int line, const char* file_name,
*
*-------------------------------------------------------------------------
*/
-void issue_fail_msg(const char* where, int line, const char* file_name,
- const char* func_name, const char* message)
+void
+issue_fail_msg(const char *where, int line, const char *file_name, const char *func_name, const char *message)
{
- if (GetTestVerbosity()>=VERBO_HI)
- {
+ if (GetTestVerbosity() >= VERBO_HI) {
cerr << endl;
- cerr << ">>> FAILED in " << where << ": " << func_name << endl <<
- " at line " << line << " in " << file_name << endl <<
- " C library detail: " << message << endl << endl;
+ cerr << ">>> FAILED in " << where << ": " << func_name << endl
+ << " at line " << line << " in " << file_name << endl
+ << " C library detail: " << message << endl
+ << endl;
}
}
@@ -134,13 +131,13 @@ void issue_fail_msg(const char* where, int line, const char* file_name,
* Friday, February 6, 2001
*-------------------------------------------------------------------------
*/
-int check_values (hsize_t i, hsize_t j, int apoint, int acheck)
+int
+check_values(hsize_t i, hsize_t j, int apoint, int acheck)
{
- if (apoint != acheck)
- {
+ if (apoint != acheck) {
cerr << " Read different values than written.\n" << endl;
- cerr << " At index " << static_cast<unsigned long>(i) << "," <<
- static_cast<unsigned long>(j) << endl;
+ cerr << " At index " << static_cast<unsigned long>(i) << "," << static_cast<unsigned long>(j)
+ << endl;
return -1;
}
return 0;
@@ -161,10 +158,10 @@ int check_values (hsize_t i, hsize_t j, int apoint, int acheck)
*
*-------------------------------------------------------------------------
*/
-void check_values(const char *value, const char* msg, int line, const char* file_name)
+void
+check_values(const char *value, const char *msg, int line, const char *file_name)
{
- if (value == NULL)
- {
+ if (value == NULL) {
cerr << endl;
cerr << "*** ERROR: " << msg << ", at line " << line << endl;
IncTestNumErrs();
@@ -187,21 +184,19 @@ void check_values(const char *value, const char* msg, int line, const char* file
* May 2, 2010
*-------------------------------------------------------------------------
*/
-void verify_val(const char* x, const char* value, const char* where, int line, const char* file_name)
+void
+verify_val(const char *x, const char *value, const char *where, int line, const char *file_name)
{
- if (GetTestVerbosity()>=VERBO_HI)
- {
+ if (GetTestVerbosity() >= VERBO_HI) {
cerr << endl;
- cerr << " Call to routine: " << where << " at line " << line
- << " in " << file_name << " had value " << x << endl;
+ cerr << " Call to routine: " << where << " at line " << line << " in " << file_name << " had value "
+ << x << endl;
}
- if (strcmp(x, value) != 0)
- {
+ if (strcmp(x, value) != 0) {
cerr << endl;
- cerr << "*** UNEXPECTED VALUE from " << where << " should be "
- << value << ", but is " << x << " at line " << line
- << " in " << file_name << endl;
- //IncTestNumErrs();
+ cerr << "*** UNEXPECTED VALUE from " << where << " should be " << value << ", but is " << x
+ << " at line " << line << " in " << file_name << endl;
+ // IncTestNumErrs();
throw TestFailedException(where, "");
}
}
@@ -209,7 +204,7 @@ void verify_val(const char* x, const char* value, const char* where, int line, c
//--------------------------------------------------------------------------
// Function: InvalidActionException default constructor
//--------------------------------------------------------------------------
-InvalidActionException::InvalidActionException():Exception(){}
+InvalidActionException::InvalidActionException() : Exception() {}
//--------------------------------------------------------------------------
// Function: InvalidActionException overloaded constructor
@@ -221,7 +216,10 @@ InvalidActionException::InvalidActionException():Exception(){}
// func - IN: Name of the function where failure should occur
// message - IN: Message
//--------------------------------------------------------------------------
-InvalidActionException::InvalidActionException(const H5std_string func, const H5std_string message) : Exception(func, message) {}
+InvalidActionException::InvalidActionException(const H5std_string func, const H5std_string message)
+ : Exception(func, message)
+{
+}
//--------------------------------------------------------------------------
// Function: InvalidActionException destructor
@@ -231,7 +229,7 @@ InvalidActionException::~InvalidActionException() throw() {}
//--------------------------------------------------------------------------
// Function: TestFailedException default constructor
//--------------------------------------------------------------------------
-TestFailedException::TestFailedException():Exception(){}
+TestFailedException::TestFailedException() : Exception() {}
//--------------------------------------------------------------------------
// Function: TestFailedException overloaded constructor
@@ -243,10 +241,12 @@ TestFailedException::TestFailedException():Exception(){}
// func - IN: Name of the function where failure should occur
// message - IN: Message
//--------------------------------------------------------------------------
-TestFailedException::TestFailedException(const H5std_string func, const H5std_string message) : Exception(func, message) {}
+TestFailedException::TestFailedException(const H5std_string func, const H5std_string message)
+ : Exception(func, message)
+{
+}
//--------------------------------------------------------------------------
// Function: TestFailedException destructor
//--------------------------------------------------------------------------
TestFailedException::~TestFailedException() throw() {}
-