-
Notifications
You must be signed in to change notification settings - Fork 19
Refactor main #182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Refactor main #182
Conversation
JanCBrammer
left a comment
There was a problem hiding this 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.
Removed commented lines. I only kept the commented function headers, because it gives you an easier overview of the required parameters. |
…into refactor_main
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.