Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(125)

Unified Diff: gcc/gcc/testsuite/gcc.dg/dfp/compare-eq.h

Issue 3050029: [gcc] GCC 4.5.0=>4.5.1 (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/nacl-toolchain.git
Patch Set: Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gcc/gcc/testsuite/gcc.dg/dfp/call-by-value.c ('k') | gcc/gcc/testsuite/gcc.dg/dfp/compare-eq-const.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gcc/gcc/testsuite/gcc.dg/dfp/compare-eq.h
diff --git a/gcc/gcc/testsuite/gcc.dg/dfp/compare-eq.h b/gcc/gcc/testsuite/gcc.dg/dfp/compare-eq.h
deleted file mode 100644
index 809d642593c5ac422821d335dc72006029e1dca2..0000000000000000000000000000000000000000
--- a/gcc/gcc/testsuite/gcc.dg/dfp/compare-eq.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/* Basic test of runtime equality comparisons using simple values that
- are not affected by rounding. */
-
-#include <stdlib.h>
-
-static int failcnt;
-
-#define PASTE2(A,B) A ## B
-#define PASTE(A,B) PASTE2(A,B)
-
-#ifdef DBG
-#include <stdio.h>
-#define FAILURE(OP,KIND) \
- { printf ("failed at line %d: %s for %s values\n", __LINE__, OP, KIND); \
- failcnt++; }
-#else
-#define FAILURE(OP,KIND) abort ();
-#endif
-
-#ifndef WIDTH
-#error define WIDTH as decimal float size in bytes
-#endif
-
-#if WIDTH == 32
-#define DTYPE _Decimal32
-#define SUFFIX DF
-#elif WIDTH == 64
-#define DTYPE _Decimal64
-#define SUFFIX DD
-#elif WIDTH == 128
-#define DTYPE _Decimal128
-#define SUFFIX DL
-#elif WIDTH == 0
-/* This is for testing the test using a type known to work. */
-#define DTYPE double
-#define SUFFIX
-#else
-#error invalid width for decimal float type
-#endif
-
-DTYPE m_two = PASTE(-2.0, SUFFIX);
-DTYPE m_one = PASTE(-1.0, SUFFIX);
-DTYPE zero = PASTE(0.0, SUFFIX);
-DTYPE one = PASTE(1.0, SUFFIX);
-DTYPE two = PASTE(2.0, SUFFIX);
-
-void
-test_compares (void)
-{
- DTYPE x = one;
- DTYPE y = zero;
- DTYPE z = m_one;
-
- /* Equal to: comparisons against equal values. */
-
- if (! (x == one)) FAILURE ("==", "equal")
- if (! (y == zero)) FAILURE ("==", "equal")
- if (! (z == m_one)) FAILURE ("==", "equal")
-
- /* Equal to: comparisons against lesser values. */
-
- if (x == m_one) FAILURE ("==", "lesser")
- if (x == zero) FAILURE ("==", "lesser")
- if (y == m_one) FAILURE ("==", "lesser")
- if (z == m_two) FAILURE ("==", "lesser")
-
- /* Equal to: comparisons against greater values. */
-
- if (x == two) FAILURE ("==", "greater")
- if (y == one) FAILURE ("==", "greater")
- if (z == zero) FAILURE ("==", "greater")
- if (z == one) FAILURE ("==", "greater")
-
- /* Not equal to: comparisons against equal values. */
-
- if (x != one) FAILURE ("!=", "equal")
- if (y != zero) FAILURE ("!=", "equal")
- if (z != m_one) FAILURE ("!=", "equal")
-
- /* Not equal to: comparisons against lesser values. */
-
- if (! (x != m_one)) FAILURE ("!=", "lesser")
- if (! (x != zero)) FAILURE ("!=", "lesser")
- if (! (y != m_one)) FAILURE ("!=", "lesser")
- if (! (z != m_two)) FAILURE ("!=", "lesser")
-
- /* Not equal to: comparisons against greater values. */
-
- if (! (x != m_one)) FAILURE ("!=", "greater")
- if (! (x != zero)) FAILURE ("!=", "greater")
- if (! (y != m_one)) FAILURE ("!=", "greater")
- if (! (z != m_two)) FAILURE ("!=", "greater")
-
- if (failcnt)
- abort ();
-}
« no previous file with comments | « gcc/gcc/testsuite/gcc.dg/dfp/call-by-value.c ('k') | gcc/gcc/testsuite/gcc.dg/dfp/compare-eq-const.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698