Skip to content

Conversation

@cm-beilstein
Copy link
Collaborator

To resolve #177, I had to decouple a series of functions from main to a separate file. This makes it possible to create dedicated unit tests for each function. The functions were moved to ichimain.c in INCHI-1-SRC/INCHI_BASE/src. The main was placed in a file called main.c and left in the original directory INCHI-1-SRC/INCHI_EXE/inchi-1/src. Unit tests (test_ichimain.cpp), testing the "happy-path", were created to ensure normal functionality.

Copy link
Collaborator

@JanCBrammer JanCBrammer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lines are (partly) commented out in many places to change the semantics of the code. I feel like it's preferable to remove code instead of commenting it out. Down the line, commented-out code is confusing since it's not clear why it has been commented out.

@cm-beilstein
Copy link
Collaborator Author

Lines are (partly) commented out in many places to change the semantics of the code. I feel like it's preferable to remove code instead of commenting it out. Down the line, commented-out code is confusing since it's not clear why it has been commented out.

Removed commented lines. I only kept the commented function headers, because it gives you an easier overview of the required parameters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Decouple main from ichimain

3 participants