Sam Hocevar
fd25e64d5c
lolunit: explicitly cast lolunit_assert_doubles_equal() arguments to double.
vor 9 Jahren
Sam Hocevar
45b792cc8e
test: refactor some stuff in the unit tests because I like it better that way.
vor 9 Jahren
Benjamin ‘Touky’ Huet
a8642c05c2
small buildfix in lolunit
vor 9 Jahren
Sam Hocevar
24cbf425c2
lolunit: unit tests now display a meaningful report in Visual Studio.
vor 9 Jahren
Sam Hocevar
f791b672ed
misc: lots of compilation fixes for Visual Studio (related to mediocre
support for enable_if and other template metaprogramming techniques),
for Clang (related to static const template class member initialisation)
and for GCC (related to forward declaration of non-int enum classes).
vor 9 Jahren
Sam Hocevar
d373081b80
build: use #pragma once instead of header guards because 1) fuck the dinosaurs,
and 2) fuck the Visual Studio compiler that crashes when confused.
vor 10 Jahren
Sam Hocevar
6b64e2c337
lolunit: switch assert macros to lowercase.
vor 10 Jahren
Sam Hocevar
cadc4d18b0
test: move the unit tests to the engine, and lolunit out of the engine.
vor 10 Jahren
Sam Hocevar
ad9a388e80
misc: remove 100% of the "using namespace std;" madness.
vor 10 Jahren
Sam Hocevar
a581e1719f
base: fix very minor issues found by static analysis.
vor 10 Jahren
Sam Hocevar
d6634da83f
build: fix the WTFPL site URL in all code comments.
vor 12 Jahren
Sam Hocevar
28728814cc
core: replace usage of sin() or std::sin() with lol::sin() where appropriate.
vor 12 Jahren
Sam Hocevar
8bea4cf189
math: ensure real::fabs() is never chosen over std::fabs() for arguments
that are not explicitly real, even with namespace mistakes.
vor 12 Jahren
Sam Hocevar
5a5b811200
lolunit: rename a few methods for consistency.
vor 13 Jahren
Sam Hocevar
2e314ddc2f
lolunit: protect against multiple registration of the same fixture type.
vor 13 Jahren
Sam Hocevar
75d8811c74
lolunit: rename test runner’s run() method to Run() for consistency.
vor 13 Jahren
Sam Hocevar
8fba1a07d7
lolunit: add some comments to document the framework internals.
vor 13 Jahren
Sam Hocevar
bcc62b548a
lolunit: add several helper macros for various comparison checks.
vor 13 Jahren
Sam Hocevar
c38732ad97
lolunit: tweak output formatting so that it more closely matches CppUnit.
vor 13 Jahren
Sam Hocevar
2290b7b930
lolunit: add a LOLUNIT_SET_CONTEXT / LOLUNIT_UNSET_CONTEXT macro pair.
This is useful when doing several asserts in one loop, for instance: there
isn't always a way to deduce the loop index from the assert failure, so
these macros allow the user to give more context information.
vor 13 Jahren
Sam Hocevar
62b5838fc1
lolunit: reverse the expected/actual logic.
CPPUNIT_ASSERT_EQUAL(a, b) “expects” the value “a” and fails if “b” is
different. The logic seems backwards to me, but matching CppUnit’s
output is important so I’m doing the same in LolUnit.
vor 13 Jahren
Sam Hocevar
4d99340dfe
lolunit: fix an uninitialised member in TestCase.
vor 13 Jahren
Sam Hocevar
b64d051e6a
lolunit: free all the memory we allocated to avoid a minor memory leak,
and slightly tweak the API syntax.
vor 13 Jahren
Sam Hocevar
5ab9eb3c62
test: get rid of the need for LOLUNIT_SETUP_FIXTURE().
vor 13 Jahren
Sam Hocevar
579f77bded
test: make LolUnit's output match CppUnit's more closely.
vor 13 Jahren
Sam Hocevar
a374127e80
test: replace CppUnit with our LolUnit test suite.
CppUnit is really too large for our needs, would require to be precompiled
for many platforms, in all combinations of debug and release modes, with
additional variants for libstdc++ versions. We replace it with our own
lightweight implementation, LolUnit. Good riddance.
vor 13 Jahren