minor adjustments
This commit is contained in:
parent
ff15a54624
commit
0054a74302
|
@ -20,9 +20,9 @@ The library utilizes:
|
||||||
### Requirements
|
### Requirements
|
||||||
* C++ compiler supporting C++11 (I've tested GNU g++, Clang and mingw-w64 yet.)
|
* C++ compiler supporting C++11 (I've tested GNU g++, Clang and mingw-w64 yet.)
|
||||||
* CMake to build
|
* CMake to build
|
||||||
* cppunit to build and run unit tests after building
|
* cppunit to build and run unit tests
|
||||||
* The c++utilities library only depends on the C++ standard library. For Dependencies of my other projects
|
* The c++utilities library only depends on the C++ standard library. For dependencies of my other projects
|
||||||
see the README.md of these projects.
|
check the README.md of these projects.
|
||||||
|
|
||||||
### How to build
|
### How to build
|
||||||
Just run:
|
Just run:
|
||||||
|
@ -50,7 +50,7 @@ To create *.ico files for application icons ffmpeg is required.
|
||||||
In any case, the make option *-j* can be used for concurrent compilation.
|
In any case, the make option *-j* can be used for concurrent compilation.
|
||||||
|
|
||||||
### Creating Arch Linux package
|
### Creating Arch Linux package
|
||||||
The repository PKGBUILDs (also on GitHub) contains files for building Arch Linux packages.
|
The repository [PKGBUILDs](https://github.com/Martchus/PKGBUILDs) contains files for building Arch Linux packages.
|
||||||
PKGBUILD files to build for Windows using the Mingw-w64 compiler are also included.
|
PKGBUILD files to build for Windows using the Mingw-w64 compiler are also included.
|
||||||
|
|
||||||
### Notes
|
### Notes
|
||||||
|
|
|
@ -17,12 +17,18 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
# define PLATFORM_WINDOWS
|
# ifndef PLATFORM_WINDOWS
|
||||||
|
# define PLATFORM_WINDOWS
|
||||||
|
# endif
|
||||||
#elif __unix__
|
#elif __unix__
|
||||||
# define PLATFORM_UNIX
|
# ifndef PLATFORM_UNIX
|
||||||
|
# define PLATFORM_UNIX
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
# define PLATFORM_LINUX
|
# ifndef PLATFORM_LINUX
|
||||||
|
# define PLATFORM_LINUX
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -58,10 +64,12 @@
|
||||||
* If the function does nevertheless throw, the behaviour is undefined.
|
* If the function does nevertheless throw, the behaviour is undefined.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if __cplusplus >= 201103L
|
#ifndef USE_NOTHROW
|
||||||
# define USE_NOTHROW noexcept
|
# if __cplusplus >= 201103L
|
||||||
#else
|
# define USE_NOTHROW noexcept
|
||||||
# define USE_NOTHROW throw()
|
# else
|
||||||
|
# define USE_NOTHROW throw()
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
#include "cppunit.h"
|
#include "./cppunit.h"
|
||||||
|
|
|
@ -60,6 +60,11 @@ void IoTests::testFailure()
|
||||||
fstream stream;
|
fstream stream;
|
||||||
stream.exceptions(ios_base::failbit | ios_base::badbit);
|
stream.exceptions(ios_base::failbit | ios_base::badbit);
|
||||||
CPPUNIT_ASSERT_THROW(stream.open("path/to/file/which/does/not/exist", ios_base::in), ios_base::failure);
|
CPPUNIT_ASSERT_THROW(stream.open("path/to/file/which/does/not/exist", ios_base::in), ios_base::failure);
|
||||||
|
// check other exceptions used by my applications, too
|
||||||
|
vector<int> testVec;
|
||||||
|
map<string, string> testMap;
|
||||||
|
CPPUNIT_ASSERT_THROW(testVec.at(1), out_of_range);
|
||||||
|
CPPUNIT_ASSERT_THROW(testMap.at("test"), out_of_range);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
Loading…
Reference in New Issue