4 Commits

Author SHA1 Message Date
Zsolt Parragi
ec14c48e3e Making tests less platform dependent.
Tests executables made several assumptions that are only valid on
some system/compiler:

* That the main function is found even in a shared library (not true
  on windows). To fix this, test_main is now an ojbect library
* That the extern test_registry in test.cpp will be initialized
  before any actual test uses it. This was either a lucky coincidence
  on linux, or being related to the variable being initialized in a
  shared library. The variable is now initialized by a function,
  guarantaaing initialization order.
* That test.hpp is only inluded once per binary, which was only true
  because it was once part of a DLL, once the executable, hiding ODR
  violations. As now it's linked twice within the same binary, some
  functions had to be made inline.
* not is not a valid C++ operator, replaced all occurences with !
2019-11-29 12:16:13 +01:00
Zsolt Parragi
4dfd5e6e24 Use a macro instead of direct noinline attributes.
This is a prerequisite of MSVC support, as it uses a different syntax.
2019-11-29 12:15:54 +01:00
François-Xavier Bourlet
9fb93a08aa clang-format 2019-09-05 13:41:10 -07:00
François-Xavier Bourlet
246fd67b34 Tests refactored onto less files. 2013-11-17 22:31:13 -08:00