Skip to content

Commit

Permalink
Use __EMSCRIPTEN__ instead of EMSCRIPTEN in tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Gohman committed Feb 25, 2014
1 parent c600155 commit 3317f2c
Show file tree
Hide file tree
Showing 87 changed files with 179 additions and 179 deletions.
2 changes: 1 addition & 1 deletion tests/799.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <sys/socket.h>
#include <netinet/in.h>

#ifdef EMSCRIPTEN
#ifdef __EMSCRIPTEN__
#include <arpa/inet.h>
#endif

Expand Down
2 changes: 1 addition & 1 deletion tests/aniso.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ int main(int argc, char *argv[])
*/
SDL_GL_SwapBuffers();

#if !EMSCRIPTEN
#ifndef __EMSCRIPTEN__
// Wait for 3 seconds to give us a chance to see the image
SDL_Delay(2000);
#endif
Expand Down
8 changes: 4 additions & 4 deletions tests/box2d/Benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ typedef struct {
#include <time.h>
#include <math.h>

#if EMSCRIPTEN
#ifdef __EMSCRIPTEN__
#include <emscripten.h>
#endif

Expand Down Expand Up @@ -131,7 +131,7 @@ int main(int argc, char **argv) {
world->Step(1.0f/60.0f, 3, 3);
}

#if EMSCRIPTEN
#ifdef __EMSCRIPTEN__
responsive_main_loop = argc > 2 ? argv[2][0] - '0' : 0;
if (responsive_main_loop) {
printf("responsive main loop\n");
Expand All @@ -141,7 +141,7 @@ int main(int argc, char **argv) {
do {
iter();
} while (frameCounter <= FRAMES);
#if EMSCRIPTEN
#ifdef __EMSCRIPTEN__
}
#endif

Expand Down Expand Up @@ -173,7 +173,7 @@ void iter() {

printf("frame averages: %.3f +- %.3f, range: %.3f to %.3f \n", result.mean, result.stddev, float(minn)/CLOCKS_PER_SEC * 1000, float(maxx)/CLOCKS_PER_SEC * 1000);

#if EMSCRIPTEN
#ifdef __EMSCRIPTEN__
emscripten_run_script("if (Module.reportCompletion) Module.reportCompletion()");
if (responsive_main_loop) emscripten_cancel_main_loop();
#endif
Expand Down
4 changes: 2 additions & 2 deletions tests/cube_explosion.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/

#if !EMSCRIPTEN
#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif

Expand Down Expand Up @@ -216,7 +216,7 @@ int main(int argc, char *argv[])
glDeleteTextures(1, &texture);
assert(!glIsTexture(texture)); // but not anymore

#if !EMSCRIPTEN
#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif

Expand Down
4 changes: 2 additions & 2 deletions tests/cubegeom.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/

#if !EMSCRIPTEN
#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif

Expand Down Expand Up @@ -316,7 +316,7 @@ int main(int argc, char *argv[])

SDL_GL_SwapBuffers();

#if !EMSCRIPTEN
#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif

Expand Down
6 changes: 3 additions & 3 deletions tests/cubegeom_color.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/

#if !EMSCRIPTEN
#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif

Expand All @@ -38,7 +38,7 @@ void verify() {
for (int x = 0; x < width*height*4; x++) {
if (x % 4 != 3) sum += x * data[x];
}
#if EMSCRIPTEN
#ifdef __EMSCRIPTEN__
int result = sum;
REPORT_RESULT();
#endif
Expand Down Expand Up @@ -286,7 +286,7 @@ int main(int argc, char *argv[])

verify();

#if !EMSCRIPTEN
#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif

Expand Down
4 changes: 2 additions & 2 deletions tests/cubegeom_color2.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/

#if !EMSCRIPTEN
#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif

Expand Down Expand Up @@ -273,7 +273,7 @@ int main(int argc, char *argv[])

SDL_GL_SwapBuffers();

#if !EMSCRIPTEN
#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif

Expand Down
4 changes: 2 additions & 2 deletions tests/cubegeom_fog.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/

#if !EMSCRIPTEN
#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif

Expand Down Expand Up @@ -281,7 +281,7 @@ int main(int argc, char *argv[])

SDL_GL_SwapBuffers();

#if !EMSCRIPTEN
#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif

Expand Down
2 changes: 1 addition & 1 deletion tests/cubegeom_glew.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();


#if !EMSCRIPTEN
#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif

Expand Down
4 changes: 2 additions & 2 deletions tests/cubegeom_mt.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/

#if !EMSCRIPTEN
#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif

Expand Down Expand Up @@ -274,7 +274,7 @@ int main(int argc, char *argv[])

SDL_GL_SwapBuffers();

#if !EMSCRIPTEN
#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif

Expand Down
4 changes: 2 additions & 2 deletions tests/cubegeom_normal.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/

#if !EMSCRIPTEN
#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif

Expand Down Expand Up @@ -269,7 +269,7 @@ int main(int argc, char *argv[])

SDL_GL_SwapBuffers();

#if !EMSCRIPTEN
#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif

Expand Down
4 changes: 2 additions & 2 deletions tests/cubegeom_normal_dap.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/

#if !EMSCRIPTEN
#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif

Expand Down Expand Up @@ -266,7 +266,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();


#if !EMSCRIPTEN
#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif

Expand Down
4 changes: 2 additions & 2 deletions tests/cubegeom_normal_dap_far.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/

#if !EMSCRIPTEN
#if !defined(__EMSCRIPTEN__)
#define USE_GLEW 1
#endif

Expand Down Expand Up @@ -263,7 +263,7 @@ int main(int argc, char *argv[])

SDL_GL_SwapBuffers();

#if !EMSCRIPTEN
#if !defined(__EMSCRIPTEN__)
SDL_Delay(1500);
#endif

Expand Down
4 changes: 2 additions & 2 deletions tests/cubegeom_normal_dap_far_glda.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/

#if !EMSCRIPTEN
#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif

Expand Down Expand Up @@ -254,7 +254,7 @@ int main(int argc, char *argv[])

SDL_GL_SwapBuffers();

#if !EMSCRIPTEN
#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif

Expand Down
4 changes: 2 additions & 2 deletions tests/cubegeom_normal_dap_far_glda_quad.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/

#if !EMSCRIPTEN
#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif

Expand Down Expand Up @@ -254,7 +254,7 @@ int main(int argc, char *argv[])

SDL_GL_SwapBuffers();

#if !EMSCRIPTEN
#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif

Expand Down
4 changes: 2 additions & 2 deletions tests/cubegeom_normal_dap_far_range.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/

#if !EMSCRIPTEN
#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif

Expand Down Expand Up @@ -263,7 +263,7 @@ int main(int argc, char *argv[])

SDL_GL_SwapBuffers();

#if !EMSCRIPTEN
#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif

Expand Down
4 changes: 2 additions & 2 deletions tests/cubegeom_pre.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/

#if !EMSCRIPTEN
#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif

Expand Down Expand Up @@ -283,7 +283,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();


#if !EMSCRIPTEN
#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif

Expand Down
4 changes: 2 additions & 2 deletions tests/cubegeom_pre2.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/

#if !EMSCRIPTEN
#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif

Expand Down Expand Up @@ -322,7 +322,7 @@ int main(int argc, char *argv[])

SDL_GL_SwapBuffers();

#if !EMSCRIPTEN
#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif

Expand Down
4 changes: 2 additions & 2 deletions tests/cubegeom_pre2_vao.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/

#if !EMSCRIPTEN
#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif

Expand Down Expand Up @@ -354,7 +354,7 @@ int main(int argc, char *argv[])

SDL_GL_SwapBuffers();

#if !EMSCRIPTEN
#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif

Expand Down
4 changes: 2 additions & 2 deletions tests/cubegeom_pre2_vao2.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/

#if !EMSCRIPTEN
#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif

Expand Down Expand Up @@ -355,7 +355,7 @@ int main(int argc, char *argv[])

SDL_GL_SwapBuffers();

#if !EMSCRIPTEN
#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif

Expand Down
4 changes: 2 additions & 2 deletions tests/cubegeom_pre3.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/

#if !EMSCRIPTEN
#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif

Expand Down Expand Up @@ -322,7 +322,7 @@ int main(int argc, char *argv[])

SDL_GL_SwapBuffers();

#if !EMSCRIPTEN
#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif

Expand Down
4 changes: 2 additions & 2 deletions tests/cubegeom_pre_vao.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/

#if !EMSCRIPTEN
#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif

Expand Down Expand Up @@ -308,7 +308,7 @@ int main(int argc, char *argv[])

SDL_GL_SwapBuffers();

#if !EMSCRIPTEN
#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif

Expand Down
Loading

0 comments on commit 3317f2c

Please sign in to comment.