changeset 53:fe7e3524e571

Tests: various style fixes
author David Demelier <markand@malikania.fr>
date Fri, 16 Dec 2016 13:07:44 +0100
parents 4bc4732fa1dd
children 0edaba9986ba
files tests/libclient/color/main.cpp tests/libclient/image/main.cpp tests/libclient/js-color/main.cpp tests/libclient/js-line/main.cpp tests/libclient/js-point/main.cpp tests/libclient/js-rectangle/main.cpp tests/libclient/js-size/main.cpp tests/libclient/line/main.cpp tests/libclient/point/main.cpp tests/libclient/rectangle/main.cpp tests/libclient/size/main.cpp tests/libclient/sprite/main.cpp
diffstat 12 files changed, 246 insertions(+), 131 deletions(-) [+]
line wrap: on
line diff
--- a/tests/libclient/color/main.cpp	Thu Dec 15 13:46:46 2016 +0100
+++ b/tests/libclient/color/main.cpp	Fri Dec 16 13:07:44 2016 +0100
@@ -22,7 +22,7 @@
 #include <malikania/color.hpp>
 
 /*
- * Separate arguments
+ * Separate arguments.
  * ------------------------------------------------------------------
  */
 
@@ -81,7 +81,7 @@
 BOOST_AUTO_TEST_SUITE_END()
 
 /*
- * Hexadecimal
+ * Hexadecimal.
  * ------------------------------------------------------------------
  */
 
@@ -140,7 +140,7 @@
 BOOST_AUTO_TEST_SUITE_END()
 
 /*
- * Names
+ * Names.
  * ------------------------------------------------------------------
  *
  * Test most famous.
@@ -206,7 +206,7 @@
 BOOST_AUTO_TEST_SUITE_END()
 
 /*
- * #rrggbb
+ * #rrggbb.
  * ------------------------------------------------------------------
  *
  * Test most famous.
@@ -272,7 +272,7 @@
 BOOST_AUTO_TEST_SUITE_END()
 
 /*
- * #rgb
+ * #rgb.
  * ------------------------------------------------------------------
  *
  * Test most famous.
--- a/tests/libclient/image/main.cpp	Thu Dec 15 13:46:46 2016 +0100
+++ b/tests/libclient/image/main.cpp	Fri Dec 16 13:07:44 2016 +0100
@@ -91,11 +91,6 @@
     BOOST_REQUIRE_THROW(m_loader.load_image("image-not-found"), std::exception);
 }
 
-/*
- * Draw
- * ------------------------------------------------------------------
- */
-
 BOOST_AUTO_TEST_CASE(draw)
 {
     try {
--- a/tests/libclient/js-color/main.cpp	Thu Dec 15 13:46:46 2016 +0100
+++ b/tests/libclient/js-color/main.cpp	Fri Dec 16 13:07:44 2016 +0100
@@ -46,11 +46,13 @@
 BOOST_FIXTURE_TEST_SUITE(test_color_suite, test_color)
 
 /*
- * Valid constructors
+ * Valid constructors.
  * ------------------------------------------------------------------
  */
 
-BOOST_AUTO_TEST_CASE(ConstructorNoArgs)
+BOOST_AUTO_TEST_SUITE(constructors)
+
+BOOST_AUTO_TEST_CASE(constructor_default)
 {
     try {
         auto ret = duk_peval_string(m_ctx,
@@ -61,8 +63,9 @@
             "a = c.alpha;"
         );
 
-        if (ret != 0)
+        if (ret != 0) {
             throw dukx_exception(m_ctx, -1);
+        }
 
         BOOST_REQUIRE_EQUAL(0, component("r"));
         BOOST_REQUIRE_EQUAL(0, component("g"));
@@ -73,7 +76,7 @@
     }
 }
 
-BOOST_AUTO_TEST_CASE(ConstructorString)
+BOOST_AUTO_TEST_CASE(constructor_string)
 {
     try {
         auto ret = duk_peval_string(m_ctx,
@@ -84,8 +87,9 @@
             "a = c.alpha;"
         );
 
-        if (ret != 0)
+        if (ret != 0) {
             throw dukx_exception(m_ctx, -1);
+        }
 
         BOOST_REQUIRE_EQUAL(255, component("r"));
         BOOST_REQUIRE_EQUAL(255, component("g"));
@@ -96,7 +100,7 @@
     }
 }
 
-BOOST_AUTO_TEST_CASE(ConstructorStringRgb)
+BOOST_AUTO_TEST_CASE(constructor_string_rgb)
 {
     try {
         auto ret = duk_peval_string(m_ctx,
@@ -107,8 +111,9 @@
             "a = c.alpha;"
         );
 
-        if (ret != 0)
+        if (ret != 0) {
             throw dukx_exception(m_ctx, -1);
+        }
 
         BOOST_REQUIRE_EQUAL(0, component("r"));
         BOOST_REQUIRE_EQUAL(0, component("g"));
@@ -119,7 +124,7 @@
     }
 }
 
-BOOST_AUTO_TEST_CASE(Constructor3Args)
+BOOST_AUTO_TEST_CASE(constructor_3_args)
 {
     try {
         auto ret = duk_peval_string(m_ctx,
@@ -130,8 +135,9 @@
             "a = c.alpha;"
         );
 
-        if (ret != 0)
+        if (ret != 0) {
             throw dukx_exception(m_ctx, -1);
+        }
 
         BOOST_REQUIRE_EQUAL(10, component("r"));
         BOOST_REQUIRE_EQUAL(20, component("g"));
@@ -142,7 +148,7 @@
     }
 }
 
-BOOST_AUTO_TEST_CASE(Constructor4Args)
+BOOST_AUTO_TEST_CASE(constructor_4_args)
 {
     try {
         auto ret = duk_peval_string(m_ctx,
@@ -153,8 +159,9 @@
             "a = c.alpha;"
         );
 
-        if (ret != 0)
+        if (ret != 0) {
             throw dukx_exception(m_ctx, -1);
+        }
 
         BOOST_REQUIRE_EQUAL(10, component("r"));
         BOOST_REQUIRE_EQUAL(20, component("g"));
@@ -165,7 +172,7 @@
     }
 }
 
-BOOST_AUTO_TEST_CASE(ConstructorObjectNoAlpha)
+BOOST_AUTO_TEST_CASE(constructor_object_no_alpha)
 {
     try {
         auto ret = duk_peval_string(m_ctx,
@@ -176,8 +183,9 @@
             "a = c.alpha;"
         );
 
-        if (ret != 0)
+        if (ret != 0) {
             throw dukx_exception(m_ctx, -1);
+        }
 
         BOOST_REQUIRE_EQUAL(10, component("r"));
         BOOST_REQUIRE_EQUAL(20, component("g"));
@@ -188,7 +196,7 @@
     }
 }
 
-BOOST_AUTO_TEST_CASE(ConstructorObjectAlpha)
+BOOST_AUTO_TEST_CASE(constructor_object_alpha)
 {
     try {
         auto ret = duk_peval_string(m_ctx,
@@ -199,8 +207,9 @@
             "a = c.alpha;"
         );
 
-        if (ret != 0)
+        if (ret != 0) {
             throw dukx_exception(m_ctx, -1);
+        }
 
         BOOST_REQUIRE_EQUAL(10, component("r"));
         BOOST_REQUIRE_EQUAL(20, component("g"));
@@ -211,7 +220,7 @@
     }
 }
 
-BOOST_AUTO_TEST_CASE(ConstructorNew)
+BOOST_AUTO_TEST_CASE(constructor_new)
 {
     /*
      * Just one test, function parse the same way, only 'this' or a new object is returned.
@@ -225,8 +234,9 @@
             "a = c.alpha;"
         );
 
-        if (ret != 0)
+        if (ret != 0) {
             throw dukx_exception(m_ctx, -1);
+        }
 
         BOOST_REQUIRE_EQUAL(10, component("r"));
         BOOST_REQUIRE_EQUAL(20, component("g"));
@@ -237,12 +247,16 @@
     }
 }
 
+BOOST_AUTO_TEST_SUITE_END()
+
 /*
- * Valid constructors
+ * Invalid constructors.
  * ------------------------------------------------------------------
  */
 
-BOOST_AUTO_TEST_CASE(InvalidConstructorArg1)
+BOOST_AUTO_TEST_SUITE(invalid_constructors)
+
+BOOST_AUTO_TEST_CASE(constructor_arg_1)
 {
     try {
         auto ret = duk_peval_string(m_ctx,
@@ -254,8 +268,9 @@
             "}"
         );
 
-        if (ret != 0)
+        if (ret != 0) {
             throw dukx_exception(m_ctx, -1);
+        }
 
         duk_get_global_string(m_ctx, "name");
         BOOST_REQUIRE_EQUAL("TypeError", duk_to_string(m_ctx, -1));
@@ -268,7 +283,7 @@
     }
 }
 
-BOOST_AUTO_TEST_CASE(InvalidConstructorArg2)
+BOOST_AUTO_TEST_CASE(constructor_arg_2)
 {
     try {
         auto ret = duk_peval_string(m_ctx,
@@ -280,8 +295,9 @@
             "}"
         );
 
-        if (ret != 0)
+        if (ret != 0) {
             throw dukx_exception(m_ctx, -1);
+        }
 
         duk_get_global_string(m_ctx, "name");
         BOOST_REQUIRE_EQUAL("TypeError", duk_to_string(m_ctx, -1));
@@ -294,7 +310,7 @@
     }
 }
 
-BOOST_AUTO_TEST_CASE(InvalidConstructorRange1)
+BOOST_AUTO_TEST_CASE(constructor_range_1)
 {
     try {
         auto ret = duk_peval_string(m_ctx,
@@ -306,8 +322,9 @@
             "}"
         );
 
-        if (ret != 0)
+        if (ret != 0) {
             throw dukx_exception(m_ctx, -1);
+        }
 
         duk_get_global_string(m_ctx, "name");
         BOOST_REQUIRE_EQUAL("RangeError", duk_to_string(m_ctx, -1));
@@ -320,7 +337,7 @@
     }
 }
 
-BOOST_AUTO_TEST_CASE(InvalidConstructorRange2)
+BOOST_AUTO_TEST_CASE(constructor_range_2)
 {
     try {
         auto ret = duk_peval_string(m_ctx,
@@ -332,8 +349,9 @@
             "}"
         );
 
-        if (ret != 0)
+        if (ret != 0) {
             throw dukx_exception(m_ctx, -1);
+        }
 
         duk_get_global_string(m_ctx, "name");
         BOOST_REQUIRE_EQUAL("RangeError", duk_to_string(m_ctx, -1));
@@ -346,7 +364,7 @@
     }
 }
 
-BOOST_AUTO_TEST_CASE(InvalidConstructorRange3)
+BOOST_AUTO_TEST_CASE(constructor_range_3)
 {
     try {
         auto ret = duk_peval_string(m_ctx,
@@ -358,8 +376,9 @@
             "}"
         );
 
-        if (ret != 0)
+        if (ret != 0) {
             throw dukx_exception(m_ctx, -1);
+        }
 
         duk_get_global_string(m_ctx, "name");
         BOOST_REQUIRE_EQUAL("RangeError", duk_to_string(m_ctx, -1));
@@ -372,7 +391,7 @@
     }
 }
 
-BOOST_AUTO_TEST_CASE(InvalidConstructorRange4)
+BOOST_AUTO_TEST_CASE(constructor_object_range_red)
 {
     try {
         auto ret = duk_peval_string(m_ctx,
@@ -384,8 +403,9 @@
             "}"
         );
 
-        if (ret != 0)
+        if (ret != 0) {
             throw dukx_exception(m_ctx, -1);
+        }
 
         duk_get_global_string(m_ctx, "name");
         BOOST_REQUIRE_EQUAL("RangeError", duk_to_string(m_ctx, -1));
@@ -398,7 +418,7 @@
     }
 }
 
-BOOST_AUTO_TEST_CASE(InvalidConstructorRange5)
+BOOST_AUTO_TEST_CASE(constructor_object_range_alpha)
 {
     try {
         auto ret = duk_peval_string(m_ctx,
@@ -410,8 +430,9 @@
             "}"
         );
 
-        if (ret != 0)
+        if (ret != 0) {
             throw dukx_exception(m_ctx, -1);
+        }
 
         duk_get_global_string(m_ctx, "name");
         BOOST_REQUIRE_EQUAL("RangeError", duk_to_string(m_ctx, -1));
@@ -424,7 +445,7 @@
     }
 }
 
-BOOST_AUTO_TEST_CASE(InvalidConstructorStringUnknown)
+BOOST_AUTO_TEST_CASE(constructor_string)
 {
     try {
         auto ret = duk_peval_string(m_ctx,
@@ -436,8 +457,9 @@
             "}"
         );
 
-        if (ret != 0)
+        if (ret != 0) {
             throw dukx_exception(m_ctx, -1);
+        }
 
         duk_get_global_string(m_ctx, "name");
         BOOST_REQUIRE_EQUAL("Error", duk_to_string(m_ctx, -1));
@@ -450,7 +472,7 @@
     }
 }
 
-BOOST_AUTO_TEST_CASE(InvalidConstructorStringRgb)
+BOOST_AUTO_TEST_CASE(constructor_string_rgb)
 {
     try {
         auto ret = duk_peval_string(m_ctx,
@@ -462,8 +484,9 @@
             "}"
         );
 
-        if (ret != 0)
+        if (ret != 0) {
             throw dukx_exception(m_ctx, -1);
+        }
 
         duk_get_global_string(m_ctx, "name");
         BOOST_REQUIRE_EQUAL("Error", duk_to_string(m_ctx, -1));
@@ -476,6 +499,8 @@
     }
 }
 
+BOOST_AUTO_TEST_SUITE_END()
+
 /*
  * Require.
  * ------------------------------------------------------------------
@@ -484,7 +509,9 @@
  * can be ommitted but if it is present and incorrect, an exception is also raised.
  */
 
-BOOST_AUTO_TEST_CASE(requireSuccess)
+BOOST_AUTO_TEST_SUITE(require)
+
+BOOST_AUTO_TEST_CASE(success)
 {
     try {
         duk_push_c_function(m_ctx, [] (auto ctx) {
@@ -505,8 +532,9 @@
 
         auto ret = duk_peval_string(m_ctx, "draw('#ff0000');");
 
-        if (ret != 0)
+        if (ret != 0) {
             throw dukx_exception(m_ctx, -1);
+        }
 
         duk_get_global_string(m_ctx, "r");
         BOOST_REQUIRE_EQUAL(255U, duk_to_uint(m_ctx, -1));
@@ -525,7 +553,7 @@
     }
 }
 
-BOOST_AUTO_TEST_CASE(requireFail)
+BOOST_AUTO_TEST_CASE(fail)
 {
     try {
         duk_push_c_function(m_ctx, [] (auto ctx) {
@@ -544,8 +572,9 @@
             "}"
         );
 
-        if (ret != 0)
+        if (ret != 0) {
             throw dukx_exception(m_ctx, -1);
+        }
 
         duk_get_global_string(m_ctx, "name");
         BOOST_REQUIRE_EQUAL("Error", duk_to_string(m_ctx, -1));
@@ -558,7 +587,7 @@
     }
 }
 
-BOOST_AUTO_TEST_CASE(requireFailAlpha)
+BOOST_AUTO_TEST_CASE(fail_alpha)
 {
     try {
         duk_push_c_function(m_ctx, [] (auto ctx) {
@@ -577,8 +606,9 @@
             "}"
         );
 
-        if (ret != 0)
+        if (ret != 0) {
             throw dukx_exception(m_ctx, -1);
+        }
 
         duk_get_global_string(m_ctx, "name");
         BOOST_REQUIRE_EQUAL("RangeError", duk_to_string(m_ctx, -1));
@@ -591,6 +621,8 @@
     }
 }
 
+BOOST_AUTO_TEST_SUITE_END()
+
 /*
  * Get.
  * ------------------------------------------------------------------
@@ -598,7 +630,9 @@
  * TypeTraits<Color>::get readjust any invalid values.
  */
 
-BOOST_AUTO_TEST_CASE(getNormal)
+BOOST_AUTO_TEST_SUITE(get)
+
+BOOST_AUTO_TEST_CASE(normal)
 {
     try {
         duk_push_c_function(m_ctx, [] (auto ctx) {
@@ -619,8 +653,9 @@
 
         auto ret = duk_peval_string(m_ctx, "draw('#ff0000');");
 
-        if (ret != 0)
+        if (ret != 0) {
             throw dukx_exception(m_ctx, -1);
+        }
 
         duk_get_global_string(m_ctx, "r");
         BOOST_REQUIRE_EQUAL(255U, duk_to_uint(m_ctx, -1));
@@ -639,7 +674,7 @@
     }
 }
 
-BOOST_AUTO_TEST_CASE(getAdjustRgb)
+BOOST_AUTO_TEST_CASE(adjust_rgb)
 {
     try {
         duk_push_c_function(m_ctx, [] (auto ctx) {
@@ -660,8 +695,9 @@
 
         auto ret = duk_peval_string(m_ctx, "draw('#ghijkl');");
 
-        if (ret != 0)
+        if (ret != 0) {
             throw dukx_exception(m_ctx, -1);
+        }
 
         duk_get_global_string(m_ctx, "r");
         BOOST_REQUIRE_EQUAL(0U, duk_to_uint(m_ctx, -1));
@@ -680,7 +716,7 @@
     }
 }
 
-BOOST_AUTO_TEST_CASE(getAdjustAll)
+BOOST_AUTO_TEST_CASE(adjust_all)
 {
     try {
         duk_push_c_function(m_ctx, [] (auto ctx) {
@@ -701,8 +737,9 @@
 
         auto ret = duk_peval_string(m_ctx, "draw({ red: -1, green: 256, blue: 100, alpha: 800 });");
 
-        if (ret != 0)
+        if (ret != 0) {
             throw dukx_exception(m_ctx, -1);
+        }
 
         duk_get_global_string(m_ctx, "r");
         BOOST_REQUIRE_EQUAL(0U, duk_to_uint(m_ctx, -1));
@@ -721,7 +758,7 @@
     }
 }
 
-BOOST_AUTO_TEST_CASE(getSomethingElse)
+BOOST_AUTO_TEST_CASE(something_else)
 {
     try {
         duk_push_c_function(m_ctx, [] (auto ctx) {
@@ -742,8 +779,9 @@
 
         auto ret = duk_peval_string(m_ctx, "draw(null);");
 
-        if (ret != 0)
+        if (ret != 0) {
             throw dukx_exception(m_ctx, -1);
+        }
 
         duk_get_global_string(m_ctx, "r");
         BOOST_REQUIRE_EQUAL(0U, duk_to_uint(m_ctx, -1));
@@ -763,3 +801,5 @@
 }
 
 BOOST_AUTO_TEST_SUITE_END()
+
+BOOST_AUTO_TEST_SUITE_END()
--- a/tests/libclient/js-line/main.cpp	Thu Dec 15 13:46:46 2016 +0100
+++ b/tests/libclient/js-line/main.cpp	Fri Dec 16 13:07:44 2016 +0100
@@ -37,11 +37,13 @@
 BOOST_FIXTURE_TEST_SUITE(test_line_suite, test_line)
 
 /*
- * Valid constructors
+ * Valid constructors.
  * ------------------------------------------------------------------
  */
 
-BOOST_AUTO_TEST_CASE(ConstructorNoArgs)
+BOOST_AUTO_TEST_SUITE(constructors)
+
+BOOST_AUTO_TEST_CASE(constructor_default)
 {
     try {
         auto ret = duk_peval_string(m_ctx,
@@ -73,7 +75,7 @@
     }
 }
 
-BOOST_AUTO_TEST_CASE(Constructor4Args)
+BOOST_AUTO_TEST_CASE(constructor_4_args)
 {
     try {
         auto ret = duk_peval_string(m_ctx,
@@ -105,7 +107,7 @@
     }
 }
 
-BOOST_AUTO_TEST_CASE(ConstructorObject)
+BOOST_AUTO_TEST_CASE(constructor_object)
 {
     try {
         auto ret = duk_peval_string(m_ctx,
@@ -137,7 +139,7 @@
     }
 }
 
-BOOST_AUTO_TEST_CASE(ConstructorNew)
+BOOST_AUTO_TEST_CASE(constructor_new)
 {
     try {
         auto ret = duk_peval_string(m_ctx,
@@ -169,12 +171,16 @@
     }
 }
 
+BOOST_AUTO_TEST_SUITE_END()
+
 /*
- * Invalid constructors
+ * Invalid constructors.
  * ------------------------------------------------------------------
  */
 
-BOOST_AUTO_TEST_CASE(InvalidConstructorArg1)
+BOOST_AUTO_TEST_SUITE(invalid_constructors)
+
+BOOST_AUTO_TEST_CASE(arg_1)
 {
     try {
         auto ret = duk_peval_string(m_ctx,
@@ -201,12 +207,16 @@
     }
 }
 
+BOOST_AUTO_TEST_SUITE_END()
+
 /*
  * Require.
  * ------------------------------------------------------------------
  */
 
-BOOST_AUTO_TEST_CASE(requireSuccess)
+BOOST_AUTO_TEST_SUITE(require)
+
+BOOST_AUTO_TEST_CASE(success)
 {
     try {
         duk_push_c_function(m_ctx, [] (auto ctx) {
@@ -248,7 +258,7 @@
     }
 }
 
-BOOST_AUTO_TEST_CASE(requireFail)
+BOOST_AUTO_TEST_CASE(fail)
 {
     try {
         duk_push_c_function(m_ctx, [] (auto ctx) {
@@ -282,12 +292,16 @@
     }
 }
 
+BOOST_AUTO_TEST_SUITE_END()
+
 /*
  * Get.
  * ------------------------------------------------------------------
  */
 
-BOOST_AUTO_TEST_CASE(getAdjustAll)
+BOOST_AUTO_TEST_SUITE(get)
+
+BOOST_AUTO_TEST_CASE(adjust_all)
 {
     try {
         duk_push_c_function(m_ctx, [] (auto ctx) {
@@ -330,3 +344,5 @@
 }
 
 BOOST_AUTO_TEST_SUITE_END()
+
+BOOST_AUTO_TEST_SUITE_END()
--- a/tests/libclient/js-point/main.cpp	Thu Dec 15 13:46:46 2016 +0100
+++ b/tests/libclient/js-point/main.cpp	Fri Dec 16 13:07:44 2016 +0100
@@ -37,11 +37,13 @@
 BOOST_FIXTURE_TEST_SUITE(test_point_suite, test_point)
 
 /*
- * Valid constructors
+ * Valid constructors.
  * ------------------------------------------------------------------
  */
 
-BOOST_AUTO_TEST_CASE(ConstructorNoArgs)
+BOOST_AUTO_TEST_SUITE(constructors)
+
+BOOST_AUTO_TEST_CASE(constructor_default)
 {
     try {
         auto ret = duk_peval_string(m_ctx,
@@ -65,7 +67,7 @@
     }
 }
 
-BOOST_AUTO_TEST_CASE(Constructor2Args)
+BOOST_AUTO_TEST_CASE(constructor_2_args)
 {
     try {
         auto ret = duk_peval_string(m_ctx,
@@ -89,7 +91,7 @@
     }
 }
 
-BOOST_AUTO_TEST_CASE(ConstructorObject)
+BOOST_AUTO_TEST_CASE(constructor_object)
 {
     try {
         auto ret = duk_peval_string(m_ctx,
@@ -113,7 +115,7 @@
     }
 }
 
-BOOST_AUTO_TEST_CASE(ConstructorNew)
+BOOST_AUTO_TEST_CASE(constructor_new)
 {
     try {
         auto ret = duk_peval_string(m_ctx,
@@ -137,12 +139,16 @@
     }
 }
 
+BOOST_AUTO_TEST_SUITE_END()
+
 /*
- * Invalid constructors
+ * Invalid constructors.
  * ------------------------------------------------------------------
  */
 
-BOOST_AUTO_TEST_CASE(InvalidConstructorArg1)
+BOOST_AUTO_TEST_SUITE(invalid_constructors)
+
+BOOST_AUTO_TEST_CASE(constructor_arg_1)
 {
     try {
         auto ret = duk_peval_string(m_ctx,
@@ -169,12 +175,16 @@
     }
 }
 
+BOOST_AUTO_TEST_SUITE_END()
+
 /*
  * Require.
  * ------------------------------------------------------------------
  */
 
-BOOST_AUTO_TEST_CASE(requireSuccess)
+BOOST_AUTO_TEST_SUITE(require)
+
+BOOST_AUTO_TEST_CASE(success)
 {
     try {
         duk_push_c_function(m_ctx, [] (auto ctx) {
@@ -206,7 +216,7 @@
     }
 }
 
-BOOST_AUTO_TEST_CASE(requireFail)
+BOOST_AUTO_TEST_CASE(fail)
 {
     try {
         duk_push_c_function(m_ctx, [] (auto ctx) {
@@ -240,12 +250,16 @@
     }
 }
 
+BOOST_AUTO_TEST_SUITE_END()
+
 /*
  * Get.
  * ------------------------------------------------------------------
  */
 
-BOOST_AUTO_TEST_CASE(getAdjustAll)
+BOOST_AUTO_TEST_SUITE(get)
+
+BOOST_AUTO_TEST_CASE(adjust_all)
 {
     try {
         duk_push_c_function(m_ctx, [] (auto ctx) {
@@ -278,3 +292,5 @@
 }
 
 BOOST_AUTO_TEST_SUITE_END()
+
+BOOST_AUTO_TEST_SUITE_END()
--- a/tests/libclient/js-rectangle/main.cpp	Thu Dec 15 13:46:46 2016 +0100
+++ b/tests/libclient/js-rectangle/main.cpp	Fri Dec 16 13:07:44 2016 +0100
@@ -37,11 +37,13 @@
 BOOST_FIXTURE_TEST_SUITE(test_rectangle_suite, test_rectangle)
 
 /*
- * Valid constructors
+ * Valid constructors.
  * ------------------------------------------------------------------
  */
 
-BOOST_AUTO_TEST_CASE(ConstructorNoArgs)
+BOOST_AUTO_TEST_SUITE(constructors)
+
+BOOST_AUTO_TEST_CASE(constructor_default)
 {
     try {
         auto ret = duk_peval_string(m_ctx,
@@ -73,7 +75,7 @@
     }
 }
 
-BOOST_AUTO_TEST_CASE(Constructor4Args)
+BOOST_AUTO_TEST_CASE(constructor_4_args)
 {
     try {
         auto ret = duk_peval_string(m_ctx,
@@ -105,7 +107,7 @@
     }
 }
 
-BOOST_AUTO_TEST_CASE(ConstructorObject)
+BOOST_AUTO_TEST_CASE(constructor_object)
 {
     try {
         auto ret = duk_peval_string(m_ctx,
@@ -137,7 +139,7 @@
     }
 }
 
-BOOST_AUTO_TEST_CASE(ConstructorNew)
+BOOST_AUTO_TEST_CASE(constructor_new)
 {
     try {
         auto ret = duk_peval_string(m_ctx,
@@ -169,12 +171,16 @@
     }
 }
 
+BOOST_AUTO_TEST_SUITE_END()
+
 /*
- * Invalid constructors
+ * Invalid constructors.
  * ------------------------------------------------------------------
  */
 
-BOOST_AUTO_TEST_CASE(InvalidConstructorArg1)
+BOOST_AUTO_TEST_SUITE(invalid_constructors)
+
+BOOST_AUTO_TEST_CASE(constructor_arg_1)
 {
     try {
         auto ret = duk_peval_string(m_ctx,
@@ -201,7 +207,7 @@
     }
 }
 
-BOOST_AUTO_TEST_CASE(InvalidConstructorRange1)
+BOOST_AUTO_TEST_CASE(constructor_range_1)
 {
     try {
         auto ret = duk_peval_string(m_ctx,
@@ -228,12 +234,16 @@
     }
 }
 
+BOOST_AUTO_TEST_SUITE_END()
+
 /*
  * Require.
  * ------------------------------------------------------------------
  */
 
-BOOST_AUTO_TEST_CASE(requireSuccess)
+BOOST_AUTO_TEST_SUITE(require)
+
+BOOST_AUTO_TEST_CASE(success)
 {
     try {
         duk_push_c_function(m_ctx, [] (auto ctx) {
@@ -275,7 +285,7 @@
     }
 }
 
-BOOST_AUTO_TEST_CASE(requireFail)
+BOOST_AUTO_TEST_CASE(fail)
 {
     try {
         duk_push_c_function(m_ctx, [] (auto ctx) {
@@ -309,12 +319,16 @@
     }
 }
 
+BOOST_AUTO_TEST_SUITE_END()
+
 /*
  * Get.
  * ------------------------------------------------------------------
  */
 
-BOOST_AUTO_TEST_CASE(getAdjustAll)
+BOOST_AUTO_TEST_SUITE(get)
+
+BOOST_AUTO_TEST_CASE(adjust_all)
 {
     try {
         duk_push_c_function(m_ctx, [] (auto ctx) {
@@ -356,3 +370,5 @@
 }
 
 BOOST_AUTO_TEST_SUITE_END()
+
+BOOST_AUTO_TEST_SUITE_END()
--- a/tests/libclient/js-size/main.cpp	Thu Dec 15 13:46:46 2016 +0100
+++ b/tests/libclient/js-size/main.cpp	Fri Dec 16 13:07:44 2016 +0100
@@ -39,11 +39,13 @@
 BOOST_FIXTURE_TEST_SUITE(test_size_suite, test_size)
 
 /*
- * Valid constructors
+ * Valid constructors.
  * ------------------------------------------------------------------
  */
 
-BOOST_AUTO_TEST_CASE(ConstructorNoArgs)
+BOOST_AUTO_TEST_SUITE(constructors)
+
+BOOST_AUTO_TEST_CASE(constructor_default)
 {
     try {
         auto ret = duk_peval_string(m_ctx,
@@ -67,7 +69,7 @@
     }
 }
 
-BOOST_AUTO_TEST_CASE(Constructor2Args)
+BOOST_AUTO_TEST_CASE(constructor_2_args)
 {
     try {
         auto ret = duk_peval_string(m_ctx,
@@ -91,7 +93,7 @@
     }
 }
 
-BOOST_AUTO_TEST_CASE(ConstructorObject)
+BOOST_AUTO_TEST_CASE(constructor_object)
 {
     try {
         auto ret = duk_peval_string(m_ctx,
@@ -115,7 +117,7 @@
     }
 }
 
-BOOST_AUTO_TEST_CASE(ConstructorNew)
+BOOST_AUTO_TEST_CASE(constructor_new)
 {
     try {
         auto ret = duk_peval_string(m_ctx,
@@ -139,12 +141,16 @@
     }
 }
 
+BOOST_AUTO_TEST_SUITE_END()
+
 /*
- * Invalid constructors
+ * Invalid constructors.
  * ------------------------------------------------------------------
  */
 
-BOOST_AUTO_TEST_CASE(InvalidConstructorArg1)
+BOOST_AUTO_TEST_SUITE(invalid_constructors)
+
+BOOST_AUTO_TEST_CASE(constructor_arg_1)
 {
     try {
         auto ret = duk_peval_string(m_ctx,
@@ -171,7 +177,7 @@
     }
 }
 
-BOOST_AUTO_TEST_CASE(InvalidConstructorRange1)
+BOOST_AUTO_TEST_CASE(constructor_range_1)
 {
     try {
         auto ret = duk_peval_string(m_ctx,
@@ -198,7 +204,7 @@
     }
 }
 
-BOOST_AUTO_TEST_CASE(InvalidConstructorRange2)
+BOOST_AUTO_TEST_CASE(constructor_range_2)
 {
     try {
         auto ret = duk_peval_string(m_ctx,
@@ -225,7 +231,7 @@
     }
 }
 
-BOOST_AUTO_TEST_CASE(InvalidConstructorRange3)
+BOOST_AUTO_TEST_CASE(constructor_range_3)
 {
     try {
         auto ret = duk_peval_string(m_ctx,
@@ -252,7 +258,7 @@
     }
 }
 
-BOOST_AUTO_TEST_CASE(InvalidConstructorRange4)
+BOOST_AUTO_TEST_CASE(constructor_range_4)
 {
     try {
         auto ret = duk_peval_string(m_ctx,
@@ -279,12 +285,16 @@
     }
 }
 
+BOOST_AUTO_TEST_SUITE_END()
+
 /*
  * Require.
  * ------------------------------------------------------------------
  */
 
-BOOST_AUTO_TEST_CASE(requireSuccess)
+BOOST_AUTO_TEST_SUITE(require)
+
+BOOST_AUTO_TEST_CASE(success)
 {
     try {
         duk_push_c_function(m_ctx, [] (auto ctx) {
@@ -316,7 +326,7 @@
     }
 }
 
-BOOST_AUTO_TEST_CASE(requireFail)
+BOOST_AUTO_TEST_CASE(fail)
 {
     try {
         duk_push_c_function(m_ctx, [] (auto ctx) {
@@ -350,12 +360,16 @@
     }
 }
 
+BOOST_AUTO_TEST_SUITE_END()
+
 /*
  * Get.
  * ------------------------------------------------------------------
  */
 
-BOOST_AUTO_TEST_CASE(getAdjustAll)
+BOOST_AUTO_TEST_SUITE(get)
+
+BOOST_AUTO_TEST_CASE(adjust_all)
 {
     try {
         duk_push_c_function(m_ctx, [] (auto ctx) {
@@ -388,3 +402,5 @@
 }
 
 BOOST_AUTO_TEST_SUITE_END()
+
+BOOST_AUTO_TEST_SUITE_END()
--- a/tests/libclient/line/main.cpp	Thu Dec 15 13:46:46 2016 +0100
+++ b/tests/libclient/line/main.cpp	Fri Dec 16 13:07:44 2016 +0100
@@ -55,14 +55,14 @@
     BOOST_REQUIRE_EQUAL(40, line.y2());
 }
 
-BOOST_AUTO_TEST_CASE(operatorEq)
+BOOST_AUTO_TEST_CASE(operator_eq)
 {
     mlk::line line1, line2;
 
     BOOST_REQUIRE_EQUAL(line1, line2);
 }
 
-BOOST_AUTO_TEST_CASE(operatorEq1)
+BOOST_AUTO_TEST_CASE(operator_eq1)
 {
     mlk::line line1(10, 20, 30, 40);
     mlk::line line2(10, 20, 30, 40);
@@ -70,7 +70,7 @@
     BOOST_REQUIRE_EQUAL(line1, line2);
 }
 
-BOOST_AUTO_TEST_CASE(operatorNeq)
+BOOST_AUTO_TEST_CASE(operator_neq)
 {
     BOOST_REQUIRE_NE(mlk::line(10), mlk::line(20));
     BOOST_REQUIRE_NE(mlk::line(10, 10), mlk::line(10, 20));
--- a/tests/libclient/point/main.cpp	Thu Dec 15 13:46:46 2016 +0100
+++ b/tests/libclient/point/main.cpp	Fri Dec 16 13:07:44 2016 +0100
@@ -30,7 +30,7 @@
     return out;
 }
 
-}
+} // !mlk
 
 BOOST_AUTO_TEST_CASE(none)
 {
@@ -48,14 +48,14 @@
     BOOST_REQUIRE_EQUAL(20, point.y());
 }
 
-BOOST_AUTO_TEST_CASE(operatorEq)
+BOOST_AUTO_TEST_CASE(operator_eq)
 {
     mlk::point point1, point2;
 
     BOOST_REQUIRE_EQUAL(point1, point2);
 }
 
-BOOST_AUTO_TEST_CASE(operatorEq1)
+BOOST_AUTO_TEST_CASE(operator_eq1)
 {
     mlk::point point1(10, 20);
     mlk::point point2(10, 20);
@@ -63,7 +63,7 @@
     BOOST_REQUIRE_EQUAL(point1, point2);
 }
 
-BOOST_AUTO_TEST_CASE(operatorNeq)
+BOOST_AUTO_TEST_CASE(operator_neq)
 {
     BOOST_REQUIRE_NE(mlk::point(10), mlk::point(20));
     BOOST_REQUIRE_NE(mlk::point(10, 10), mlk::point(10, 20));
--- a/tests/libclient/rectangle/main.cpp	Thu Dec 15 13:46:46 2016 +0100
+++ b/tests/libclient/rectangle/main.cpp	Fri Dec 16 13:07:44 2016 +0100
@@ -33,7 +33,7 @@
     return out;
 }
 
-}
+} // !mlk
 
 BOOST_AUTO_TEST_CASE(none)
 {
@@ -63,14 +63,14 @@
     BOOST_REQUIRE_EQUAL(40U, rectangle.height());
 }
 
-BOOST_AUTO_TEST_CASE(operatorEq)
+BOOST_AUTO_TEST_CASE(operator_eq)
 {
     mlk::rectangle rectangle1, rectangle2;
 
     BOOST_REQUIRE_EQUAL(rectangle1, rectangle2);
 }
 
-BOOST_AUTO_TEST_CASE(operatorEq1)
+BOOST_AUTO_TEST_CASE(operator_eq1)
 {
     mlk::rectangle rectangle1(10, 20, 30, 40);
     mlk::rectangle rectangle2(10, 20, 30, 40);
@@ -78,7 +78,7 @@
     BOOST_REQUIRE_EQUAL(rectangle1, rectangle2);
 }
 
-BOOST_AUTO_TEST_CASE(operatorNeq)
+BOOST_AUTO_TEST_CASE(operator_neq)
 {
     BOOST_REQUIRE_NE(mlk::rectangle(10), mlk::rectangle(20));
     BOOST_REQUIRE_NE(mlk::rectangle(10, 10), mlk::rectangle(10, 20));
--- a/tests/libclient/size/main.cpp	Thu Dec 15 13:46:46 2016 +0100
+++ b/tests/libclient/size/main.cpp	Fri Dec 16 13:07:44 2016 +0100
@@ -30,7 +30,7 @@
     return out;
 }
 
-}
+} // !mlk
 
 BOOST_AUTO_TEST_CASE(none)
 {
@@ -55,14 +55,14 @@
     BOOST_REQUIRE_EQUAL(20U, size.height());
 }
 
-BOOST_AUTO_TEST_CASE(operatorEq)
+BOOST_AUTO_TEST_CASE(operator_eq)
 {
     mlk::size size1, size2;
 
     BOOST_REQUIRE_EQUAL(size1, size2);
 }
 
-BOOST_AUTO_TEST_CASE(operatorEq1)
+BOOST_AUTO_TEST_CASE(operator_eq_1)
 {
     mlk::size size1(10, 20);
     mlk::size size2(10, 20);
@@ -70,7 +70,7 @@
     BOOST_REQUIRE_EQUAL(size1, size2);
 }
 
-BOOST_AUTO_TEST_CASE(operatorNeq)
+BOOST_AUTO_TEST_CASE(operator_neq)
 {
     BOOST_REQUIRE_NE(mlk::size(10), mlk::size(20));
     BOOST_REQUIRE_NE(mlk::size(10, 10), mlk::size(10, 20));
--- a/tests/libclient/sprite/main.cpp	Thu Dec 15 13:46:46 2016 +0100
+++ b/tests/libclient/sprite/main.cpp	Fri Dec 16 13:07:44 2016 +0100
@@ -52,11 +52,13 @@
 BOOST_FIXTURE_TEST_SUITE(test_sprite_suite, test_sprite)
 
 /*
- * Missing properties
+ * Missing properties.
  * ------------------------------------------------------------------
  */
 
-BOOST_AUTO_TEST_CASE(missingPropertyImage)
+BOOST_AUTO_TEST_SUITE(missing_properties)
+
+BOOST_AUTO_TEST_CASE(image)
 {
     BOOST_REQUIRE_THROW(
         m_loader.load_sprite("sprites/no-property-image.json"),
@@ -64,7 +66,7 @@
     );
 }
 
-BOOST_AUTO_TEST_CASE(missingPropertyCell)
+BOOST_AUTO_TEST_CASE(cell)
 {
     BOOST_REQUIRE_THROW(
         m_loader.load_sprite("sprites/no-property-cell.json"),
@@ -72,12 +74,16 @@
     );
 }
 
+BOOST_AUTO_TEST_SUITE_END()
+
 /*
- * Invalid properties
+ * Invalid properties.
  * ------------------------------------------------------------------
  */
 
-BOOST_AUTO_TEST_CASE(imageNotString)
+BOOST_AUTO_TEST_SUITE(invalid_properties)
+
+BOOST_AUTO_TEST_CASE(image_not_string)
 {
     BOOST_REQUIRE_THROW(
         m_loader.load_sprite("sprites/property-image-not-string.json"),
@@ -85,7 +91,7 @@
     );
 }
 
-BOOST_AUTO_TEST_CASE(cellNotArray)
+BOOST_AUTO_TEST_CASE(cell_not_array)
 {
     BOOST_REQUIRE_THROW(
         m_loader.load_sprite("sprites/property-cell-not-array.json"),
@@ -93,7 +99,7 @@
     );
 }
 
-BOOST_AUTO_TEST_CASE(cellNotArray2)
+BOOST_AUTO_TEST_CASE(cell_not_array2)
 {
     BOOST_REQUIRE_THROW(
         m_loader.load_sprite("sprites/property-cell-not-array2.json"),
@@ -101,12 +107,16 @@
     );
 }
 
+BOOST_AUTO_TEST_SUITE_END()
+
 /*
- * Other errors
+ * Other errors.
  * ------------------------------------------------------------------
  */
 
-BOOST_AUTO_TEST_CASE(imageNotFound)
+BOOST_AUTO_TEST_SUITE(miscellaneous_errors)
+
+BOOST_AUTO_TEST_CASE(image_not_found)
 {
     BOOST_REQUIRE_THROW(
         m_loader.load_sprite("sprites/image-not-found.json"),
@@ -114,7 +124,7 @@
     );
 }
 
-BOOST_AUTO_TEST_CASE(notObject)
+BOOST_AUTO_TEST_CASE(not_object)
 {
     BOOST_REQUIRE_THROW(
         m_loader.load_sprite("sprites/not-object.json"),
@@ -122,11 +132,15 @@
     );
 }
 
+BOOST_AUTO_TEST_SUITE_END()
+
 /*
- * Valid sprites
+ * Valid sprites.
  * ------------------------------------------------------------------
  */
 
+BOOST_AUTO_TEST_SUITE(valid)
+
 BOOST_AUTO_TEST_CASE(standard)
 {
     try {
@@ -173,3 +187,5 @@
 }
 
 BOOST_AUTO_TEST_SUITE_END()
+
+BOOST_AUTO_TEST_SUITE_END()