Fix parallel testing
[alexxy/gromacs.git] / src / gromacs / compat / tests / pointers.cpp
index 8e7b3f8e4f8f261bf92b1d54009ad1bfc31ede60..991f9a31725e689a28a4897956fec54717f26c3e 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2018,2019, by the GROMACS development team, led by
+ * Copyright (c) 2018,2019,2020, 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.
 
 #include "gromacs/compat/pointers.h"
 
+#include "config.h"
+
 #include <memory>
 #include <vector>
 
 #include <gtest/gtest.h>
 
+#include "testutils/testasserts.h"
 
 namespace gmx
 {
@@ -65,10 +68,12 @@ TEST(NotNullConstruction, Works)
  * will not trigger the assert when using the pointer without
  * a valid object. This was needed due to an internal error
  * being triggered instead with the compiler under this condition.
+ *
+ * Death tests can also not be used safely in a parallel environment.
  */
 #    if !defined(__INTEL_COMPILER) || !(__INTEL_COMPILER == 1800 && __INTEL_COMPILER_UPDATE == 0)
     int* nullPointer = nullptr;
-    EXPECT_DEATH_IF_SUPPORTED(not_null<int*> invalidNullPointer(nullPointer), "");
+    GMX_EXPECT_DEATH_IF_SUPPORTED(not_null<int*> invalidNullPointer(nullPointer), "");
 #    endif
 #endif