[iphreeqc] Closes #29 (#30)

* [iphreeqc] Closes usgs-coupled/iphreeqc#29
* [iphreeqc] Fixes iphreeqc-unit-linux-git
This commit is contained in:
Charlton, Scott R 2023-03-07 19:00:55 -07:00 committed by GitHub
parent 1385350be1
commit 399a3fe2b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 4 deletions

View File

@ -6,6 +6,8 @@
#include <stdio.h>
#endif
#include "Phreeqc.h" /* snprintf */
#if defined(_WIN32) || defined(__CYGWIN32__)
bool FileExists(const char *szPathName)
{

View File

@ -2,6 +2,7 @@
#include <gtest/gtest.h>
#include "IPhreeqc.h"
#include "Phreeqc.h" /* snprintf */
#include "CVar.hxx"
#if defined(_WIN32)

View File

@ -6,6 +6,8 @@
#include <stdio.h>
#endif
#include "Phreeqc.h" /* snprintf */
#if defined(_WIN32) || defined(__CYGWIN32__)
bool FileExists(const char *szPathName)
{

View File

@ -2161,7 +2161,7 @@ void TestIPhreeqc::TestSetOutputFileName(void)
CPPUNIT_ASSERT( ::strstr(lines[line++].c_str(), " Mass of water (kg) = ") != NULL );
CPPUNIT_ASSERT( ::strstr(lines[line++].c_str(), " Total alkalinity (eq/kg) = ") != NULL );
CPPUNIT_ASSERT( ::strstr(lines[line++].c_str(), " Total CO2 (mol/kg) = ") != NULL );
CPPUNIT_ASSERT( ::strstr(lines[line++].c_str(), " Temperature (<EFBFBD>C) = ") != NULL );
CPPUNIT_ASSERT( ::strstr(lines[line++].c_str(), " Temperature (°C) = ") != NULL );
CPPUNIT_ASSERT( ::strstr(lines[line++].c_str(), " Electrical balance (eq) = ") != NULL );
CPPUNIT_ASSERT( ::strstr(lines[line++].c_str(), " Percent error, 100*(Cat-|An|)/(Cat+|An|) = ") != NULL );
CPPUNIT_ASSERT( ::strstr(lines[line++].c_str(), " Iterations = ") != NULL );
@ -2171,7 +2171,7 @@ void TestIPhreeqc::TestSetOutputFileName(void)
CPPUNIT_ASSERT( ::strstr(lines[line++].c_str(), "----------------------------Distribution of species----------------------------") != NULL );
CPPUNIT_ASSERT( ::strstr(lines[line++].c_str(), "") != NULL );
CPPUNIT_ASSERT( ::strstr(lines[line++].c_str(), " Log Log Log mole V") != NULL );
CPPUNIT_ASSERT( ::strstr(lines[line++].c_str(), " Species Molality Activity Molality Activity Gamma cm<EFBFBD>/mol")!= NULL );
CPPUNIT_ASSERT( ::strstr(lines[line++].c_str(), " Species Molality Activity Molality Activity Gamma cm³/mol") != NULL);
CPPUNIT_ASSERT( ::strstr(lines[line++].c_str(), "") != NULL );
CPPUNIT_ASSERT( ::strstr(lines[line++].c_str(), " OH- ") != NULL );
CPPUNIT_ASSERT( ::strstr(lines[line++].c_str(), " H+ ") != NULL );

View File

@ -1,6 +1,7 @@
// -*- coding: windows-1252 -*-
#include "TestIPhreeqcLib.h"
#include "IPhreeqc.h"
#include "Phreeqc.h" /* snprintf */
#include "CVar.hxx"
#if defined(_WIN32)
@ -2465,7 +2466,7 @@ void TestIPhreeqcLib::TestSetOutputFileName(void)
CPPUNIT_ASSERT( ::strstr(lines[line++].c_str(), " Mass of water (kg) = ") != NULL );
CPPUNIT_ASSERT( ::strstr(lines[line++].c_str(), " Total alkalinity (eq/kg) = ") != NULL );
CPPUNIT_ASSERT( ::strstr(lines[line++].c_str(), " Total CO2 (mol/kg) = ") != NULL );
CPPUNIT_ASSERT( ::strstr(lines[line++].c_str(), " Temperature (<EFBFBD>C) = ") != NULL );
CPPUNIT_ASSERT( ::strstr(lines[line++].c_str(), " Temperature (°C) = ") != NULL);
CPPUNIT_ASSERT( ::strstr(lines[line++].c_str(), " Electrical balance (eq) = ") != NULL );
CPPUNIT_ASSERT( ::strstr(lines[line++].c_str(), " Percent error, 100*(Cat-|An|)/(Cat+|An|) = ") != NULL );
CPPUNIT_ASSERT( ::strstr(lines[line++].c_str(), " Iterations = ") != NULL );
@ -2475,7 +2476,7 @@ void TestIPhreeqcLib::TestSetOutputFileName(void)
CPPUNIT_ASSERT( ::strstr(lines[line++].c_str(), "----------------------------Distribution of species----------------------------") != NULL );
CPPUNIT_ASSERT( ::strstr(lines[line++].c_str(), "") != NULL );
CPPUNIT_ASSERT( ::strstr(lines[line++].c_str(), " Log Log Log mole V") != NULL );
CPPUNIT_ASSERT( ::strstr(lines[line++].c_str(), " Species Molality Activity Molality Activity Gamma cm<EFBFBD>/mol")!= NULL );
CPPUNIT_ASSERT( ::strstr(lines[line++].c_str(), " Species Molality Activity Molality Activity Gamma cm³/mol")!= NULL);
CPPUNIT_ASSERT( ::strstr(lines[line++].c_str(), "") != NULL );
CPPUNIT_ASSERT( ::strstr(lines[line++].c_str(), " OH- ") != NULL );
CPPUNIT_ASSERT( ::strstr(lines[line++].c_str(), " H+ ") != NULL );