utilities
utilities copied to clipboard
Increase test coverage
Any new PR should be accompanied by relevant tests. However, large portions of the libraries are as of yet untested. Any PRs improving test coverage of existing code are welcome.
Keep the following things in mind when creating tests:
- Follow existing practices to keep the style of tests consistent. This is a good example to start from.
- Consider using property tests wherever possible, as they ensure our code does not only work for a set of hand-picked values.
- Focus on testing behaviours rather than specific members.
- Refactoring code as part of adding tests is allowed and encouraged, though consider verifying breaking changes before making them.
- Consider creating a draft PR before starting to indicate you are working on the tests for a specific class. Likewise, check if there aren't any open PRs for the class you want to test ahead of starting work.
If you are unsure what class to test, but are interested to help, feel free to reply below and we're happy to get you going.
See below a list of all namespaces and types and their coverage (at time of writing, but let's see if we can keep it updated), in case you don't have your own coverage tool.
🚧 22% Bearded.Utilities
- [ ] 0% AsyncAtomicUpdating<T>
- [ ] 0% Box<T>
- [ ] 0% Do
- [ ] 0% Environment
- [ ] 0% Id<T>
- [ ] 0% IdManager
- [ ] 0% Interpolate
- [ ] 2% MathExtensions
- [ ] 0% Mathf
- [ ] 94% Maybe<T>
- [x] 100% Maybe
- [ ] 0% MoreMath
- [x] 100% RandomExtensions
- [ ] 0% ResettableLazy
- [ ] 0% ResettableLazy<T>
- [ ] 0% Singleton<TSelf>
- [x] 100% StaticRandom
- [ ] 0% Void
🚧 89% Bearded.Utilities.Algorithms
- [ ] 84% BinPacking
- [x] 100% PositionedRectangle<T>
- [x] 100% Rectangle<T>
- [x] 100% Result<T>
- [ ] 95% Tree<T>
- [x] 100% Node
- [ ] 95% CoffmanGraham
- [x] 100% ArbitraryGraphSolver
- [ ] 83% DecreasingNumberSequence
- [x] 100% ReducedGraphSolver
- [ ] 91% HungarianAlgorithm
🚧 62% Bearded.Utilities.Collections
- [ ] 98% DeletableObjectList<T>
- [ ] 97% DeletableObjectListEnumerator<T>
- [ ] 0% IdDictionary<T>
- [ ] 0% MutableLinkedList<T>
- [ ] 0% MutableLinkedListEnumerator<T>
- [ ] 0% MutableLinkedListNode
- [ ] 0% MutableLinkedListNode<T>
- [ ] 80% PrefixTrie
- [x] 100% Node
- [ ] 91% PriorityQueue<TPriority,TValue>
- [ ] 99% StaticPriorityQueue<TPriority,TValue>
🚧 21% Bearded.Utilities.Geometry
- [ ] 18% Angle
- [ ] 0% Arc<T>
- [ ] 0% Arc2
- [ ] 0% Arc3
- [ ] 0% Bezier2nd2
- [ ] 0% Bezier2nd3
- [ ] 0% Bezier3rd2
- [ ] 0% Bezier3rd3
- [ ] 88% CircularArc2
- [ ] 39% Direction2
- [ ] 33% GeometryExtensions
- [ ] 0% Interval
- [ ] 0% PolarPosition
- [ ] 0% Rectangle
⬤ ✅ 100% Bearded.Utilities.Graphs
⛔ 0% Bearded.Utilities.Input
- [ ] 0% GamePadStateManager
- [ ] 0% InputAction
- [ ] 0% AnyAction
- [ ] 0% BinaryAction
- [ ] 0% OrAction
- [ ] 0% InputManager
- [ ] 0% ActionConstructor
- [ ] 0% KeyboardActions
- [ ] 0% MouseActions
- [ ] 0% KeyboardEvents
⛔ 0% Bearded.Utilities.Input.Actions
- [ ] 0% DeferredAction
- [ ] 0% LambdaAction
- [ ] 0% DigitalAction
- [ ] 0% DummyAction
- [ ] 0% KeyboardAction
- [ ] 0% MouseButtonAction
⛔ 0% Bearded.Utilities.IO
- [ ] 0% FileModifiedWatcher
- [ ] 0% Logger
- [ ] 0% Entry
- [ ] 0% Writer
🚧 32% Bearded.Utilities.Linq
- [ ] 32% Extensions
🚧 85% Bearded.Utilities.Monads
- [x] 100% Failure<T>
- [ ] 89% Result<TResult,TError>
- [ ] 50% Result
- [x] 100% Success<T>
🚧 8% Bearded.Utilities.SpaceTime
- [ ] 16% Acceleration
- [ ] 10% Acceleration2
- [ ] 0% Acceleration3
- [ ] 0% AddDimensionExtensions
- [ ] 0% AngularAcceleration
- [ ] 0% AngularVelocity
- [ ] 20% Difference2
- [ ] 0% Difference3
- [ ] 17% Extensions
- [ ] 0% Frequency
- [x] 100% GravitationalConstant
- [ ] 0% Instant
- [ ] 14% Mass
- [ ] 0% Position2
- [ ] 0% Position3
- [ ] 0% Speed
- [ ] 23% Squared<T>
- [ ] 0% TimeSpan
- [ ] 13% Unit
- [ ] 0% Velocity2
- [ ] 0% Velocity3
⛔ 0% Bearded.Utilities.Threading
- [ ] 0% BackgroundActionQueue
- [ ] 0% ManualActionQueue
⛔ 0% Bearded.Utilities.Tilemaps
- [ ] 0% Step
🚧 32% Bearded.Utilities.Tilemaps.Rectangular
- [ ] 0% Extensions
- [ ] 34% Tile<TTileValue>
- [ ] 68% Tilemap<TTileValue>
I would like to do part of this issue, maybe starting with Bearded.Utilities.Linq. Is it ok?
@MaurizioPz Hey, definitely! Feel free to submit a PR for a class at a time, or in the case of the Linq extensions perhaps even per method, if it's one of the more complex ones. :)