mirror of
https://github.com/OPM/ResInsight.git
synced 2024-12-28 01:41:42 -06:00
Add test for tab as delimiter
This commit is contained in:
parent
ca4a201c4e
commit
af7addd6b4
@ -233,6 +233,34 @@ TEST( RifSurfaceImporter, ReadTinyOpenWorksXyzFile )
|
||||
}
|
||||
}
|
||||
|
||||
TEST( RifSurfaceImporter, ReadTinyOpenWorksXyzFileTabs )
|
||||
{
|
||||
QDir baseFolder( TEST_DATA_DIR );
|
||||
|
||||
QString filename( "RifSurfaceImporter/tiny-test-tabs.dat" );
|
||||
QString filePath = baseFolder.absoluteFilePath( filename );
|
||||
EXPECT_TRUE( QFile::exists( filePath ) );
|
||||
|
||||
auto surface = RifSurfaceImporter::readOpenWorksXyzFile( filePath, 0.1 );
|
||||
|
||||
auto vertices = surface.first;
|
||||
auto indices = surface.second;
|
||||
|
||||
EXPECT_EQ( (size_t)15, vertices.size() );
|
||||
EXPECT_EQ( (size_t)24, indices.size() );
|
||||
|
||||
if ( !indices.empty() )
|
||||
{
|
||||
EXPECT_EQ( (size_t)0, indices.front() );
|
||||
EXPECT_EQ( (size_t)11, indices.back() );
|
||||
|
||||
for ( size_t i = 0; i < indices.size(); i++ )
|
||||
{
|
||||
EXPECT_TRUE( indices[i] != ( (unsigned)-1 ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
TEST( RifSurfaceImporter, ReadLargeOpenWorksXyzFile )
|
||||
{
|
||||
QDir baseFolder( TEST_DATA_DIR );
|
||||
|
@ -0,0 +1,15 @@
|
||||
0 0 0
|
||||
0 1 0
|
||||
0 2 0
|
||||
0 4 0
|
||||
2 0 0
|
||||
2 1 0
|
||||
2 2 0
|
||||
2 3 0
|
||||
4 1 0
|
||||
4 2 0
|
||||
6 -2 0
|
||||
6 1 0
|
||||
6 2 0
|
||||
8 3 0
|
||||
8 5 0
|
Loading…
Reference in New Issue
Block a user