???
This commit is contained in:
parent
60abc2c397
commit
40e6a35332
@ -1,4 +1,3 @@
|
||||
<<<<<<< HEAD
|
||||
add_subdirectory( Logger )
|
||||
|
||||
|
||||
@ -16,7 +15,6 @@ Parser/ItemSize.cpp )
|
||||
|
||||
|
||||
add_library(Parser ${rawdeck_source} ${parser_source})
|
||||
add_library(Logger Logger.cpp)
|
||||
|
||||
|
||||
|
||||
|
@ -24,7 +24,8 @@
|
||||
#include <fstream>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
#include <opm/parser/eclipse/Logger.hpp>
|
||||
#include <opm/parser/eclipse/Logger/Logger.hpp>
|
||||
#include <opm/parser/eclipse/RawDeck/RawKeyword.hpp>
|
||||
#include <opm/parser/eclipse/RawDeck/RawDeck.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParserKW.hpp>
|
||||
|
||||
|
@ -31,6 +31,14 @@ namespace Opm {
|
||||
BOX = 2,
|
||||
GRID = 3
|
||||
};
|
||||
|
||||
|
||||
enum ItemSizeEnum {
|
||||
UNSPECIFIED = 0,
|
||||
ITEM_FIXED = 1,
|
||||
ITEM_BOX = 2
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -8,6 +8,9 @@ add_executable(runRawParserKWsTests RawParserKWsTests.cpp)
|
||||
|
||||
add_executable(runParserKWTests ParserKWTests.cpp)
|
||||
add_executable(runParserRecordSizeTests ParserRecordSizeTests.cpp)
|
||||
add_executable(runParserRecordItemTests ParserRecordItemTests.cpp)
|
||||
add_executable(runParserItemSizeTests ParserItemSizeTests.cpp)
|
||||
|
||||
|
||||
target_link_libraries(runParserTests Parser Logger ${Boost_LIBRARIES})
|
||||
target_link_libraries(runParserTestsInternalData Parser Logger ${Boost_LIBRARIES})
|
||||
@ -19,6 +22,8 @@ target_link_libraries(runRawParserKWsTests Parser Logger ${Boost_LIBRARIES})
|
||||
|
||||
target_link_libraries(runParserKWTests Parser Logger ${Boost_LIBRARIES})
|
||||
target_link_libraries(runParserRecordSizeTests Parser Logger ${Boost_LIBRARIES})
|
||||
target_link_libraries(runParserRecordItemTests Parser Logger ${Boost_LIBRARIES})
|
||||
target_link_libraries(runParserItemSizeTests Parser Logger ${Boost_LIBRARIES})
|
||||
|
||||
add_test(NAME runParserTests WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} COMMAND ${EXECUTABLE_OUTPUT_PATH}/runParserTests )
|
||||
add_test(NAME runParserTestsInternalData WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} COMMAND ${EXECUTABLE_OUTPUT_PATH}/runParserTestsInternalData)
|
||||
@ -38,3 +43,5 @@ set_tests_properties(runRawParserKWsTests PROPERTIES LABELS Raw)
|
||||
|
||||
add_test(NAME runParserKWTests COMMAND ${EXECUTABLE_OUTPUT_PATH}/runParserKWTests )
|
||||
add_test(NAME runParserRecordSizeTests COMMAND ${EXECUTABLE_OUTPUT_PATH}/runParserRecordSizeTests )
|
||||
add_test(NAME runParserRecordItemTests COMMAND ${EXECUTABLE_OUTPUT_PATH}/runParserRecordItemTests )
|
||||
add_test(NAME runParserItemSizeTests COMMAND ${EXECUTABLE_OUTPUT_PATH}/runParserItemSizeTests )
|
||||
|
31
tests/ParserRecordItemTest.cpp
Normal file
31
tests/ParserRecordItemTest.cpp
Normal file
@ -0,0 +1,31 @@
|
||||
/*
|
||||
Copyright 2013 Statoil ASA.
|
||||
|
||||
This file is part of the Open Porous Media project (OPM).
|
||||
|
||||
OPM is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OPM is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#define BOOST_TEST_MODULE ParserTests
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include "opm/parser/eclipse/Parser/ParserRecordItem.hpp"
|
||||
|
||||
|
||||
using namespace Opm;
|
||||
|
||||
BOOST_AUTO_TEST_CASE(Initialize_int) {
|
||||
BOOST_REQUIRE_NO_THROW( ParserRecordItem<int> item );
|
||||
}
|
Loading…
Reference in New Issue
Block a user