From 4d19ee3038b019a6f67d5d3cc3a88d5f60564aad Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Wed, 7 Jul 2010 18:17:05 +0200 Subject: [PATCH] move macro definition to function where it is used --- src/simulator/high-precision.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/simulator/high-precision.cc b/src/simulator/high-precision.cc index e753e4542..23573554a 100644 --- a/src/simulator/high-precision.cc +++ b/src/simulator/high-precision.cc @@ -293,6 +293,10 @@ Hp128InvertTestCase::Hp128InvertTestCase () : TestCase ("Test case for invertion") { } + +bool +Hp128InvertTestCase::DoRun (void) +{ #define TEST(factor) \ do { \ HighPrecision a; \ @@ -315,9 +319,6 @@ Hp128InvertTestCase::Hp128InvertTestCase () "-x * 1/x should be -1 for x=" << factor); \ } while(false) -bool -Hp128InvertTestCase::DoRun (void) -{ TEST(2); TEST(3); TEST(4); @@ -340,6 +341,7 @@ Hp128InvertTestCase::DoRun (void) TEST(10000000000000LL); TEST(100000000000000LL); TEST(1000000000000000LL); +#undef TEST return false; }