Browse Source

Remove disabled self test main functions

Anonymous Maarten 2 years ago
parent
commit
4af93990a9
2 changed files with 0 additions and 101 deletions
  1. 0 31
      src/cpuinfo/SDL_cpuinfo.c
  2. 0 70
      src/stdlib/SDL_getenv.c

+ 0 - 31
src/cpuinfo/SDL_cpuinfo.c

@@ -1093,34 +1093,3 @@ SDL_SIMDGetAlignment(void)
     SDL_assert(SDL_SIMDAlignment != 0);
     return SDL_SIMDAlignment;
 }
-
-#ifdef TEST_MAIN
-
-#include <stdio.h>
-
-int main()
-{
-    printf("CPU count: %d\n", SDL_GetCPUCount());
-    printf("CPU type: %s\n", SDL_GetCPUType());
-    printf("CPU name: %s\n", SDL_GetCPUName());
-    printf("CacheLine size: %d\n", SDL_GetCPUCacheLineSize());
-    printf("RDTSC: %d\n", SDL_HasRDTSC());
-    printf("Altivec: %d\n", SDL_HasAltiVec());
-    printf("MMX: %d\n", SDL_HasMMX());
-    printf("SSE: %d\n", SDL_HasSSE());
-    printf("SSE2: %d\n", SDL_HasSSE2());
-    printf("SSE3: %d\n", SDL_HasSSE3());
-    printf("SSE4.1: %d\n", SDL_HasSSE41());
-    printf("SSE4.2: %d\n", SDL_HasSSE42());
-    printf("AVX: %d\n", SDL_HasAVX());
-    printf("AVX2: %d\n", SDL_HasAVX2());
-    printf("AVX-512F: %d\n", SDL_HasAVX512F());
-    printf("ARM SIMD: %d\n", SDL_HasARMSIMD());
-    printf("NEON: %d\n", SDL_HasNEON());
-    printf("LSX: %d\n", SDL_HasLSX());
-    printf("LASX: %d\n", SDL_HasLASX());
-    printf("RAM: %d MB\n", SDL_GetSystemRAM());
-    return 0;
-}
-
-#endif /* TEST_MAIN */

+ 0 - 70
src/stdlib/SDL_getenv.c

@@ -228,73 +228,3 @@ SDL_getenv(const char *name)
     return value;
 }
 #endif
-
-#ifdef TEST_MAIN
-#include <stdio.h>
-
-int main(int argc, char *argv[])
-{
-    char *value;
-
-    printf("Checking for non-existent variable... ");
-    fflush(stdout);
-    if (!SDL_getenv("EXISTS")) {
-        printf("okay\n");
-    } else {
-        printf("failed\n");
-    }
-    printf("Setting FIRST=VALUE1 in the environment... ");
-    fflush(stdout);
-    if (SDL_setenv("FIRST", "VALUE1", 0) == 0) {
-        printf("okay\n");
-    } else {
-        printf("failed\n");
-    }
-    printf("Getting FIRST from the environment... ");
-    fflush(stdout);
-    value = SDL_getenv("FIRST");
-    if (value && (SDL_strcmp(value, "VALUE1") == 0)) {
-        printf("okay\n");
-    } else {
-        printf("failed\n");
-    }
-    printf("Setting SECOND=VALUE2 in the environment... ");
-    fflush(stdout);
-    if (SDL_setenv("SECOND", "VALUE2", 0) == 0) {
-        printf("okay\n");
-    } else {
-        printf("failed\n");
-    }
-    printf("Getting SECOND from the environment... ");
-    fflush(stdout);
-    value = SDL_getenv("SECOND");
-    if (value && (SDL_strcmp(value, "VALUE2") == 0)) {
-        printf("okay\n");
-    } else {
-        printf("failed\n");
-    }
-    printf("Setting FIRST=NOVALUE in the environment... ");
-    fflush(stdout);
-    if (SDL_setenv("FIRST", "NOVALUE", 1) == 0) {
-        printf("okay\n");
-    } else {
-        printf("failed\n");
-    }
-    printf("Getting FIRST from the environment... ");
-    fflush(stdout);
-    value = SDL_getenv("FIRST");
-    if (value && (SDL_strcmp(value, "NOVALUE") == 0)) {
-        printf("okay\n");
-    } else {
-        printf("failed\n");
-    }
-    printf("Checking for non-existent variable... ");
-    fflush(stdout);
-    if (!SDL_getenv("EXISTS")) {
-        printf("okay\n");
-    } else {
-        printf("failed\n");
-    }
-    return 0;
-}
-#endif /* TEST_MAIN */