Skip to content
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

Merged
merged 6 commits into from
Apr 13, 2016

Conversation

dladd
Copy link
Contributor

@dladd dladd commented Apr 12, 2016

@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

@nickerso
Copy link
Contributor

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\"/>"
Copy link
Contributor

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?

Copy link
Contributor

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.

Copy link
Contributor Author

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. :-)

@agarny
Copy link
Contributor

agarny commented Apr 12, 2016

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);
Copy link
Contributor

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?

Copy link
Contributor Author

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

@nickerso
Copy link
Contributor

So I believe all issues here are resolved, so I'll merge it in to avoid conflicts in #68.

@nickerso nickerso merged commit 7219625 into cellml:develop Apr 13, 2016
dladd added a commit to dladd/libcellml that referenced this pull request Apr 13, 2016
@dladd dladd deleted the usecase_1xi branch May 17, 2016 01:04
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.

5 participants