You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by wr...@apache.org on 2007/10/07 00:39:27 UTC
svn commit: r582541 - /apr/apr/trunk/test/abts.h
Author: wrowe
Date: Sat Oct 6 15:39:23 2007
New Revision: 582541
URL: http://svn.apache.org/viewvc?rev=582541&view=rev
Log:
We need to compare size_t where it's >int/long, which is true
on all 64P architectures. Since %p does a very nice job, and
since BenL taught me the typesafe way to cast a function, let's
provide ABTS_SIZE_EQUAL tests.
Modified:
apr/apr/trunk/test/abts.h
Modified: apr/apr/trunk/test/abts.h
URL: http://svn.apache.org/viewvc/apr/apr/trunk/test/abts.h?rev=582541&r1=582540&r2=582541&view=diff
==============================================================================
--- apr/apr/trunk/test/abts.h (original)
+++ apr/apr/trunk/test/abts.h Sat Oct 6 15:39:23 2007
@@ -21,6 +21,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <io.h>
#ifndef ABTS_H
#define ABTS_H
@@ -74,6 +75,8 @@
void abts_not_impl(abts_case *tc, const char *message, int lineno);
void abts_assert(abts_case *tc, const char *message, int condition, int lineno);
+typedef void (fn_abts_size_equal)(abts_case *tc, size_t expected, size_t actual, int lineno);
+
/* Convenience macros. Ryan hates these! */
#define ABTS_INT_EQUAL(a, b, c) abts_int_equal(a, b, c, __LINE__)
#define ABTS_INT_NEQUAL(a, b, c) abts_int_nequal(a, b, c, __LINE__)
@@ -85,6 +88,9 @@
#define ABTS_FAIL(a, b) abts_fail(a, b, __LINE__);
#define ABTS_NOT_IMPL(a, b) abts_not_impl(a, b, __LINE__);
#define ABTS_ASSERT(a, b, c) abts_assert(a, b, c, __LINE__);
+
+#define ABTS_SIZE_EQUAL(a, b, c) ((fn_abts_size_equal*)abts_ptr_equal)(a, b, c, __LINE__)
+
abts_suite *run_tests(abts_suite *suite);
abts_suite *run_tests1(abts_suite *suite);