mirror of
https://git.gfz-potsdam.de/naaice/iphreeqc.git
synced 2025-12-15 16:18:22 +01:00
git-svn-id: svn://136.177.114.72/svn_GW/IPhreeqc/trunk@4344 1feff8c3-07ed-0310-ac33-dd36852eb9cd
50 lines
965 B
C++
50 lines
965 B
C++
#include <iostream>
|
|
#include <cassert>
|
|
|
|
#include <IPhreeqc.hpp>
|
|
|
|
int main(int argc, char* argv[])
|
|
{
|
|
IPhreeqc obj;
|
|
|
|
assert(obj.GetOutputOn() == false);
|
|
obj.SetOutputOn(true);
|
|
assert(obj.GetOutputOn() == true);
|
|
|
|
assert(obj.GetErrorOn() == false);
|
|
obj.SetErrorOn(true);
|
|
assert(obj.GetErrorOn() == true);
|
|
|
|
assert(obj.GetSelectedOutputOn() == false);
|
|
obj.SetSelectedOutputOn(true);
|
|
assert(obj.GetSelectedOutputOn() == true);
|
|
|
|
assert(obj.GetDumpOn() == false);
|
|
obj.SetDumpOn(true);
|
|
assert(obj.GetDumpOn() == true);
|
|
|
|
assert(obj.GetDumpStringOn() == false);
|
|
obj.SetDumpStringOn(true);
|
|
assert(obj.GetDumpStringOn() == true);
|
|
|
|
assert(obj.GetLogOn() == false);
|
|
obj.SetLogOn(true);
|
|
assert(obj.GetLogOn() == true);
|
|
|
|
|
|
if (obj.LoadDatabase("phreeqc.dat"))
|
|
{
|
|
goto error;
|
|
}
|
|
if (obj.RunFile("ex1"))
|
|
{
|
|
goto error;
|
|
}
|
|
std::cout << "Ok\n";
|
|
return 0;
|
|
error:
|
|
std::cout << obj.GetErrorString();
|
|
return 1;
|
|
}
|
|
|