2017-10-04 07:59:38 -05:00
|
|
|
#include "gtest/gtest.h"
|
|
|
|
|
|
|
|
#include "RifEclipseRftAddress.h"
|
2019-09-06 03:40:57 -05:00
|
|
|
#include "RifReaderEclipseRft.h"
|
2017-10-04 07:59:38 -05:00
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2017-10-04 07:59:38 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
// TEST(RifReaderEclipseRftTest, TestRifEclipseRftAddress)
|
|
|
|
TEST( DISABLED_RifReaderEclipseRftTest, TestRifEclipseRftAddress )
|
2017-10-04 07:59:38 -05:00
|
|
|
{
|
2018-02-03 02:14:53 -06:00
|
|
|
QString filename = "C:\\Users\\Rebecca Cox\\Dropbox\\norne\\norne\\NORNE_ATW2013.RFT";
|
2019-09-06 03:40:57 -05:00
|
|
|
|
|
|
|
RifReaderEclipseRft reader( filename );
|
2017-10-04 07:59:38 -05:00
|
|
|
|
2019-07-25 00:38:46 -05:00
|
|
|
std::set<RifEclipseRftAddress> addresses = reader.eclipseRftAddresses();
|
2017-10-04 07:59:38 -05:00
|
|
|
|
|
|
|
/*for (RifEclipseRftAddress address : addresses)
|
|
|
|
{
|
|
|
|
std::cout << address.wellName() << std::endl;
|
|
|
|
}*/
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
for ( RifEclipseRftAddress address : addresses )
|
2017-10-04 07:59:38 -05:00
|
|
|
{
|
|
|
|
std::vector<double> values;
|
2019-09-06 03:40:57 -05:00
|
|
|
reader.values( address, &values );
|
|
|
|
EXPECT_TRUE( values.size() > 0 );
|
2017-10-04 07:59:38 -05:00
|
|
|
}
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
ASSERT_TRUE( addresses.size() > 0 );
|
2017-10-04 07:59:38 -05:00
|
|
|
|
|
|
|
std::vector<double> values;
|
2019-09-06 03:40:57 -05:00
|
|
|
reader.values( *addresses.begin(), &values );
|
|
|
|
ASSERT_TRUE( values.size() > 0 );
|
2017-10-04 07:59:38 -05:00
|
|
|
|
|
|
|
std::cout << "First value: " << values.front() << ", last value: " << values.back() << std::endl;
|
|
|
|
}
|