mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-01 03:37:15 -06:00
12ae4dbaaa
Make sure RFIP* and SFIP* are not treated as category results
57 lines
1.5 KiB
C++
57 lines
1.5 KiB
C++
#include "gtest/gtest.h"
|
|
|
|
#include "RiaResultNames.h"
|
|
|
|
TEST( RiaResultNames, TestIsCategoryResult )
|
|
{
|
|
// Test for non-category result names
|
|
{
|
|
QString resultVariable = "FIPOIL";
|
|
bool result = RiaResultNames::isCategoryResult( resultVariable );
|
|
EXPECT_FALSE( result );
|
|
}
|
|
|
|
{
|
|
QString resultVariable = "FIPWAT";
|
|
bool result = RiaResultNames::isCategoryResult( resultVariable );
|
|
EXPECT_FALSE( result );
|
|
}
|
|
|
|
{
|
|
QString resultVariable = "FIPGAS";
|
|
bool result = RiaResultNames::isCategoryResult( resultVariable );
|
|
EXPECT_FALSE( result );
|
|
}
|
|
|
|
{
|
|
QString resultVariable = "SFIPGAS";
|
|
bool result = RiaResultNames::isCategoryResult( resultVariable );
|
|
EXPECT_FALSE( result );
|
|
}
|
|
|
|
{
|
|
QString resultVariable = "RFIPGAS";
|
|
bool result = RiaResultNames::isCategoryResult( resultVariable );
|
|
EXPECT_FALSE( result );
|
|
}
|
|
|
|
{
|
|
QString resultVariable = "RFIPGAS_P90";
|
|
bool result = RiaResultNames::isCategoryResult( resultVariable );
|
|
EXPECT_FALSE( result );
|
|
}
|
|
|
|
// Test for category result names
|
|
{
|
|
QString resultVariable = "MYNUM";
|
|
bool result = RiaResultNames::isCategoryResult( resultVariable );
|
|
EXPECT_TRUE( result );
|
|
}
|
|
|
|
{
|
|
QString resultVariable = "FIPMYPROP";
|
|
bool result = RiaResultNames::isCategoryResult( resultVariable );
|
|
EXPECT_TRUE( result );
|
|
}
|
|
}
|