From 4b5ebece4e3337c0e3ebea65ac750e74f9f3f5ff Mon Sep 17 00:00:00 2001 From: Mark Abraham Date: Sun, 3 Jan 2016 18:20:54 +0100 Subject: [PATCH] Use EXPECT_TRUE and EXPECT_FALSE in new SIMD tests gcc 4.7.3 has a bug that means it warns about converting false to a pointer type (see https://github.com/google/googletest/issues/322), so we should just use the normal approach in GoogleTest and avoid problems. Change-Id: Ic700ded4a645af1e45fc66fde8fffae692ce33ec --- src/gromacs/simd/tests/simd4_floatingpoint.cpp | 6 +++--- src/gromacs/simd/tests/simd_floatingpoint.cpp | 6 +++--- src/gromacs/simd/tests/simd_integer.cpp | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/gromacs/simd/tests/simd4_floatingpoint.cpp b/src/gromacs/simd/tests/simd4_floatingpoint.cpp index 6394fa3a60..3705aab566 100644 --- a/src/gromacs/simd/tests/simd4_floatingpoint.cpp +++ b/src/gromacs/simd/tests/simd4_floatingpoint.cpp @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2014,2015, by the GROMACS development team, led by + * Copyright (c) 2014,2015,2016, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -265,10 +265,10 @@ TEST_F(Simd4FloatingpointTest, anyTrue) * since that part of the data will not be used if simd width is 1. */ eq = (rSimd4_5_7_9 == setSimd4RealFrom3R(5, 0, 0)); - EXPECT_NE(false, anyTrue(eq)); + EXPECT_TRUE(anyTrue(eq)); eq = (rSimd4_1_2_3 == rSimd4_4_5_6); - EXPECT_EQ(false, anyTrue(eq)); + EXPECT_FALSE(anyTrue(eq)); } TEST_F(Simd4FloatingpointTest, blend) diff --git a/src/gromacs/simd/tests/simd_floatingpoint.cpp b/src/gromacs/simd/tests/simd_floatingpoint.cpp index 18a213207c..41f1645e0c 100644 --- a/src/gromacs/simd/tests/simd_floatingpoint.cpp +++ b/src/gromacs/simd/tests/simd_floatingpoint.cpp @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2014,2015, by the GROMACS development team, led by + * Copyright (c) 2014,2015,2016, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -414,10 +414,10 @@ TEST_F(SimdFloatingpointTest, anyTrueB) * since that part of the data will not be used if simd width is 1. */ eq = rSimd_5_7_9 == setSimdRealFrom3R(5, 0, 0); - EXPECT_NE(false, anyTrue(eq)); + EXPECT_TRUE(anyTrue(eq)); eq = rSimd_1_2_3 == rSimd_4_5_6; - EXPECT_EQ(false, anyTrue(eq)); + EXPECT_FALSE(anyTrue(eq)); } TEST_F(SimdFloatingpointTest, blend) diff --git a/src/gromacs/simd/tests/simd_integer.cpp b/src/gromacs/simd/tests/simd_integer.cpp index 629afcb527..b2f67b0326 100644 --- a/src/gromacs/simd/tests/simd_integer.cpp +++ b/src/gromacs/simd/tests/simd_integer.cpp @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2014,2015, by the GROMACS development team, led by + * Copyright (c) 2014,2015,2016, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -249,10 +249,10 @@ TEST_F(SimdIntegerTest, anyTrue) * since the SIMD width could be 1 as a special case. */ eq = (iSimd_5_7_9 == setSimdIntFrom3I(5, 0, 0)); - EXPECT_NE(false, anyTrue(eq)); + EXPECT_TRUE(anyTrue(eq)); eq = (iSimd_1_2_3 == iSimd_4_5_6); - EXPECT_EQ(false, anyTrue(eq)); + EXPECT_FALSE(anyTrue(eq)); } TEST_F(SimdIntegerTest, blend) -- 2.11.4.GIT