math testing, simple beginnings

Jakob Eriksson jakov at vmlinux.org
Mon Nov 1 09:45:38 CST 2004


/*
 * Unit test suite for math functions.
 *
 * Copyright 2004 Jakob Eriksson
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

#include "wine/test.h"
//#include "winbase.h"

#include <math.h>

static void test_abs()
{
    ok(abs(1) == 1, "abs(1) should be 1\n");
    ok(abs(233487.2389) == 233487, "abs(233487.2389) should be 233487\n");
    ok(abs(-233487) == 233487, "abs(-233487) should be 233487\n");
    ok(abs(0) == 0, "abs(0) should be 0\n");
    ok(abs(-0.233487) == 0, "abs(-0.233487) should be 0\n");
    ok(abs(0.233487) == 0, "abs(0.233487) should be 0\n");
}

START_TEST(math)
{
    test_abs();
}



---------------------------------------------



jakov at toto:~/src/wine/dlls/msvcrt/tests$ cvs diff -u Makefile.in
Index: Makefile.in
===================================================================
RCS file: /home/wine/wine/dlls/msvcrt/tests/Makefile.in,v
retrieving revision 1.8
diff -u -r1.8 Makefile.in
--- Makefile.in 19 Jul 2004 21:23:02 -0000      1.8
+++ Makefile.in 1 Nov 2004 15:43:55 -0000
@@ -12,6 +12,7 @@
        file.c \
        headers.c \
        heap.c \
+       math.c \
        scanf.c \
        string.c \
        time.c






More information about the wine-patches mailing list