aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/utils/test.h
Commit message (Collapse)AuthorAgeFilesLines
* unit-tests: Support testable functions on Windows, avoid weak GCC symbolsMartin Willi2014-06-041-10/+8
| | | | | | | Instead of using weak symbols, we use dlsym() on Windows to find an arbitrary symbol in libtest to detect its linkage. Instead of creating the associated hashtable in the test runner, we maintain it in libstrongswan, making it significantly simpler.
* unit-tests: Always load address of testable functionsTobias Brunner2014-03-311-1/+1
| | | | | | | The addresses can actually change as plugins are loaded/unloaded for each test case. Fixes #551.
* unit-tests: Implement registered functions without __builtin_apply()Tobias Brunner2014-03-201-17/+17
| | | | | This makes the tests work with clang, which does not implement said builtin.
* unit-tests: Prefix imported testable functions with TEST_Tobias Brunner2014-03-201-3/+3
| | | | This avoids any clashes with existing functions in the monolithic build.
* unit-tests: Change how hashtable for testable functions is createdTobias Brunner2014-03-201-1/+1
| | | | | | | | Because GCC does not adhere to the priorities defined for constructors when building with --enable-monolithic (not sure if it was just luck that it worked in non-monolithic mode - anyway, it's not very portable) function registration would fail because the hashtable would not be created yet.
* unit-tests: Don't use priority for destructor that unregisters testable ↵Tobias Brunner2013-12-041-1/+6
| | | | | | | | | functions This fixes coverage reports, at least if leak detective is disabled. If it is enabled the plugins are not unloaded so the destructor is not executed until the process is destroyed, which seems not to be covered by gcov.
* unit-tests: Add facility to register testable functionsTobias Brunner2013-12-041-0/+91
These can be defined in plugins, or other parts of the tested libraries. They can even be static.