Correctness testing with TOML#1682
Conversation
This fixes the last three round trip issues with TOML. I've marked those tests as working.
This should probably be cleaned up later
trisyoungs
left a comment
There was a problem hiding this comment.
All looks good. Those failing tests are somewhat annoying, though!
Couple of comments, nothing major.
| CoreData other_; | ||
| Dissolve trial_{other_}; |
There was a problem hiding this comment.
These names are perhaps a bit too generic! I might suggest:
| CoreData other_; | |
| Dissolve trial_{other_}; | |
| CoreData otherCoreData_; | |
| Dissolve otherDissolve_{otherCoreData_}; |
There was a problem hiding this comment.
I've gone ahead and renamed them otherCoreData and otherDissolve. I dropped the trailing underscore because these aren't members of the class, but just variables in the function.
| std::vector<std::shared_ptr<AtomType>> &types) | ||
| : range_(range), delta_(delta), atomTypeChargeSource_(source), atomTypes_(types), | ||
| coulombTruncationScheme_(PairPotential::coulombTruncationScheme_), | ||
| SerializablePairPotential::SerializablePairPotential(double &range, double &delta, bool &source, bool &forceCharge, |
There was a problem hiding this comment.
Do we still need the SerializablePairPotential class? It feels like its just wrapping functionality that could be added into Dissolve::serialise() and Dissolve::deserialise()...
There was a problem hiding this comment.
I agree that we need to review SerializablePairPotential, as I'm increasingly unhappy with the design. However, I'm not sure that Dissolve is the right place for it, either. I'll add an issue for it and we can review that before the final TOML addition.
Now that TOML properly performs the round trip, we need to test for correctness. This PR performs the following changes
a. We still perform the round trip testing to prevent regressions
b. Tests tagged with TomlFailure only run the original input file unless the toml testing flag is activated. This marks the 17 tests currently failing under TOML