File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -391,6 +391,26 @@ void break_test(void) {
391
391
equeue_destroy (& q );
392
392
}
393
393
394
+ void break_no_windup_test (void ) {
395
+ equeue_t q ;
396
+ int err = equeue_create (& q , 2048 );
397
+ test_assert (!err );
398
+
399
+ int count = 0 ;
400
+ equeue_call_every (& q , 0 , simple_func , & count );
401
+
402
+ equeue_break (& q );
403
+ equeue_break (& q );
404
+ equeue_dispatch (& q , -1 );
405
+ test_assert (count == 1 );
406
+
407
+ count = 0 ;
408
+ equeue_dispatch (& q , 55 );
409
+ test_assert (count > 1 );
410
+
411
+ equeue_destroy (& q );
412
+ }
413
+
394
414
void period_test (void ) {
395
415
equeue_t q ;
396
416
int err = equeue_create (& q , 2048 );
@@ -741,6 +761,7 @@ int main() {
741
761
test_run (cancel_unnecessarily_test );
742
762
test_run (loop_protect_test );
743
763
test_run (break_test );
764
+ test_run (break_no_windup_test );
744
765
test_run (period_test );
745
766
test_run (nested_test );
746
767
test_run (sloth_test );
You can’t perform that action at this time.
0 commit comments