Merge pull request #593 from joakim-hove/rename-elastic-vector
Renamed ElasticVector -> RecordVector
This commit is contained in:
commit
f9accc018d
@ -193,7 +193,7 @@ EclipseState/Schedule/GroupTree.hpp
|
||||
EclipseState/Schedule/Tuning.hpp
|
||||
EclipseState/Schedule/Events.hpp
|
||||
#
|
||||
EclipseState/Util/ElasticVector.hpp
|
||||
EclipseState/Util/RecordVector.hpp
|
||||
EclipseState/Util/OrderedMap.hpp
|
||||
EclipseState/Util/Value.hpp
|
||||
#
|
||||
|
@ -1124,3 +1124,10 @@ BOOST_AUTO_TEST_CASE( TestPLYMAX ) {
|
||||
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE( TestParseTABDIMS ) {
|
||||
const char *data =
|
||||
"TABDIMS\n"
|
||||
" 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 /\n";
|
||||
Opm::ParserPtr parser(new Opm::Parser);
|
||||
BOOST_CHECK_NO_THROW( parser->parseString(data, Opm::ParseMode()));
|
||||
}
|
||||
|
@ -18,8 +18,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _ELASTIC_VECTOR_
|
||||
#define _ELASTIC_VECTOR_
|
||||
#ifndef _RECORD_VECTOR_
|
||||
#define _RECORD_VECTOR_
|
||||
|
||||
#include <vector>
|
||||
#include <stdexcept>
|
||||
@ -32,7 +32,7 @@
|
||||
namespace Opm {
|
||||
|
||||
template <typename T>
|
||||
class ElasticVector {
|
||||
class RecordVector {
|
||||
private:
|
||||
std::vector<T> m_data;
|
||||
public:
|
||||
@ -47,7 +47,7 @@ public:
|
||||
else
|
||||
return m_data[index];
|
||||
} else
|
||||
throw std::invalid_argument("Trying to get from empty ElasticVector");
|
||||
throw std::invalid_argument("Trying to get from empty RecordVector");
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
foreach(tapp OrderedMapTests ValueTests ElasticVectorTests)
|
||||
foreach(tapp OrderedMapTests ValueTests RecordVectorTests)
|
||||
opm_add_test(run${tapp} SOURCES ${tapp}.cpp
|
||||
LIBRARIES opmparser ${Boost_LIBRARIES})
|
||||
endforeach()
|
||||
|
@ -25,17 +25,17 @@
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Util/ElasticVector.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Util/RecordVector.hpp>
|
||||
|
||||
BOOST_AUTO_TEST_CASE( check_empty) {
|
||||
Opm::ElasticVector<int> vector;
|
||||
Opm::RecordVector<int> vector;
|
||||
BOOST_CHECK_EQUAL( 0U , vector.size());
|
||||
BOOST_CHECK_THROW( vector.get(0) , std::invalid_argument );
|
||||
}
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE( check_add ) {
|
||||
Opm::ElasticVector<int> vector;
|
||||
Opm::RecordVector<int> vector;
|
||||
vector.push_back(10);
|
||||
BOOST_CHECK_EQUAL( 1U , vector.size());
|
||||
BOOST_CHECK_EQUAL( 10 , vector.get(0));
|
@ -41,7 +41,7 @@
|
||||
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
|
||||
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Util/ElasticVector.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Util/RecordVector.hpp>
|
||||
|
||||
|
||||
namespace Opm {
|
||||
@ -121,7 +121,7 @@ namespace Opm {
|
||||
#else
|
||||
boost::regex m_matchRegex;
|
||||
#endif
|
||||
ElasticVector<ParserRecordPtr> m_records;
|
||||
RecordVector<ParserRecordPtr> m_records;
|
||||
enum ParserKeywordSizeEnum m_keywordSizeType;
|
||||
size_t m_fixedSize;
|
||||
bool m_isTableCollection;
|
||||
|
Loading…
Reference in New Issue
Block a user