Open mihir1906 opened 1 month ago
Lets try to maintain the order of the tests w.r.t the code in the function. Currently I see the tests for expected type in
typed_get
function are written first however that line is written by the end of the function.Before that many other tests for other LOCs could have been written. Easy to read and check if all the conditions are covered.
For e.g.: test 6 could be the first one as its the simplest execution of the function.
Lets also check if the test actually adds any value w.r.t the functionality of the function being tested.
I've reordered the tests to follow the function’s code execution flow and ensured each test case is valuable for verifying different aspects of the function. This should improve readability and coverage.
@gpsaggese @samarth9008 @DanilYachmenev I just wanted to kindly follow up on this PR and see if you had a chance to review it. If there are any changes or additional details you'd like me to address, I’d be happy to make those adjustments.
Created this PR for the issue #1119.
Changes Made: Added unit tests for typed_get() and checked_get().
Testing:
@samarth9008 @sonaalKant @DanilYachmenev please do let me know incase of any further suggestions/changes.