diff --git a/src/UnitTests/Meshes/DistributedMeshes/CutDistributedMeshFunctionTest.cpp b/src/UnitTests/Meshes/DistributedMeshes/CutDistributedMeshFunctionTest.cpp index 4907f1d269cfc3d7f5d205405546675f1b8d58fe..000a832b6011cd7b444ed27d141a8debbfec7c38 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 ); } }