You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Say I develop a package which provides a type Angle. As part of my test suite for my package I have created generators for this type like
extensionAnyAngleonAny {
/// Generates a [Angle] in a certain range.Generator<Angle> angleInRange(double min, double max) {
assert(min >=-180);
assert(min < max);
assert(max <=180);
return any.doubleInRange(min, max).map(Angle.makeFrom180);
}
/// Generates a [Angle] in the full possible range.Generator<Angle> get angle =>angleInRange(-180, 180);
}
What is the intended way for me to share these generators with consumers of my package, so that they may use them in their unit tests?
I understand that this is more of a general dart question, but I was curious what you people here think about this question. For glados, providing generators along with types could be seen as part of the package interface.
Edit: This is more of a discussion than an issue. If the repo opens a discussion tab, then we can move the issue there.
The text was updated successfully, but these errors were encountered:
Say I develop a package which provides a type
Angle
. As part of my test suite for my package I have created generators for this type likeWhat is the intended way for me to share these generators with consumers of my package, so that they may use them in their unit tests?
I understand that this is more of a general dart question, but I was curious what you people here think about this question. For glados, providing generators along with types could be seen as part of the package interface.
Edit: This is more of a discussion than an issue. If the repo opens a discussion tab, then we can move the issue there.
The text was updated successfully, but these errors were encountered: