Tidied up tests, made them work with make as well as ninja generators for

CMake.
main
theraven 13 years ago
parent 6317b79a10
commit b757ea9ffb

@ -1,8 +1,8 @@
#define _GNU_SOURCE
#include "../unwind.h"
#include "Test.h"
#include <objc/hooks.h>
#include <stdlib.h>
#include <stdio.h>
struct foreign_exception
@ -45,13 +45,11 @@ void finally(void)
+ (id) exceptionWithForeignException: (struct _Unwind_Exception*)ex
{
BoxedException *b = [BoxedException new];
fprintf(stderr, "Foreign exception allocated b: %p (isa: %p)\n", b, b->isa);
b->exception = (struct foreign_exception*)ex;
return b;
}
- (void)dealloc
{
fprintf(stderr, "Foreign exception deallocated\n");
free(exception);
[super dealloc];
}
@ -68,7 +66,6 @@ void finally(void)
struct _Unwind_Exception *ex = &exception->header;
exception = 0;
[self dealloc];
fprintf(stderr, "Foreign exception rethrown\n");
_Unwind_Resume_or_Rethrow(ex);
abort();
}

@ -23,7 +23,7 @@ function(addtest_flags TEST FLAGS TEST_SOURCE)
add_executable(${TEST} ${TEST_SOURCE})
add_test(${TEST} ${TEST})
set_target_properties(${TEST} PROPERTIES
INCLUDE_DIRECTORIES ".."
INCLUDE_DIRECTORIES "${CMAKE_SOURCE_DIR}"
COMPILE_FLAGS "-fobjc-runtime=gnustep-1.7 -fblocks ${FLAGS}"
LINKER_LANGUAGE C
)

Loading…
Cancel
Save