X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Funit-tests%2Ftest-mono-handle.c;fp=mono%2Funit-tests%2Ftest-mono-handle.c;h=8fa4aed6738262e457bc8ebce71f8a2d395494d3;hb=f048e17f41c5ae51f7e949f396d7095b270af7da;hp=db620f1690756d6c42f677d392d09b20be38060b;hpb=65e10b162240e6803f8d67077635464491971451;p=mono.git diff --git a/mono/unit-tests/test-mono-handle.c b/mono/unit-tests/test-mono-handle.c index db620f16907..8fa4aed6738 100644 --- a/mono/unit-tests/test-mono-handle.c +++ b/mono/unit-tests/test-mono-handle.c @@ -12,37 +12,27 @@ #include #include -static void -test1_arena_size () -{ - for (gsize i = 1; i < 10; ++i) { - gsize sz = mono_handle_arena_size(i); - g_assert(sz >= i*sizeof(MonoHandle)); - } -} - static void test2_arena_push_pop () { MonoHandleArena *top = NULL; - const int n_handles = 3; - MonoHandleArena *new_arena1 = g_malloc0 (mono_handle_arena_size (n_handles)); - mono_handle_arena_stack_push (&top, new_arena1, n_handles); + MonoHandleArena *new_arena1 = g_malloc0 (mono_handle_arena_size ()); + mono_handle_arena_stack_push (&top, new_arena1); - MonoHandleArena *new_arena2 = g_malloc0 (mono_handle_arena_size (n_handles)); + MonoHandleArena *new_arena2 = g_malloc0 (mono_handle_arena_size ()); - mono_handle_arena_stack_push (&top, new_arena2, n_handles); + mono_handle_arena_stack_push (&top, new_arena2); g_assert (top == new_arena2); - mono_handle_arena_stack_pop (&top, new_arena2, n_handles); + mono_handle_arena_stack_pop (&top, new_arena2); g_free (new_arena2); g_assert (top == new_arena1); - mono_handle_arena_stack_pop (&top, new_arena1, n_handles); + mono_handle_arena_stack_pop (&top, new_arena1); g_assert (top == NULL); @@ -54,8 +44,6 @@ test2_arena_push_pop () int main (int argc, const char* argv[]) { - test1_arena_size (); - test2_arena_push_pop (); return 0;