From e8596f33f686768193362b279d6107c43ada13a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Hanousek=20-=20vz?= <vithanousek@seznam.cz> Date: Tue, 2 Oct 2018 20:18:19 +0200 Subject: [PATCH] FIX CutDistributedMeshFunctionTest --- .../CutDistributedMeshFunctionTest.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/UnitTests/Meshes/DistributedMeshes/CutDistributedMeshFunctionTest.cpp b/src/UnitTests/Meshes/DistributedMeshes/CutDistributedMeshFunctionTest.cpp index 4907f1d269..000a832b60 100644 --- a/src/UnitTests/Meshes/DistributedMeshes/CutDistributedMeshFunctionTest.cpp +++ b/src/UnitTests/Meshes/DistributedMeshes/CutDistributedMeshFunctionTest.cpp @@ -578,7 +578,7 @@ TEST(CutDistributedMeshFunction, 3D_2_Save) StaticVector<1,typename CutMeshType::IndexType>(4) ); - String FileName=String("/tmp/test-file.tnl"); + String FileName=String("test-file.tnl"); if(inCut) { MeshFunction<CutMeshType> cutMeshFunction; @@ -612,7 +612,8 @@ TEST(CutDistributedMeshFunction, 3D_2_Save) loadMeshFunctionptr.bind(globalCutGrid,loaddof); File file; - file.open( FileName, IOMode::read ); + bool ok=file.open( FileName, IOMode::read ); + TNL_ASSERT_TRUE(ok,"Cannot open file"); loadMeshFunctionptr.boundLoad(file); file.close(); @@ -630,9 +631,12 @@ TEST(CutDistributedMeshFunction, 3D_2_Save) fromEntity.refresh(); outEntity.refresh(); - EXPECT_EQ(loadMeshFunctionptr.getValue(outEntity), (*linearFunctionPtr)(fromEntity)) << "Error in Left overlap"; + EXPECT_EQ(loadMeshFunctionptr.getValue(outEntity), (*linearFunctionPtr)(fromEntity)) << "Error at "<< i <<" "<< j; } + + EXPECT_EQ( std::remove( FileName.getString()) , 0 ); + EXPECT_EQ( std::remove( (FileName+String("-mesh.tnl")).getString()) , 0 ); } } -- GitLab