Refactors and adds tests for the data class#76
Refactors and adds tests for the data class#76DrPaulSharp merged 2 commits intoRascalSoftware:masterfrom
Conversation
6ffed02 to
e7ca9ab
Compare
e7ca9ab to
1e7a1f2
Compare
| if dataRange(1) > dataRange(2) | ||
| warning('Data range min must not be greater than max - resetting'); | ||
| dataRange(1) = realDataRange(1); | ||
| dataRange(2) = realDataRange(2); |
There was a problem hiding this comment.
This relies on dataX being sorted. I know we discussed this in the meeting and it should be fine, but what are the problems if it isn't?
There was a problem hiding this comment.
might be good to throw an exception if realDataRange(1) > realDataRange(2)
There was a problem hiding this comment.
Bingo! Sounds like a plan to me.
There was a problem hiding this comment.
What's the best exception for this? I am think of renaming the invalidOption to invalidValue
There was a problem hiding this comment.
invalidOption is for exceptions like "Model Type has to be Standard Layers, Custom Layers or Custom XY" - I'd keep that one as it is. This feels like a new exception to me, so maybe add invalidValue?
There was a problem hiding this comment.
An invalidOption is basically and invalidValue for an Enum but its okay to separate out
Added tests for the DataClass. Refactors both "DataClass.m" and calling routines in "projectClass.m"