Fix functions order check in Task class dtor#380
Fix functions order check in Task class dtor#380allnes merged 4 commits intolearning-process:masterfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR addresses an issue with the order check of functions in the Task class destructor. The changes introduce a validation in the destructor that compares the current functions order with the expected order and terminates the program with an error message if they do not match.
- Added conditional check in the destructor to compare functions order
- Added an error message and program termination when the order is incorrect
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@allnes please take a look one more time, I have reworked the checker solution |
|
@aobolensk please provide test case of student which show that new scheme is worked (we discussed it as I remember) and we have 1 test for wrong order |
Unfortunately, this test case cannot be added in unit tests, cause now it causes The task case is basically the following: you create |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #380 +/- ##
==========================================
- Coverage 94.94% 93.49% -1.46%
==========================================
Files 26 26
Lines 495 507 +12
Branches 145 149 +4
==========================================
+ Hits 470 474 +4
- Misses 12 18 +6
- Partials 13 15 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Eventually, I have created a test case for that #386 |
Prevent creating
Taskclass with public API usage ignored by checking for invalid API calls order (or its absence) in dtor