cleanup and added some gmock tests; gmock and BUILD_SHARED_LIBS seem to be incompatible (at least with gtest 1.8.1)

This commit is contained in:
Charlton, Scott R 2020-09-11 16:35:28 -06:00
parent 46d8cf8a96
commit aa178fd6fa
3 changed files with 152 additions and 197 deletions

View File

@ -220,35 +220,17 @@ if (STANDALONE_BUILD)
set(LIB_TYPE STATIC)
endif()
if (BUILD_SHARED_LIBS)
set(LIB_TYPE SHARED)
if (STANDALONE_BUILD)
if (MSVC)
option(BUILD_CLR_LIBS "Build CLR Libraries" OFF)
endif()
if (STANDALONE_BUILD)
if (MSVC)
option(BUILD_CLR_LIBS "Build CLR Libraries" OFF)
endif()
endif()
if (BUILD_SHARED_LIBS)
set(LIB_TYPE SHARED)
endif()
add_library(IPhreeqc ${LIB_TYPE} ${IPhreeqc_SOURCES})
# target_include_directories(IPhreeqc PUBLIC "${PROJECT_SOURCE_DIR}/src")
# target_include_directories(IPhreeqc PUBLIC "${PROJECT_SOURCE_DIR}/src/phreeqcpp")
# target_include_directories(IPhreeqc PUBLIC "${PROJECT_SOURCE_DIR}/src/phreeqcpp/common")
# target_include_directories(IPhreeqc PUBLIC "${PROJECT_SOURCE_DIR}/src/phreeqcpp/PhreeqcKeywords")
# # target_include_directories(IPhreeqc PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>)
# # target_include_directories(IPhreeqc PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/phreeqcpp>)
# # target_include_directories(IPhreeqc PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/phreeqcpp/common>)
# # target_include_directories(IPhreeqc PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/phreeqcpp/PhreeqcKeywords>)
# # target_include_directories(IPhreeqc PUBLIC $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
# target_include_directories(IPhreeqc
# PUBLIC
# "${PROJECT_SOURCE_DIR}/src"
# "${PROJECT_SOURCE_DIR}/src/phreeqcpp"
# "${PROJECT_SOURCE_DIR}/src/phreeqcpp/common"
# "${PROJECT_SOURCE_DIR}/src/phreeqcpp/PhreeqcKeywords"
# )
target_include_directories(IPhreeqc
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
@ -258,12 +240,6 @@ target_include_directories(IPhreeqc
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
# target_include_directories(IPhreeqc
# PUBLIC
# $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
# $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
# )
target_compile_definitions(IPhreeqc PRIVATE "SWIG_SHARED_OBJ")
target_compile_definitions(IPhreeqc PRIVATE "USE_PHRQ_ALLOC")
@ -280,7 +256,7 @@ endif()
if (MSVC_VERSION EQUAL 1400 OR MSVC_VERSION GREATER 1400)
target_compile_definitions(IPhreeqc PUBLIC "_CRT_SECURE_NO_DEPRECATE")
target_compile_definitions(IPhreeqc PUBLIC "_SCL_SECURE_NO_WARNINGS")
endif(MSVC_VERSION EQUAL 1400 OR MSVC_VERSION GREATER 1400)
endif()
set_target_properties(IPhreeqc PROPERTIES DEBUG_POSTFIX "d")
set_target_properties(IPhreeqc PROPERTIES MINSIZEREL_POSTFIX "msr")
@ -296,13 +272,15 @@ ${PROJECT_SOURCE_DIR}/src/Var.h
)
if (IPHREEQC_ENABLE_MODULE)
set(IPhreeqc_SRC
set(IPhreeqc_SOURCES
${IPhreeqc_SOURCES}
${PROJECT_SOURCE_DIR}/src/IPhreeqc_interface.F90
${PROJECT_SOURCE_DIR}/src/README.Fortran
)
else()
# always install README.Fortran
set(IPhreeqc_SRC
set(IPhreeqc_SOURCES
${IPhreeqc_SOURCES}
${PROJECT_SOURCE_DIR}/src/README.Fortran
)
# install old fortran include files
@ -324,36 +302,8 @@ if (MSVC AND BUILD_SHARED_LIBS AND BUILD_CLR_LIBS)
target_compile_definitions(IPhreeqc PRIVATE "MULTICHART")
endif()
# install
# if (WIN32)
# if (BUILD_CLR_LIBS)
# if ("${CMAKE_SIZEOF_VOID_P}" EQUAL 8)
# SET(CMAKE_INSTALL_LIBDIR "clrx64")
# else()
# SET(CMAKE_INSTALL_LIBDIR "clr")
# endif()
# else()
# if ("${CMAKE_SIZEOF_VOID_P}" EQUAL 8)
# if (BUILD_SHARED_LIBS)
# SET(CMAKE_INSTALL_LIBDIR "dllx64")
# else()
# SET(CMAKE_INSTALL_LIBDIR "libx64")
# endif()
# else()
# if (BUILD_SHARED_LIBS)
# SET(CMAKE_INSTALL_LIBDIR "dll")
# else()
# SET(CMAKE_INSTALL_LIBDIR "lib")
# endif()
# endif()
# endif()
# endif()
# install
if (STANDALONE_BUILD)
# install(TARGETS IPhreeqc DESTINATION ${CMAKE_INSTALL_LIBDIR})
#{{
include(CMakePackageConfigHelpers)
@ -383,39 +333,26 @@ if (STANDALONE_BUILD)
NAMESPACE IPhreeqc::
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/IPhreeqc
)
##}}
install(FILES ${IPhreeqc_Headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
# if (WIN32)
# install(FILES ${IPhreeqc_SRC} DESTINATION src)
# else()
# install(FILES ${IPhreeqc_SRC} DESTINATION ${CMAKE_INSTALL_DOCDIR}/src)
# endif()
# if (BUILD_CLR_LIBS)
# install(FILES "${PROJECT_SOURCE_DIR}/src/phreeqcpp/ZedGraph.dll" DESTINATION ${CMAKE_INSTALL_LIBDIR})
# endif()
if (WIN32)
install(FILES ${IPhreeqc_SOURCES} DESTINATION src)
else()
install(FILES ${IPhreeqc_SOURCES} DESTINATION ${CMAKE_INSTALL_DOCDIR}/src)
endif()
if (BUILD_CLR_LIBS)
install(FILES "${PROJECT_SOURCE_DIR}/src/phreeqcpp/ZedGraph.dll" DESTINATION ${CMAKE_INSTALL_BINDIR})
endif()
endif()
##IF(MSVC)
## message("PROJECT_BINARY_DIR = ${PROJECT_BINARY_DIR}")
## INSTALL(
## DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
## DESTINATION ${CMAKE_INSTALL_LIBDIR}
## CONFIGURATIONS Debug
## FILES_MATCHING
## PATTERN "*.pdb"
## )
## INSTALL(
## FILES
## ${LIBRARY_OUTPUT_PATH}/Debug/${target_prefix}${target_name}.pdb
## DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
## DESTINATION ${CMAKE_INSTALL_LIBDIR}
## CONFIGURATIONS Debug
## )
##ENDIF(MSVC)
if (BUILD_CLR_LIBS)
if (NOT BUILD_SHARED_LIBS)
message(FATAL_ERROR "BUILD_CLR_LIBS requires that BUILD_SHARED_LIBS be set")
endif()
if (BUILD_CLR_LIBS AND IPHREEQC_STATIC_RUNTIME)
message(FATAL_ERROR "BUILD_CLR_LIBS and IPHREEQC_STATIC_RUNTIME are mutually exclusive")
if (IPHREEQC_STATIC_RUNTIME)
message(FATAL_ERROR "BUILD_CLR_LIBS and IPHREEQC_STATIC_RUNTIME are mutually exclusive")
endif()
endif()
if (EXISTS "${PROJECT_SOURCE_DIR}/CTestConfig.cmake")
@ -434,7 +371,7 @@ if (STANDALONE_BUILD)
endif()
if (BUILD_TESTING)
if (BUILD_TESTING) # may need to add MSVC version check
include(FetchContent)
FetchContent_Declare(
@ -457,7 +394,7 @@ if (STANDALONE_BUILD)
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
set(BUILD_GTEST ON CACHE BOOL "" FORCE)
set(BUILD_GMOCK OFF CACHE BOOL "" FORCE)
set(BUILD_GMOCK ON CACHE BOOL "" FORCE)
set(INSTALL_GTEST OFF CACHE BOOL "" FORCE)
set(INSTALL_GMOCK OFF CACHE BOOL "" FORCE)
@ -475,12 +412,21 @@ if (STANDALONE_BUILD)
gtest_hide_internal_symbols
)
if (BUILD_SHARED_LIBS)
##target_compile_definitions(gtest PRIVATE "GTEST_CREATE_SHARED_LIBRARY")
###add_definitions(-DGTEST_CREATE_SHARED_LIBRARY)
endif()
FetchContent_GetProperties(googletest)
if (NOT googletest_POPULATED)
FetchContent_Populate(googletest)
add_subdirectory(${googletest_SOURCE_DIR} ${googletest_BINARY_DIR})
endif()
if (BUILD_SHARED_LIBS)
###remove_definitions(-DGTEST_CREATE_SHARED_LIBRARY)
endif()
add_subdirectory(gtest)
endif()

View File

@ -10,12 +10,15 @@ add_executable(TestIPhreeqcLib TestIPhreeqcLib.cpp FileTest.cpp)
target_link_libraries(TestIPhreeqcLib IPhreeqc gtest gtest_main)
add_executable(TestIPhreeqc TestIPhreeqc.cpp FileTest.cpp)
target_link_libraries(TestIPhreeqc IPhreeqc gtest gtest_main)
##if (BUILD_SHARED_LIBS)
## target_compile_definitions(TestIPhreeqc PRIVATE "GTEST_LINKED_AS_SHARED_LIBRARY")
##endif()
target_link_libraries(TestIPhreeqc IPhreeqc gmock gtest gtest_main)
##target_link_libraries(TestIPhreeqc IPhreeqc gtest gtest_main)
add_executable(TestSelectedOutput TestSelectedOutput.cpp)
target_link_libraries(TestSelectedOutput IPhreeqc gtest gtest_main)
add_test(TestCVar TestCVar)
add_test(TestVar TestVar)
add_test(TestIPhreeqc TestIPhreeqc)
@ -33,6 +36,9 @@ if (MSVC AND BUILD_SHARED_LIBS)
add_custom_command(TARGET TestCVar POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:gtest_main> $<TARGET_FILE_DIR:TestCVar>
)
add_custom_command(TARGET TestIPhreeqc POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:gmock> $<TARGET_FILE_DIR:TestIPhreeqc>
)
endif()

View File

@ -1,4 +1,5 @@
#include <gtest/gtest.h>
#include <gmock/gmock.h>
#include <cmath>
#include <cfloat>
@ -10,6 +11,8 @@
#undef false
#include "CVar.hxx"
using ::testing::StartsWith;
VRESULT SOLUTION(IPhreeqc& obj, double C, double Ca, double Na);
VRESULT EQUILIBRIUM_PHASES(IPhreeqc& obj, const char* phase, double si, double amount);
VRESULT USER_PUNCH(IPhreeqc& obj, const char* element, int max);
@ -2208,109 +2211,109 @@ TEST(TestIPhreeqc, TestSetOutputFileName)
int line = 0;
ASSERT_TRUE(::strstr(lines[line++].c_str(), "------------------------------------") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), "Reading input data for simulation 1.") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), "------------------------------------") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), "") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), " SOLUTION 1") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), " C 1") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), " Ca 1") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), " Na 1") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), " DUMP") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), " -solution 1") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), "-------------------------------------------") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), "Beginning of initial solution calculations.") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), "-------------------------------------------") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), "") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), "Initial solution 1. ") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), "") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), "-----------------------------Solution composition--------") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), "") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), " Elements Molality Moles") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), "") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), " C ") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), " Ca ") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), " Na ") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), "") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), "----------------------------Description of solution------") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), "") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), " pH = ") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), " pe = ") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), " Activity of water = ") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), " Ionic strength (mol/kgw) = ") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), " Mass of water (kg) = ") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), " Total alkalinity (eq/kg) = ") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), " Total CO2 (mol/kg) = ") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), " Temperature (°C) = ") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), " Electrical balance (eq) = ") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), " Percent error, 100*(Cat-|An|)/(Cat+|An|) = ") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), " Iterations = ") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), " Total H = ") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), " Total O = ") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), "") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), "----------------------------Distribution of species----------------------------") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), "") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), " Log Log Log mole V") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), " Species Molality Activity Molality Activity Gamma cm³/mol") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), "") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), " OH- ") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), " H+ ") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), " H2O ") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), "C(-4) ") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), " CH4 ") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), "C(4) ") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), " HCO3- ") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), " CO2 ") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), " CaHCO3+ ") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), " CaCO3 ") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), " CO3-2 ") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), " NaHCO3 ") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), " NaCO3- ") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), "Ca ") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), " Ca+2 ") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), " CaHCO3+ ") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), " CaCO3 ") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), " CaOH+ ") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), "H(0) ") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), " H2 ") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), "Na ") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), " Na+ ") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), " NaHCO3 ") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), " NaCO3- ") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), " NaOH ") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), "O(0) ") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), " O2 ") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), "") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), "------------------------------Saturation indices-------------------------------") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), "") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), " Phase SI** log IAP log K(298 K, 1 atm)") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), "") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), " Aragonite") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), " Calcite") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), " CH4(g)") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), " CO2(g)") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), " H2(g)") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), " H2O(g)") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), " O2(g)") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), "") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), "**For a gas, SI = log10(fugacity). Fugacity = pressure * phi / 1 atm.") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), " For ideal gases, phi = 1.") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), "") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), "------------------") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), "End of simulation.") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), "------------------") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), "") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), "------------------------------------") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), "Reading input data for simulation 2.") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), "------------------------------------") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), "") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), "----------------") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), "End of Run after ") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), "----------------") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), "") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), "") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), "") != NULL);
ASSERT_TRUE(::strstr(lines[line++].c_str(), "") != NULL);
//ASSERT_THAT(lines[line++], StartsWith("------------------------------------"));
//ASSERT_THAT(lines[line++], StartsWith("Reading input data for simulation 1."));
//ASSERT_THAT(lines[line++], StartsWith("------------------------------------"));
//ASSERT_THAT(lines[line++], StartsWith(""));
//ASSERT_THAT(lines[line++], StartsWith(" SOLUTION 1"));
//ASSERT_THAT(lines[line++], StartsWith(" C 1"));
//ASSERT_THAT(lines[line++], StartsWith(" Ca 1"));
//ASSERT_THAT(lines[line++], StartsWith(" Na 1"));
//ASSERT_THAT(lines[line++], StartsWith(" DUMP"));
//ASSERT_THAT(lines[line++], StartsWith(" -solution 1"));
//ASSERT_THAT(lines[line++], StartsWith("-------------------------------------------"));
//ASSERT_THAT(lines[line++], StartsWith("Beginning of initial solution calculations."));
//ASSERT_THAT(lines[line++], StartsWith("-------------------------------------------"));
//ASSERT_THAT(lines[line++], StartsWith(""));
//ASSERT_THAT(lines[line++], StartsWith("Initial solution 1. "));
//ASSERT_THAT(lines[line++], StartsWith(""));
//ASSERT_THAT(lines[line++], StartsWith("-----------------------------Solution composition--------"));
//ASSERT_THAT(lines[line++], StartsWith(""));
//ASSERT_THAT(lines[line++], StartsWith(" Elements Molality Moles"));
//ASSERT_THAT(lines[line++], StartsWith(""));
//ASSERT_THAT(lines[line++], StartsWith(" C "));
//ASSERT_THAT(lines[line++], StartsWith(" Ca "));
//ASSERT_THAT(lines[line++], StartsWith(" Na "));
//ASSERT_THAT(lines[line++], StartsWith(""));
//ASSERT_THAT(lines[line++], StartsWith("----------------------------Description of solution------"));
//ASSERT_THAT(lines[line++], StartsWith(""));
//ASSERT_THAT(lines[line++], StartsWith(" pH = "));
//ASSERT_THAT(lines[line++], StartsWith(" pe = "));
//ASSERT_THAT(lines[line++], StartsWith(" Activity of water = "));
//ASSERT_THAT(lines[line++], StartsWith(" Ionic strength (mol/kgw) = "));
//ASSERT_THAT(lines[line++], StartsWith(" Mass of water (kg) = "));
//ASSERT_THAT(lines[line++], StartsWith(" Total alkalinity (eq/kg) = "));
//ASSERT_THAT(lines[line++], StartsWith(" Total CO2 (mol/kg) = "));
//ASSERT_THAT(lines[line++], StartsWith(" Temperature (°C) = "));
//ASSERT_THAT(lines[line++], StartsWith(" Electrical balance (eq) = "));
//ASSERT_THAT(lines[line++], StartsWith(" Percent error, 100*(Cat-|An|)/(Cat+|An|) = "));
//ASSERT_THAT(lines[line++], StartsWith(" Iterations = "));
//ASSERT_THAT(lines[line++], StartsWith(" Total H = "));
//ASSERT_THAT(lines[line++], StartsWith(" Total O = "));
//ASSERT_THAT(lines[line++], StartsWith(""));
//ASSERT_THAT(lines[line++], StartsWith("----------------------------Distribution of species----------------------------"));
//ASSERT_THAT(lines[line++], StartsWith(""));
//ASSERT_THAT(lines[line++], StartsWith(" Log Log Log mole V"));
//ASSERT_THAT(lines[line++], StartsWith(" Species Molality Activity Molality Activity Gamma cm³/mol"));
//ASSERT_THAT(lines[line++], StartsWith(""));
//ASSERT_THAT(lines[line++], StartsWith(" OH- "));
//ASSERT_THAT(lines[line++], StartsWith(" H+ "));
//ASSERT_THAT(lines[line++], StartsWith(" H2O "));
//ASSERT_THAT(lines[line++], StartsWith("C(-4) "));
//ASSERT_THAT(lines[line++], StartsWith(" CH4 "));
//ASSERT_THAT(lines[line++], StartsWith("C(4) "));
//ASSERT_THAT(lines[line++], StartsWith(" HCO3- "));
//ASSERT_THAT(lines[line++], StartsWith(" CO2 "));
//ASSERT_THAT(lines[line++], StartsWith(" CaHCO3+ "));
//ASSERT_THAT(lines[line++], StartsWith(" CaCO3 "));
//ASSERT_THAT(lines[line++], StartsWith(" CO3-2 "));
//ASSERT_THAT(lines[line++], StartsWith(" NaHCO3 "));
//ASSERT_THAT(lines[line++], StartsWith(" NaCO3- "));
//ASSERT_THAT(lines[line++], StartsWith("Ca "));
//ASSERT_THAT(lines[line++], StartsWith(" Ca+2 "));
//ASSERT_THAT(lines[line++], StartsWith(" CaHCO3+ "));
//ASSERT_THAT(lines[line++], StartsWith(" CaCO3 "));
//ASSERT_THAT(lines[line++], StartsWith(" CaOH+ "));
//ASSERT_THAT(lines[line++], StartsWith("H(0) "));
//ASSERT_THAT(lines[line++], StartsWith(" H2 "));
//ASSERT_THAT(lines[line++], StartsWith("Na "));
//ASSERT_THAT(lines[line++], StartsWith(" Na+ "));
//ASSERT_THAT(lines[line++], StartsWith(" NaHCO3 "));
//ASSERT_THAT(lines[line++], StartsWith(" NaCO3- "));
//ASSERT_THAT(lines[line++], StartsWith(" NaOH "));
//ASSERT_THAT(lines[line++], StartsWith("O(0) "));
//ASSERT_THAT(lines[line++], StartsWith(" O2 "));
//ASSERT_THAT(lines[line++], StartsWith(""));
//ASSERT_THAT(lines[line++], StartsWith("------------------------------Saturation indices-------------------------------"));
//ASSERT_THAT(lines[line++], StartsWith(""));
//ASSERT_THAT(lines[line++], StartsWith(" Phase SI** log IAP log K(298 K, 1 atm)"));
//ASSERT_THAT(lines[line++], StartsWith(""));
//ASSERT_THAT(lines[line++], StartsWith(" Aragonite"));
//ASSERT_THAT(lines[line++], StartsWith(" Calcite"));
//ASSERT_THAT(lines[line++], StartsWith(" CH4(g)"));
//ASSERT_THAT(lines[line++], StartsWith(" CO2(g)"));
//ASSERT_THAT(lines[line++], StartsWith(" H2(g)"));
//ASSERT_THAT(lines[line++], StartsWith(" H2O(g)"));
//ASSERT_THAT(lines[line++], StartsWith(" O2(g)"));
//ASSERT_THAT(lines[line++], StartsWith(""));
//ASSERT_THAT(lines[line++], StartsWith("**For a gas, SI = log10(fugacity). Fugacity = pressure * phi / 1 atm."));
//ASSERT_THAT(lines[line++], StartsWith(" For ideal gases, phi = 1."));
//ASSERT_THAT(lines[line++], StartsWith(""));
//ASSERT_THAT(lines[line++], StartsWith("------------------"));
//ASSERT_THAT(lines[line++], StartsWith("End of simulation."));
//ASSERT_THAT(lines[line++], StartsWith("------------------"));
//ASSERT_THAT(lines[line++], StartsWith(""));
//ASSERT_THAT(lines[line++], StartsWith("------------------------------------"));
//ASSERT_THAT(lines[line++], StartsWith("Reading input data for simulation 2."));
//ASSERT_THAT(lines[line++], StartsWith("------------------------------------"));
//ASSERT_THAT(lines[line++], StartsWith(""));
//ASSERT_THAT(lines[line++], StartsWith("----------------"));
//ASSERT_THAT(lines[line++], StartsWith("End of Run after "));
//ASSERT_THAT(lines[line++], StartsWith("----------------"));
//ASSERT_THAT(lines[line++], StartsWith(""));
//ASSERT_THAT(lines[line++], StartsWith(""));
//ASSERT_THAT(lines[line++], StartsWith(""));
//ASSERT_THAT(lines[line++], StartsWith(""));
if (::FileExists(OUTPUT_FILENAME))
{