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.
hace 10 años
Sam Hocevar
6b64e2c337
lolunit: switch assert macros to lowercase.
hace 10 años
Sam Hocevar
cadc4d18b0
test: move the unit tests to the engine, and lolunit out of the engine.
hace 10 años
Sam Hocevar
ad9a388e80
misc: remove 100% of the "using namespace std;" madness.
hace 10 años
Sam Hocevar
a581e1719f
base: fix very minor issues found by static analysis.
hace 10 años
Sam Hocevar
d6634da83f
build: fix the WTFPL site URL in all code comments.
hace 12 años
Sam Hocevar
28728814cc
core: replace usage of sin() or std::sin() with lol::sin() where appropriate.
hace 12 años
Sam Hocevar
8bea4cf189
math: ensure real::fabs() is never chosen over std::fabs() for arguments
that are not explicitly real, even with namespace mistakes.
hace 12 años
Sam Hocevar
5a5b811200
lolunit: rename a few methods for consistency.
hace 13 años
Sam Hocevar
2e314ddc2f
lolunit: protect against multiple registration of the same fixture type.
hace 13 años
Sam Hocevar
75d8811c74
lolunit: rename test runner’s run() method to Run() for consistency.
hace 13 años
Sam Hocevar
8fba1a07d7
lolunit: add some comments to document the framework internals.
hace 13 años
Sam Hocevar
bcc62b548a
lolunit: add several helper macros for various comparison checks.
hace 13 años
Sam Hocevar
c38732ad97
lolunit: tweak output formatting so that it more closely matches CppUnit.
hace 13 años
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.
hace 13 años
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.
hace 13 años
Sam Hocevar
4d99340dfe
lolunit: fix an uninitialised member in TestCase.
hace 13 años
Sam Hocevar
b64d051e6a
lolunit: free all the memory we allocated to avoid a minor memory leak,
and slightly tweak the API syntax.
hace 13 años
Sam Hocevar
5ab9eb3c62
test: get rid of the need for LOLUNIT_SETUP_FIXTURE().
hace 13 años
Sam Hocevar
579f77bded
test: make LolUnit's output match CppUnit's more closely.
hace 13 años
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.
hace 13 años