@@ -1 +1 @@ | |||||
Subproject commit 2235ce1635fa404fc8e7f700258de7c0a903136a | |||||
Subproject commit d05eb966657babec841907e9fa0e618643ca115f |
@@ -1,7 +1,7 @@ | |||||
// | // | ||||
// Lol Engine | // Lol Engine | ||||
// | // | ||||
// Copyright © 2010—2019 Sam Hocevar <sam@hocevar.net> | |||||
// Copyright © 2010—2020 Sam Hocevar <sam@hocevar.net> | |||||
// | // | ||||
// Lol Engine is free software. It comes without any warranty, to | // Lol Engine is free software. It comes without any warranty, to | ||||
// the extent permitted by applicable law. You can redistribute it | // the extent permitted by applicable law. You can redistribute it | ||||
@@ -20,7 +20,9 @@ | |||||
// Ticker class for the ticking logic and the linked list implementation. | // Ticker class for the ticking logic and the linked list implementation. | ||||
// | // | ||||
#include <cstdint> | |||||
#include <map> // std::map | |||||
#include <string> // std::string | |||||
#include <stdint.h> | |||||
#include <lol/engine/tickable.h> | #include <lol/engine/tickable.h> | ||||
@@ -1,7 +1,7 @@ | |||||
// | // | ||||
// Lol Engine | // Lol Engine | ||||
// | // | ||||
// Copyright © 2010—2019 Sam Hocevar <sam@hocevar.net> | |||||
// Copyright © 2010—2020 Sam Hocevar <sam@hocevar.net> | |||||
// | // | ||||
// Lol Engine is free software. It comes without any warranty, to | // Lol Engine is free software. It comes without any warranty, to | ||||
// the extent permitted by applicable law. You can redistribute it | // the extent permitted by applicable law. You can redistribute it | ||||
@@ -18,6 +18,7 @@ | |||||
// | // | ||||
#include <lol/math/transform.h> | #include <lol/math/transform.h> | ||||
#include <../legacy/lol/math/geometry.h> // box3 | |||||
#include "engine/entity.h" | #include "engine/entity.h" | ||||
@@ -20,6 +20,7 @@ | |||||
#include <../legacy/lol/math/arraynd.h> | #include <../legacy/lol/math/arraynd.h> | ||||
#include <lol/math/vector.h> | #include <lol/math/vector.h> | ||||
#include <../legacy/lol/image/pixel.h> | #include <../legacy/lol/image/pixel.h> | ||||
#include <../legacy/lol/math/geometry.h> // ibox2 | |||||
#include <string> | #include <string> | ||||
@@ -11,8 +11,12 @@ | |||||
// See http://www.wtfpl.net/ for more details. | // See http://www.wtfpl.net/ for more details. | ||||
// | // | ||||
#include <lol/engine-internal.h> | |||||
#if HAVE_CONFIG_H | |||||
# include "config.h" | |||||
#endif | |||||
#include <lol/base/lolunit.h> | #include <lol/base/lolunit.h> | ||||
#include <lol/base/utils.h> | |||||
#include <string> | #include <string> | ||||
@@ -10,8 +10,16 @@ | |||||
// See http://www.wtfpl.net/ for more details. | // See http://www.wtfpl.net/ for more details. | ||||
// | // | ||||
#include <lol/engine-internal.h> | |||||
#if HAVE_CONFIG_H | |||||
# include "config.h" | |||||
#endif | |||||
#include <lol/base/lolunit.h> | #include <lol/base/lolunit.h> | ||||
#include <../legacy/lol/base/types.h> | |||||
#include <../legacy/lol/math/functions.h> | |||||
#include <lol/math/vector.h> | |||||
#include <lol/math/transform.h> | |||||
#include <lol/types/half.h> | |||||
namespace lol | namespace lol | ||||
{ | { | ||||
@@ -96,20 +104,6 @@ lolunit_declare_fixture(build_features) | |||||
lolunit_assert_equal(sizeof(i64vec4), 32); | lolunit_assert_equal(sizeof(i64vec4), 32); | ||||
lolunit_assert_equal(sizeof(u64vec4), 32); | lolunit_assert_equal(sizeof(u64vec4), 32); | ||||
} | } | ||||
#if !defined LOL_BUILD_DEBUG | |||||
lolunit_declare_test(fast_math) | |||||
{ | |||||
double x, y; | |||||
y = x = 1.0 + rand(0.1f, 0.2f); | |||||
y += 4503599627370496.0; | |||||
/* The compiler should optimise this away */ | |||||
y -= 4503599627370496.0; | |||||
lolunit_assert_equal(x, y); | |||||
} | |||||
#endif | |||||
}; | }; | ||||
} /* namespace lol */ | } /* namespace lol */ | ||||
@@ -11,8 +11,13 @@ | |||||
// See http://www.wtfpl.net/ for more details. | // See http://www.wtfpl.net/ for more details. | ||||
// | // | ||||
#include <lol/engine-internal.h> | |||||
#if HAVE_CONFIG_H | |||||
# include "config.h" | |||||
#endif | |||||
#include <lol/base/lolunit.h> | #include <lol/base/lolunit.h> | ||||
#include <lol/../camera.h> | |||||
#include <lol/../engine/ticker.h> | |||||
#include <memory> | #include <memory> | ||||
@@ -10,8 +10,12 @@ | |||||
// See http://www.wtfpl.net/ for more details. | // See http://www.wtfpl.net/ for more details. | ||||
// | // | ||||
#include <lol/engine-internal.h> | |||||
#if HAVE_CONFIG_H | |||||
# include "config.h" | |||||
#endif | |||||
#include <lol/base/lolunit.h> | #include <lol/base/lolunit.h> | ||||
#include <lol/image/color.h> | |||||
namespace lol | namespace lol | ||||
{ | { | ||||
@@ -10,10 +10,13 @@ | |||||
// See http://www.wtfpl.net/ for more details. | // See http://www.wtfpl.net/ for more details. | ||||
// | // | ||||
#include <lol/engine-internal.h> | |||||
#include <lol/base/lolunit.h> | |||||
#if HAVE_CONFIG_H | |||||
# include "config.h" | |||||
#endif | |||||
#include <cmath> | |||||
#include <lol/base/lolunit.h> | |||||
#include <lol/math/vector.h> | |||||
#include <lol/image/image.h> | |||||
namespace lol | namespace lol | ||||
{ | { | ||||
@@ -10,8 +10,12 @@ | |||||
// See http://www.wtfpl.net/ for more details. | // See http://www.wtfpl.net/ for more details. | ||||
// | // | ||||
#include <lol/engine-internal.h> | |||||
#if HAVE_CONFIG_H | |||||
# include "config.h" | |||||
#endif | |||||
#include <lol/base/lolunit.h> | #include <lol/base/lolunit.h> | ||||
#include <../legacy/lol/math/arraynd.h> | |||||
namespace lol | namespace lol | ||||
{ | { | ||||
@@ -10,8 +10,12 @@ | |||||
// See http://www.wtfpl.net/ for more details. | // See http://www.wtfpl.net/ for more details. | ||||
// | // | ||||
#include <lol/engine-internal.h> | |||||
#if HAVE_CONFIG_H | |||||
# include "config.h" | |||||
#endif | |||||
#include <lol/base/lolunit.h> | #include <lol/base/lolunit.h> | ||||
#include <../legacy/lol/math/arraynd.h> | |||||
namespace lol | namespace lol | ||||
{ | { | ||||
@@ -10,8 +10,12 @@ | |||||
// See http://www.wtfpl.net/ for more details. | // See http://www.wtfpl.net/ for more details. | ||||
// | // | ||||
#include <lol/engine-internal.h> | |||||
#if HAVE_CONFIG_H | |||||
# include "config.h" | |||||
#endif | |||||
#include <lol/base/lolunit.h> | #include <lol/base/lolunit.h> | ||||
#include <../legacy/lol/math/arraynd.h> | |||||
namespace lol | namespace lol | ||||
{ | { | ||||
@@ -10,12 +10,13 @@ | |||||
// See http://www.wtfpl.net/ for more details. | // See http://www.wtfpl.net/ for more details. | ||||
// | // | ||||
#include <lol/engine-internal.h> | |||||
#if HAVE_CONFIG_H | |||||
# include "config.h" | |||||
#endif | |||||
#include <lol/base/lolunit.h> | #include <lol/base/lolunit.h> | ||||
#include <lol/types/bigint.h> | #include <lol/types/bigint.h> | ||||
#include <cmath> | |||||
namespace lol | namespace lol | ||||
{ | { | ||||
@@ -27,7 +28,7 @@ lolunit_declare_fixture(bigint_test) | |||||
bigint<0> b; | bigint<0> b; | ||||
bigint<32> c; | bigint<32> c; | ||||
UNUSED(a, b,c); | |||||
(void)a, (void)b, (void)c; | |||||
} | } | ||||
lolunit_declare_test(int32_cast) | lolunit_declare_test(int32_cast) | ||||
@@ -10,8 +10,13 @@ | |||||
// See http://www.wtfpl.net/ for more details. | // See http://www.wtfpl.net/ for more details. | ||||
// | // | ||||
#include <lol/engine-internal.h> | |||||
#if HAVE_CONFIG_H | |||||
# include "config.h" | |||||
#endif | |||||
#include <lol/base/lolunit.h> | #include <lol/base/lolunit.h> | ||||
#include <lol/math/vector.h> | |||||
#include <../legacy/lol/math/geometry.h> | |||||
namespace lol | namespace lol | ||||
{ | { | ||||
@@ -10,8 +10,12 @@ | |||||
// See http://www.wtfpl.net/ for more details. | // See http://www.wtfpl.net/ for more details. | ||||
// | // | ||||
#include <lol/engine-internal.h> | |||||
#if HAVE_CONFIG_H | |||||
# include "config.h" | |||||
#endif | |||||
#include <lol/base/lolunit.h> | #include <lol/base/lolunit.h> | ||||
#include <lol/math/transform.h> | |||||
namespace lol | namespace lol | ||||
{ | { | ||||
@@ -10,10 +10,14 @@ | |||||
// See http://www.wtfpl.net/ for more details. | // See http://www.wtfpl.net/ for more details. | ||||
// | // | ||||
#include <lol/engine-internal.h> | |||||
#include <lol/base/lolunit.h> | |||||
#if HAVE_CONFIG_H | |||||
# include "config.h" | |||||
#endif | |||||
#include <cmath> | |||||
#include <lol/base/lolunit.h> | |||||
#include <lol/types/half.h> | |||||
#include <lol/math/vector.h> // for the sizeof(f16vec2) etc. tests | |||||
#include <lol/math/transform.h> // for the sizeof(f16mat2) etc. tests | |||||
namespace lol | namespace lol | ||||
{ | { | ||||
@@ -10,8 +10,16 @@ | |||||
// See http://www.wtfpl.net/ for more details. | // See http://www.wtfpl.net/ for more details. | ||||
// | // | ||||
#include <lol/engine-internal.h> | |||||
#if HAVE_CONFIG_H | |||||
# include "config.h" | |||||
#endif | |||||
#include <lol/base/lolunit.h> | #include <lol/base/lolunit.h> | ||||
#include <lol/math/vector.h> // vec_t | |||||
#include <lol/math/transform.h> // mat_t | |||||
#include <lol/math/rand.h> // lol::rand | |||||
#include <cfloat> // FLT_MAX | |||||
namespace lol | namespace lol | ||||
{ | { | ||||
@@ -2,8 +2,6 @@ | |||||
// Lol Engine — Unit tests | // Lol Engine — Unit tests | ||||
// | // | ||||
// Copyright © 2010—2020 Sam Hocevar <sam@hocevar.net> | // Copyright © 2010—2020 Sam Hocevar <sam@hocevar.net> | ||||
// © 2013—2014 Benjamin “Touky” Huet <huet.benjamin@gmail.com> | |||||
// © 2013—2014 Guillaume Bittoun <guillaume.bittoun@gmail.com> | |||||
// | // | ||||
// Lol Engine is free software. It comes without any warranty, to | // Lol Engine is free software. It comes without any warranty, to | ||||
// the extent permitted by applicable law. You can redistribute it | // the extent permitted by applicable law. You can redistribute it | ||||
@@ -12,8 +10,12 @@ | |||||
// See http://www.wtfpl.net/ for more details. | // See http://www.wtfpl.net/ for more details. | ||||
// | // | ||||
#include <lol/engine-internal.h> | |||||
#if HAVE_CONFIG_H | |||||
# include "config.h" | |||||
#endif | |||||
#include <lol/base/lolunit.h> | #include <lol/base/lolunit.h> | ||||
#include <../legacy/lol/math/noise/simplex.h> | |||||
namespace lol | namespace lol | ||||
{ | { | ||||
@@ -10,8 +10,12 @@ | |||||
// See http://www.wtfpl.net/ for more details. | // See http://www.wtfpl.net/ for more details. | ||||
// | // | ||||
#include <lol/engine-internal.h> | |||||
#if HAVE_CONFIG_H | |||||
# include "config.h" | |||||
#endif | |||||
#include <lol/base/lolunit.h> | #include <lol/base/lolunit.h> | ||||
#include <../legacy/lol/math/functions.h> | |||||
namespace lol | namespace lol | ||||
{ | { | ||||
@@ -10,7 +10,10 @@ | |||||
// See http://www.wtfpl.net/ for more details. | // See http://www.wtfpl.net/ for more details. | ||||
// | // | ||||
#include <lol/engine-internal.h> | |||||
#if HAVE_CONFIG_H | |||||
# include "config.h" | |||||
#endif | |||||
#include <lol/base/lolunit.h> | #include <lol/base/lolunit.h> | ||||
#include <lol/types/real.h> | #include <lol/types/real.h> | ||||
#include <lol/math/polynomial.h> | #include <lol/math/polynomial.h> | ||||
@@ -10,8 +10,17 @@ | |||||
// See http://www.wtfpl.net/ for more details. | // See http://www.wtfpl.net/ for more details. | ||||
// | // | ||||
#include <lol/engine-internal.h> | |||||
#if HAVE_CONFIG_H | |||||
# include "config.h" | |||||
#endif | |||||
#include <lol/base/lolunit.h> | #include <lol/base/lolunit.h> | ||||
#include <lol/math/vector.h> // vec_t | |||||
#include <lol/math/transform.h> // quat_t | |||||
#include <lol/math/rand.h> // rand() | |||||
#include <../legacy/lol/math/functions.h> // radians() | |||||
#include <cstring> // memset | |||||
namespace lol | namespace lol | ||||
{ | { | ||||
@@ -35,9 +44,9 @@ lolunit_declare_fixture(quaternion_test) | |||||
/* Fill array with random test values */ | /* Fill array with random test values */ | ||||
for (int i = 0; i < 10000; ++i) | for (int i = 0; i < 10000; ++i) | ||||
{ | { | ||||
vec3 v1 = lol::pow(10.f, rand(-5.f, 5.f)) | |||||
vec3 v1 = pow(10.f, rand(-5.f, 5.f)) | |||||
* vec3(rand(-1.f, 1.f), rand(-1.f, 1.f), rand(-1.f, 1.f)); | * vec3(rand(-1.f, 1.f), rand(-1.f, 1.f), rand(-1.f, 1.f)); | ||||
vec3 v2 = lol::pow(10.f, rand(-5.f, 5.f)) | |||||
vec3 v2 = pow(10.f, rand(-5.f, 5.f)) | |||||
* vec3(rand(-1.f, 1.f), rand(-1.f, 1.f), rand(-1.f, 1.f)); | * vec3(rand(-1.f, 1.f), rand(-1.f, 1.f), rand(-1.f, 1.f)); | ||||
push_vector_pair(v1, v2); | push_vector_pair(v1, v2); | ||||
} | } | ||||
@@ -10,8 +10,14 @@ | |||||
// See http://www.wtfpl.net/ for more details. | // See http://www.wtfpl.net/ for more details. | ||||
// | // | ||||
#include <lol/engine-internal.h> | |||||
#if HAVE_CONFIG_H | |||||
# include "config.h" | |||||
#endif | |||||
#include <lol/base/lolunit.h> | #include <lol/base/lolunit.h> | ||||
#include <lol/math/rand.h> | |||||
#include <cfloat> // FLT_MAX | |||||
namespace lol | namespace lol | ||||
{ | { | ||||
@@ -22,8 +28,7 @@ lolunit_declare_fixture(rand_test) | |||||
{ | { | ||||
int const rolls = 2000; | int const rolls = 2000; | ||||
int bits[32]; | |||||
memset(bits, 0, sizeof(bits)); | |||||
int bits[32] = { 0 }; | |||||
for (int i = 0; i < rolls; ++i) | for (int i = 0; i < rolls; ++i) | ||||
{ | { | ||||
@@ -51,8 +56,7 @@ lolunit_declare_fixture(rand_test) | |||||
{ | { | ||||
int const rolls = 2000; | int const rolls = 2000; | ||||
int bits[16]; | |||||
memset(bits, 0, sizeof(bits)); | |||||
int bits[16] = { 0 }; | |||||
for (int i = 0; i < rolls; ++i) | for (int i = 0; i < rolls; ++i) | ||||
{ | { | ||||
@@ -80,8 +84,7 @@ lolunit_declare_fixture(rand_test) | |||||
{ | { | ||||
int const rolls = 2000; | int const rolls = 2000; | ||||
int bits[8]; | |||||
memset(bits, 0, sizeof(bits)); | |||||
int bits[8] = { 0 }; | |||||
for (int i = 0; i < rolls; ++i) | for (int i = 0; i < rolls; ++i) | ||||
{ | { | ||||
@@ -10,9 +10,13 @@ | |||||
// See http://www.wtfpl.net/ for more details. | // See http://www.wtfpl.net/ for more details. | ||||
// | // | ||||
#include <lol/engine-internal.h> | |||||
#if HAVE_CONFIG_H | |||||
# include "config.h" | |||||
#endif | |||||
#include <lol/base/lolunit.h> | #include <lol/base/lolunit.h> | ||||
#include <lol/types/real.h> | #include <lol/types/real.h> | ||||
#include <lol/math/transform.h> // for rcmplx | |||||
#include <cmath> | #include <cmath> | ||||
@@ -328,15 +332,15 @@ lolunit_declare_fixture(real_test) | |||||
auto sqrt7 = sqrt(real(7)); | auto sqrt7 = sqrt(real(7)); | ||||
auto sqrt8 = sqrt(real(8)); | auto sqrt8 = sqrt(real(8)); | ||||
lolunit_assert_doubles_equal(double(sqrt0), sqrt(0.0), 1e-8); | |||||
lolunit_assert_doubles_equal(double(sqrt1), sqrt(1.0), 1e-8); | |||||
lolunit_assert_doubles_equal(double(sqrt2), sqrt(2.0), 1e-8); | |||||
lolunit_assert_doubles_equal(double(sqrt3), sqrt(3.0), 1e-8); | |||||
lolunit_assert_doubles_equal(double(sqrt4), sqrt(4.0), 1e-8); | |||||
lolunit_assert_doubles_equal(double(sqrt5), sqrt(5.0), 1e-8); | |||||
lolunit_assert_doubles_equal(double(sqrt6), sqrt(6.0), 1e-8); | |||||
lolunit_assert_doubles_equal(double(sqrt7), sqrt(7.0), 1e-8); | |||||
lolunit_assert_doubles_equal(double(sqrt8), sqrt(8.0), 1e-8); | |||||
lolunit_assert_doubles_equal(double(sqrt0), std::sqrt(0.0), 1e-8); | |||||
lolunit_assert_doubles_equal(double(sqrt1), std::sqrt(1.0), 1e-8); | |||||
lolunit_assert_doubles_equal(double(sqrt2), std::sqrt(2.0), 1e-8); | |||||
lolunit_assert_doubles_equal(double(sqrt3), std::sqrt(3.0), 1e-8); | |||||
lolunit_assert_doubles_equal(double(sqrt4), std::sqrt(4.0), 1e-8); | |||||
lolunit_assert_doubles_equal(double(sqrt5), std::sqrt(5.0), 1e-8); | |||||
lolunit_assert_doubles_equal(double(sqrt6), std::sqrt(6.0), 1e-8); | |||||
lolunit_assert_doubles_equal(double(sqrt7), std::sqrt(7.0), 1e-8); | |||||
lolunit_assert_doubles_equal(double(sqrt8), std::sqrt(8.0), 1e-8); | |||||
} | } | ||||
lolunit_declare_test(real_cbrt) | lolunit_declare_test(real_cbrt) | ||||
@@ -359,23 +363,23 @@ lolunit_declare_fixture(real_test) | |||||
auto cbrt7 = cbrt(real(7)); | auto cbrt7 = cbrt(real(7)); | ||||
auto cbrt8 = cbrt(real(8)); | auto cbrt8 = cbrt(real(8)); | ||||
lolunit_assert_doubles_equal(double(cbrtm8), cbrt(-8.0), 1e-8); | |||||
lolunit_assert_doubles_equal(double(cbrtm7), cbrt(-7.0), 1e-8); | |||||
lolunit_assert_doubles_equal(double(cbrtm6), cbrt(-6.0), 1e-8); | |||||
lolunit_assert_doubles_equal(double(cbrtm5), cbrt(-5.0), 1e-8); | |||||
lolunit_assert_doubles_equal(double(cbrtm4), cbrt(-4.0), 1e-8); | |||||
lolunit_assert_doubles_equal(double(cbrtm3), cbrt(-3.0), 1e-8); | |||||
lolunit_assert_doubles_equal(double(cbrtm2), cbrt(-2.0), 1e-8); | |||||
lolunit_assert_doubles_equal(double(cbrtm1), cbrt(-1.0), 1e-8); | |||||
lolunit_assert_doubles_equal(double(cbrt0), cbrt(0.0), 1e-8); | |||||
lolunit_assert_doubles_equal(double(cbrt1), cbrt(1.0), 1e-8); | |||||
lolunit_assert_doubles_equal(double(cbrt2), cbrt(2.0), 1e-8); | |||||
lolunit_assert_doubles_equal(double(cbrt3), cbrt(3.0), 1e-8); | |||||
lolunit_assert_doubles_equal(double(cbrt4), cbrt(4.0), 1e-8); | |||||
lolunit_assert_doubles_equal(double(cbrt5), cbrt(5.0), 1e-8); | |||||
lolunit_assert_doubles_equal(double(cbrt6), cbrt(6.0), 1e-8); | |||||
lolunit_assert_doubles_equal(double(cbrt7), cbrt(7.0), 1e-8); | |||||
lolunit_assert_doubles_equal(double(cbrt8), cbrt(8.0), 1e-8); | |||||
lolunit_assert_doubles_equal(double(cbrtm8), std::cbrt(-8.0), 1e-8); | |||||
lolunit_assert_doubles_equal(double(cbrtm7), std::cbrt(-7.0), 1e-8); | |||||
lolunit_assert_doubles_equal(double(cbrtm6), std::cbrt(-6.0), 1e-8); | |||||
lolunit_assert_doubles_equal(double(cbrtm5), std::cbrt(-5.0), 1e-8); | |||||
lolunit_assert_doubles_equal(double(cbrtm4), std::cbrt(-4.0), 1e-8); | |||||
lolunit_assert_doubles_equal(double(cbrtm3), std::cbrt(-3.0), 1e-8); | |||||
lolunit_assert_doubles_equal(double(cbrtm2), std::cbrt(-2.0), 1e-8); | |||||
lolunit_assert_doubles_equal(double(cbrtm1), std::cbrt(-1.0), 1e-8); | |||||
lolunit_assert_doubles_equal(double(cbrt0), std::cbrt(0.0), 1e-8); | |||||
lolunit_assert_doubles_equal(double(cbrt1), std::cbrt(1.0), 1e-8); | |||||
lolunit_assert_doubles_equal(double(cbrt2), std::cbrt(2.0), 1e-8); | |||||
lolunit_assert_doubles_equal(double(cbrt3), std::cbrt(3.0), 1e-8); | |||||
lolunit_assert_doubles_equal(double(cbrt4), std::cbrt(4.0), 1e-8); | |||||
lolunit_assert_doubles_equal(double(cbrt5), std::cbrt(5.0), 1e-8); | |||||
lolunit_assert_doubles_equal(double(cbrt6), std::cbrt(6.0), 1e-8); | |||||
lolunit_assert_doubles_equal(double(cbrt7), std::cbrt(7.0), 1e-8); | |||||
lolunit_assert_doubles_equal(double(cbrt8), std::cbrt(8.0), 1e-8); | |||||
} | } | ||||
lolunit_declare_test(real_ldexp) | lolunit_declare_test(real_ldexp) | ||||
@@ -10,8 +10,14 @@ | |||||
// See http://www.wtfpl.net/ for more details. | // See http://www.wtfpl.net/ for more details. | ||||
// | // | ||||
#include <lol/engine-internal.h> | |||||
#if HAVE_CONFIG_H | |||||
# include "config.h" | |||||
#endif | |||||
#include <lol/base/lolunit.h> | #include <lol/base/lolunit.h> | ||||
#include <lol/math/vector.h> | |||||
#include <lol/math/transform.h> | |||||
#include <../legacy/lol/math/functions.h> | |||||
namespace lol | namespace lol | ||||
{ | { | ||||
@@ -10,8 +10,13 @@ | |||||
// See http://www.wtfpl.net/ for more details. | // See http://www.wtfpl.net/ for more details. | ||||
// | // | ||||
#include <lol/engine-internal.h> | |||||
#if HAVE_CONFIG_H | |||||
# include "config.h" | |||||
#endif | |||||
#include <lol/base/lolunit.h> | #include <lol/base/lolunit.h> | ||||
#include <lol/math/vector.h> | |||||
#include <lol/math/transform.h> | |||||
namespace lol | namespace lol | ||||
{ | { | ||||
@@ -10,10 +10,12 @@ | |||||
// See http://www.wtfpl.net/ for more details. | // See http://www.wtfpl.net/ for more details. | ||||
// | // | ||||
#include <lol/engine-internal.h> | |||||
#include <lol/base/lolunit.h> | |||||
#if HAVE_CONFIG_H | |||||
# include "config.h" | |||||
#endif | |||||
#include <cmath> | |||||
#include <lol/base/lolunit.h> | |||||
#include <../legacy/lol/math/functions.h> | |||||
namespace lol | namespace lol | ||||
{ | { | ||||
@@ -10,8 +10,12 @@ | |||||
// See http://www.wtfpl.net/ for more details. | // See http://www.wtfpl.net/ for more details. | ||||
// | // | ||||
#include <lol/engine-internal.h> | |||||
#if HAVE_CONFIG_H | |||||
# include "config.h" | |||||
#endif | |||||
#include <lol/base/lolunit.h> | #include <lol/base/lolunit.h> | ||||
#include <lol/math/vector.h> | |||||
namespace lol | namespace lol | ||||
{ | { | ||||
@@ -11,25 +11,18 @@ | |||||
// See http://www.wtfpl.net/ for more details. | // See http://www.wtfpl.net/ for more details. | ||||
// | // | ||||
#include <lol/engine-internal.h> | |||||
#include <lol/base/lolunit.h> | |||||
#if HAVE_CONFIG_H | |||||
# include "config.h" | |||||
#endif | |||||
#include <string> | |||||
#include <map> | |||||
#include <lol/base/lolunit.h> | |||||
#include <lol/base/thread.h> | |||||
namespace lol | namespace lol | ||||
{ | { | ||||
lolunit_declare_fixture(thread_test) | lolunit_declare_fixture(thread_test) | ||||
{ | { | ||||
void setup() | |||||
{ | |||||
} | |||||
void teardown() | |||||
{ | |||||
} | |||||
lolunit_declare_test(queue_try_push) | lolunit_declare_test(queue_try_push) | ||||
{ | { | ||||
queue<int, 1> q; | queue<int, 1> q; | ||||
@@ -2,8 +2,6 @@ | |||||
// Lol Engine — Unit tests | // Lol Engine — Unit tests | ||||
// | // | ||||
// Copyright © 2010—2020 Sam Hocevar <sam@hocevar.net> | // Copyright © 2010—2020 Sam Hocevar <sam@hocevar.net> | ||||
// © 2014—2015 Benjamin “Touky” Huet <huet.benjamin@gmail.com> | |||||
// © 2014—2015 Guillaume Bittoun <guillaume.bittoun@gmail.com> | |||||
// | // | ||||
// Lol Engine is free software. It comes without any warranty, to | // Lol Engine is free software. It comes without any warranty, to | ||||
// the extent permitted by applicable law. You can redistribute it | // the extent permitted by applicable law. You can redistribute it | ||||
@@ -12,22 +10,18 @@ | |||||
// See http://www.wtfpl.net/ for more details. | // See http://www.wtfpl.net/ for more details. | ||||
// | // | ||||
#include <lol/engine-internal.h> | |||||
#if HAVE_CONFIG_H | |||||
# include "config.h" | |||||
#endif | |||||
#include <lol/base/lolunit.h> | #include <lol/base/lolunit.h> | ||||
#include <lol/base/thread.h> | |||||
namespace lol | namespace lol | ||||
{ | { | ||||
lolunit_declare_fixture(timer_test) | lolunit_declare_fixture(timer_test) | ||||
{ | { | ||||
void setup() | |||||
{ | |||||
} | |||||
void teardown() | |||||
{ | |||||
} | |||||
lolunit_declare_test(timers) | lolunit_declare_test(timers) | ||||
{ | { | ||||
timer t0, t1; | timer t0, t1; | ||||
@@ -10,16 +10,17 @@ | |||||
// See http://www.wtfpl.net/ for more details. | // See http://www.wtfpl.net/ for more details. | ||||
// | // | ||||
#include <lol/engine-internal.h> | |||||
#if HAVE_CONFIG_H | |||||
# include "config.h" | |||||
#endif | |||||
#include <lol/base/lolunit.h> | #include <lol/base/lolunit.h> | ||||
#include <cstdio> | #include <cstdio> | ||||
#include <cstdlib> | #include <cstdlib> | ||||
int main(int argc, char **argv) | |||||
int main(int, char **) | |||||
{ | { | ||||
UNUSED(argc, argv); | |||||
lol::text_runner runner; | lol::text_runner runner; | ||||
bool success = runner.Run(); | bool success = runner.Run(); | ||||
return success ? EXIT_SUCCESS : EXIT_FAILURE; | return success ? EXIT_SUCCESS : EXIT_FAILURE; | ||||