Open
Conversation
HansOlsson
reviewed
Aug 4, 2025
| #include <assert.h> | ||
| #include <string.h> | ||
|
|
||
| typedef enum { |
Contributor
There was a problem hiding this comment.
Wouldn't it have made more sense to move the other ModelicaFileType declaration from ModelicaInternal.c to ModelicaInternal.h and re-use that?
Basically, I don't like such code duplication.
HansOlsson
reviewed
Aug 4, 2025
Contributor
HansOlsson
left a comment
There was a problem hiding this comment.
The general idea is good, but:
- Would like some feedback on the enum.
- In case an assert triggers the program will not clean up afterwards. Fixing that would be complicated, as the used primitives (e.g., ModelicaInternal_mkdir) can also fail. Just a comment saying that in case the test fails you should delete directories abc and xyz before attempting again might suffice.
Member
Author
I am not sure if ModelicaFileType is meant to be public. For testability I simply copied it.
Indeed, the current testing setup is not good enough and does not support initialization or cleanup steps. A proper testing framework (e.g. Modelica_DeviveDrivers and ModelicaTableAdditions use GoogleTest) might solve the issue. But this is out of scope of this PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.