Commit c23216bf4602ee2e07ba28c204f511f1b7d62e31

Pierre Wendling 2022-05-04T13:20:09

Test: Removed static from local variables (Math). Static would break compilation on OS/2.

diff --git a/test/testautomation_math.c b/test/testautomation_math.c
index 61c3b0e..54f2fec 100644
--- a/test/testautomation_math.c
+++ b/test/testautomation_math.c
@@ -15,7 +15,7 @@
  * \brief Checks edge cases (0 and infinity) for themselves.
  */
 static int floor_edgeCases(void* args) {
-  static const double edge_cases[] = {INFINITY, -INFINITY, 0.0, -0.0};
+  const double edge_cases[] = {INFINITY, -INFINITY, 0.0, -0.0};
   for (size_t i = 0; i < SDL_arraysize(edge_cases); i++) {
     const double result = SDL_floor(edge_cases[i]);
     SDLTest_AssertCheck(result == edge_cases[i],
@@ -37,8 +37,8 @@ static int floor_nanCase(void* args) {
  * \brief Checks round values (x.0) for themselves
  */
 static int floor_roundNumbersCases(void* args) {
-  static const double round_cases[] = {1.0,   -1.0,   15.0,   -15.0,
-                                       125.0, -125.0, 1024.0, -1024.0};
+  const double round_cases[] = {1.0,   -1.0,   15.0,   -15.0,
+                                125.0, -125.0, 1024.0, -1024.0};
   for (size_t i = 0; i < SDL_arraysize(round_cases); i++) {
     const double result = SDL_floor(round_cases[i]);
     SDLTest_AssertCheck(result == round_cases[i],
@@ -52,7 +52,7 @@ static int floor_roundNumbersCases(void* args) {
  * \brief Checks a set of fractions
  */
 static int floor_fractionCases(void* args) {
-  static const struct {
+  const struct {
     double input, expected;
   } frac_cases[] = {{1.0 / 2.0, 0.0},        {-1.0 / 2.0, -1.0},
                     {4.0 / 3.0, 1.0},        {-4.0 / 3.0, -2.0},