-
Notifications
You must be signed in to change notification settings - Fork 21
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
Bugfix: enable variable serialisation in unnamed component #71
Conversation
good catch @hsorby :) the new tests and fixed implementation look good to me. |
"<component>" | ||
"<variable name=\"var1\" units=\"dimensionless\"/>" | ||
"<variable name=\"var2\"/>" | ||
"<variable name=\"var3\"/>" |
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.
It might be worth having one of these with only units, or only initial_value, and no name, so more combinations are checked?
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.
+1
Otherwise, I would indent the 'variable' lines.
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.
Good idea, @jonc125 , as a way to pick up more permutations in a single test. This bugfix pull actually pre-dates the addition of initial values so will add those in under that pull set. :-)
Besides the above minor comments and Jonathan's suggestion, it all looks good to me too. |
|
||
libcellml::UnitsPtr u = std::make_shared<libcellml::Units>(); | ||
u->setName("dimensionless"); | ||
v1->setUnits(u); | ||
v3->setUnits(u); |
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.
Tabs instead of spaces issue?
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.
Good catch- fixed in d5ddf20
So I believe all issues here are resolved, so I'll merge it in to avoid conflicts in #68. |
@hsorby highlighted a bug from pull #64 by submitting a failing test. A nested if statement prevented serialisation of variables in unnamed components.
Relevant to issue #63