Simple beginnings of msvcrt math tests.
Jakob Eriksson
jakov at vmlinux.org
Tue Nov 2 04:28:21 CST 2004
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
-------------------------------------------------------------------------
jakov at toto:~/src/wine/dlls/msvcrt/tests$ diff -u /dev/null math.c
--- /dev/null 2004-10-04 18:03:41.000000000 +0200
+++ math.c 2004-11-02 11:17:52.000000000 +0100
@@ -0,0 +1,46 @@
+/*
+ * 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
+
+
+Changelog:
+* Added tests for math functions
+
+
+*/
+
+
+#include "wine/test.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();
+}
+
More information about the wine-patches
mailing list