Skip to content

Commit e035e5d

Browse files
committed
Fixed unit tests (frees), bug fixes for MolfileV3000ReadCollections, get_periodic_table_number and CreateInpAtom
1 parent 0575f08 commit e035e5d

File tree

8 files changed

+1000
-761
lines changed

8 files changed

+1000
-761
lines changed

CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,14 @@ set(CMAKE_C_STANDARD 99)
66
set(CMAKE_CXX_STANDARD 11)
77
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
88

9+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address")
10+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address")
11+
912
include(FetchContent)
1013
FetchContent_Declare(
1114
googletest
1215
GIT_REPOSITORY https://github.com/google/googletest.git
13-
GIT_TAG v1.17.0
16+
GIT_TAG v1.17.0
1417
)
1518
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
1619
FetchContent_MakeAvailable(googletest)

INCHI-1-SRC/INCHI_BASE/src/mol2atom.c

Lines changed: 462 additions & 492 deletions
Large diffs are not rendered by default.

INCHI-1-SRC/INCHI_BASE/src/mol_fmt1.c

Lines changed: 40 additions & 70 deletions
Large diffs are not rendered by default.

INCHI-1-SRC/INCHI_BASE/src/mol_fmt3.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,8 @@ int MolfileV3000ReadCollections(MOL_FMT_CTAB *ctab,
651651
{
652652
char field[MOL_FMT_V3000_MAXFIELDLEN];
653653
const int max_field_len = sizeof(field);
654-
int nread, len, n_coll;
654+
int nread, len;
655+
int n_coll = 0;
655656
int failed = 0;
656657
int nc;
657658
char *p = NULL, *line = NULL;
@@ -766,14 +767,17 @@ int MolfileV3000ReadCollections(MOL_FMT_CTAB *ctab,
766767
if (stereo_kind == MOL_FMT_V3000_STEABS)
767768
{
768769
ctab->v3000->n_steabs++;
770+
ctab->v3000->n_collections++;
769771
}
770772
else if (stereo_kind == MOL_FMT_V3000_STEREL)
771773
{
772774
ctab->v3000->n_sterel++;
775+
ctab->v3000->n_collections++;
773776
}
774777
else if (stereo_kind == MOL_FMT_V3000_STERAC)
775778
{
776779
ctab->v3000->n_sterac++;
780+
ctab->v3000->n_collections++;
777781
}
778782
}
779783
}

0 commit comments

Comments
 (0)