-
Hyphens are now stripped in the constructor and added back by the write() method.
-
The results of the Python unit test were not correctly tracked due to some subtle problems related to the way how C++ code is called through the Python interface. A kluge has been found and added to GTestSuite.i to retrieve the Python test results and to propagate them to the C++ test suite, so now Python test results are also written into the XML file, and the Python tests signal failure in case that something goes wrong.
-
GTestSuite::run starts with creating a test case that collects the total time spent in a test and that also collects any failures of the individual test cases. Before, this test case was appended AFTER running the individual test cases, which led to an XML file out of order. Now the general test case is appended BEFORE running the test cases.
-
I ran this build: CXXFLAGS="-Wall -Wno-c++11-long-long -pedantic -std=c++98" ./configure make -j 1 This commit fixes the few compiler warnings that showed up (all unimportant). There is no way to fix the issue that `long long` is not standard C++98, but it's an extension that has been supported by most compilers for a decade, so it's OK to ignore: http://stackoverflow.com/questions/4017621/how-to-do-portable-64-bit-arithmetic-without-compiler-warnings
-
Before some exceptions were missed, in particular those occuring on de-allocation of an object after the try_success() method has been called. For these cases, a dummy exception test case is created and the exception is tracked.
-
GTestSuites The GTestSuites class now derives from GContainer and implements the usual container class methods (at(), size(), isempty(), set(), append(), insert(), remove(), reserve() and extend()). The operator[] now returns pointers to GTestSuite. The name() and timestamp() methods now return const references. GTestSuite The GTestSuite class now derives from GBase. This implies that the clone() method needs to be implemented for derived classes. The test_assert() method now takes a const reference for the boolean argument. The name(), errors(), failures(), and timestamp() methods return const references. The obsolete add_test() method has been removed. The unit tests have been updated to conform to the new interfaces.
-
Add GChatter argument to print() method. The print() method now takes an argument of type GChatter to control the chattiness of the output in a homogenous manner. Pass NORMAL chatter level in __str__ method. Add chatter argument to print() methods. Use GLog::chatter() method to control the chattiness of the log stream operator. Add chatter() methods and provide member access through const references. Add chatter() methods, provide member access through const references, and declare one liners as inline methods. The chatter() methods control the new m_chatter attribute that is used to control the chattiness of the object's print() methods. name() and version() methods return const references. logFileOpen() method now sets the chattiness from the applications's chatter parameter, and name() and version() methods now return a const reference.
-
On Mac OS X using the Apple gcc compiler, we need to include gomp_thread_attr in case we want OpenMP support. Some code has been added to the configure script to detect this specific need, and only if this specific need is met the variable HAVE_OPENMP_DARWIN_KLUGE is defined in config.h. We use then this varaible to include (or not) the following sequence: #ifdef HAVE_OPENMP_DARWIN_KLUGE #include <pthread.h> pthread_attr_t gomp_thread_attr; #endif
-
Added a test_value() method for integer comparisons that automatically informs about the mismatches. This increases the readability of the test results.
-
So far the classes have a GLog member. The output using GLog is however not satisfactory, hence we switched to std::cout. This should be okay, but maybe someday we want to clean the logger.
-
To conform to the former test output, we remove printing of the test suite header to the logger.
-
The Python code was removed as this required a linking of GammaLib with the Python library, which we want to avoid. Linking to Python should only be required by the Python wrappers. As we created a specific Python test suite GPythonTestSuite for Python unit tests, we can make GTestSuite abstract again, which is cleaner.
-
As Python version < 3 does not support abstract base classes, we had to make GTestSuite abstract so that we can derive a test suite in Python. A special append method was added to the Python interface that takes a PyObject as argument. The PyObject pointer is stored in a void array of pointers that is kept along with the function pointers. For a C++ function, the Python pointers are NULL. For a Python function, the C++ pointers are NULL. The run method checks then whether a C++ pointer or a Python pointer exists, and performs the adequat run command.
-
The run method now runs directly the test functions, instead of using the test case class for this.
-
…at derivates from GTestSuite.