mirror of
https://github.com/encounter/SDL.git
synced 2025-06-04 21:54:27 +00:00
Test: Removed static from local variables (Math).
Static would break compilation on OS/2.
This commit is contained in:
parent
6208ed8604
commit
c23216bf46
@ -15,7 +15,7 @@
|
|||||||
* \brief Checks edge cases (0 and infinity) for themselves.
|
* \brief Checks edge cases (0 and infinity) for themselves.
|
||||||
*/
|
*/
|
||||||
static int floor_edgeCases(void* args) {
|
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++) {
|
for (size_t i = 0; i < SDL_arraysize(edge_cases); i++) {
|
||||||
const double result = SDL_floor(edge_cases[i]);
|
const double result = SDL_floor(edge_cases[i]);
|
||||||
SDLTest_AssertCheck(result == edge_cases[i],
|
SDLTest_AssertCheck(result == edge_cases[i],
|
||||||
@ -37,7 +37,7 @@ static int floor_nanCase(void* args) {
|
|||||||
* \brief Checks round values (x.0) for themselves
|
* \brief Checks round values (x.0) for themselves
|
||||||
*/
|
*/
|
||||||
static int floor_roundNumbersCases(void* args) {
|
static int floor_roundNumbersCases(void* args) {
|
||||||
static const double round_cases[] = {1.0, -1.0, 15.0, -15.0,
|
const double round_cases[] = {1.0, -1.0, 15.0, -15.0,
|
||||||
125.0, -125.0, 1024.0, -1024.0};
|
125.0, -125.0, 1024.0, -1024.0};
|
||||||
for (size_t i = 0; i < SDL_arraysize(round_cases); i++) {
|
for (size_t i = 0; i < SDL_arraysize(round_cases); i++) {
|
||||||
const double result = SDL_floor(round_cases[i]);
|
const double result = SDL_floor(round_cases[i]);
|
||||||
@ -52,7 +52,7 @@ static int floor_roundNumbersCases(void* args) {
|
|||||||
* \brief Checks a set of fractions
|
* \brief Checks a set of fractions
|
||||||
*/
|
*/
|
||||||
static int floor_fractionCases(void* args) {
|
static int floor_fractionCases(void* args) {
|
||||||
static const struct {
|
const struct {
|
||||||
double input, expected;
|
double input, expected;
|
||||||
} frac_cases[] = {{1.0 / 2.0, 0.0}, {-1.0 / 2.0, -1.0},
|
} 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},
|
{4.0 / 3.0, 1.0}, {-4.0 / 3.0, -2.0},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user