Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Simplifying
Browse files Browse the repository at this point in the history
  • Loading branch information
mkauppila committed May 24, 2011
1 parent 7cba0f8 commit 4c64f19
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 59 deletions.
24 changes: 0 additions & 24 deletions test/test-automation/.hgignore

This file was deleted.

7 changes: 5 additions & 2 deletions test/test-automation/asserts.c
Expand Up @@ -26,10 +26,13 @@
#include <stdlib.h>

void
assertEquals(Uint32 expected, Uint32 actual)
assertEquals(char *message, Uint32 expected, Uint32 actual)
{
if(expected != actual) {
exit(1);
printf("===============================\n");
printf("Assert failed: %s\n", message);
printf("Expected %d, got %d\n", expected, actual);
printf("===============================\n");
}
}

Expand Down
2 changes: 1 addition & 1 deletion test/test-automation/asserts.h
Expand Up @@ -23,6 +23,6 @@

#include <SDL/SDL.h>

void assertEquals(Uint32 expected, Uint32 actual);
void assertEquals(char *message, Uint32 expected, Uint32 actual);

#endif
4 changes: 2 additions & 2 deletions test/test-automation/test.c
Expand Up @@ -37,7 +37,7 @@ void hello(void *arg){
const char *revision = SDL_GetRevision();

printf("Revision is %s\n", revision);
assertEquals(3, 5);
assertEquals("will fail", 3, 5);
}

void hello2(void *arg) {
Expand All @@ -48,7 +48,7 @@ void hello2(void *arg) {
void hello3(void *arg) {
printf("hello\n");

assertEquals(3, 3);
assertEquals("passes", 3, 3);
}

#endif
30 changes: 0 additions & 30 deletions test/test-automation/test.h

This file was deleted.

0 comments on commit 4c64f19

Please sign in to comment.