Adding support for chem units

This commit is contained in:
Michael Tryby
2018-08-14 11:10:27 -04:00
parent 8ff88f86b8
commit 606101af89
6 changed files with 89 additions and 131 deletions

BIN
tests/data/example1.out Normal file

Binary file not shown.

View File

@@ -22,7 +22,7 @@
#include "epanet_output.h"
#define DATA_PATH "./net1.out"
#define DATA_PATH "./example1.out"
using namespace std;
@@ -142,6 +142,15 @@ BOOST_FIXTURE_TEST_CASE(test_getNetSize, Fixture)
ENR_free((void**)&i_array);
}
BOOST_FIXTURE_TEST_CASE(test_getUnits, Fixture) {
int flag;
error = ENR_getUnits(p_handle, ENR_chemUnits, &flag);
BOOST_REQUIRE(error == 0);
BOOST_CHECK_EQUAL(flag, ENR_MGL);
}
BOOST_FIXTURE_TEST_CASE(test_getElementName, Fixture) {
char* name = new char[MAXID];
int length, index = 1;