Skip to content

Refactor main#182

Merged
cm-beilstein merged 54 commits intodevfrom
refactor_main
Feb 19, 2026
Merged

Refactor main#182
cm-beilstein merged 54 commits intodevfrom
refactor_main

Conversation

@cm-beilstein
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

@JanCBrammer JanCBrammer force-pushed the dev branch 5 times, most recently from d339ef5 to 11a8798 Compare February 17, 2026 12:13
@cm-beilstein cm-beilstein merged commit 99d317d into dev Feb 19, 2026
2 checks passed
@cm-beilstein cm-beilstein deleted the refactor_main branch February 19, 2026 09:14
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