@@ -556,7 +556,7 @@ class TestICDManager
556
556
NL_TEST_ASSERT (aSuite, ctx->mICDManager .mOperationalState == ICDManager::OperationalState::ActiveMode);
557
557
558
558
// Advance time by the ActiveModeDuration - 1
559
- AdvanceClockAndRunEventLoop (ctx, icdConfigData.GetActiveModeDuration () - 1_ms );
559
+ AdvanceClockAndRunEventLoop (ctx, icdConfigData.GetActiveModeDuration () - 1_ms32 );
560
560
// Confirm ICD manager is in active mode
561
561
NL_TEST_ASSERT (aSuite, ctx->mICDManager .mOperationalState == ICDManager::OperationalState::ActiveMode);
562
562
@@ -567,48 +567,48 @@ class TestICDManager
567
567
NL_TEST_ASSERT (aSuite, stayActivePromisedMs == stayActiveRequestedMs);
568
568
569
569
// Advance time by the duration of the stay stayActiveRequestedMs - 1 ms
570
- AdvanceClockAndRunEventLoop (ctx, System::Clock::Milliseconds32 (stayActiveRequestedMs) - 1_ms );
570
+ AdvanceClockAndRunEventLoop (ctx, System::Clock::Milliseconds32 (stayActiveRequestedMs) - 1_ms32 );
571
571
// Confirm ICD manager is in active mode
572
572
NL_TEST_ASSERT (aSuite, ctx->mICDManager .mOperationalState == ICDManager::OperationalState::ActiveMode);
573
573
574
574
// Advance time by 1ms and Confirm ICD manager is in idle mode
575
- AdvanceClockAndRunEventLoop (ctx, 1_ms );
575
+ AdvanceClockAndRunEventLoop (ctx, 1_ms32 );
576
576
NL_TEST_ASSERT (aSuite, ctx->mICDManager .mOperationalState == ICDManager::OperationalState::IdleMode);
577
577
578
578
// Trigger a subscription report Put the ICD manager into active mode
579
579
notifier.NotifySubscriptionReport ();
580
580
NL_TEST_ASSERT (aSuite, ctx->mICDManager .mOperationalState == ICDManager::OperationalState::ActiveMode);
581
581
582
582
// Advance time by the duration of the stay active request - 1 ms
583
- AdvanceClockAndRunEventLoop (ctx, icdConfigData.GetActiveModeDuration () - 1_ms );
583
+ AdvanceClockAndRunEventLoop (ctx, icdConfigData.GetActiveModeDuration () - 1_ms32 );
584
584
stayActiveRequestedMs = 35000 ;
585
585
// Send a stay active request for 35 seconds, which is higher than the maximum stay active duration (30 seconds)
586
586
stayActivePromisedMs = ctx->mICDManager .StayActiveRequest (stayActiveRequestedMs);
587
587
// confirm the promised time is the maximum stay active duration (30 seconds)
588
588
NL_TEST_ASSERT (aSuite, stayActivePromisedMs == 30000 );
589
589
590
590
// Advance time by the duration of the max stay active duration - 1 ms
591
- AdvanceClockAndRunEventLoop (ctx, System::Clock::Milliseconds32 (30000 ) - 1_ms );
591
+ AdvanceClockAndRunEventLoop (ctx, System::Clock::Milliseconds32 (30000 ) - 1_ms32 );
592
592
NL_TEST_ASSERT (aSuite, ctx->mICDManager .mOperationalState == ICDManager::OperationalState::ActiveMode);
593
593
594
594
// Advance time by 1ms and Confirm ICD manager is in idle mode
595
- AdvanceClockAndRunEventLoop (ctx, 1_ms );
595
+ AdvanceClockAndRunEventLoop (ctx, 1_ms32 );
596
596
NL_TEST_ASSERT (aSuite, ctx->mICDManager .mOperationalState == ICDManager::OperationalState::IdleMode);
597
597
598
598
// Trigger a subscription report Put the ICD manager into active mode
599
599
notifier.NotifySubscriptionReport ();
600
600
NL_TEST_ASSERT (aSuite, ctx->mICDManager .mOperationalState == ICDManager::OperationalState::ActiveMode);
601
601
602
602
// Advance time by the duration of the stay active request - 1 ms
603
- AdvanceClockAndRunEventLoop (ctx, icdConfigData.GetActiveModeDuration () - 1_ms );
603
+ AdvanceClockAndRunEventLoop (ctx, icdConfigData.GetActiveModeDuration () - 1_ms32 );
604
604
stayActiveRequestedMs = 30000 ;
605
605
// Send a stay active request for 30 seconds
606
606
stayActivePromisedMs = ctx->mICDManager .StayActiveRequest (stayActiveRequestedMs);
607
607
// confirm the promised time is the same as the requested time
608
608
NL_TEST_ASSERT (aSuite, stayActivePromisedMs == 30000 );
609
609
610
610
// Advance time by the duration of the stay active request - 20000 ms
611
- AdvanceClockAndRunEventLoop (ctx, System::Clock::Milliseconds32 (stayActiveRequestedMs) - 20000_ms );
611
+ AdvanceClockAndRunEventLoop (ctx, System::Clock::Milliseconds32 (stayActiveRequestedMs) - 20000_ms32 );
612
612
// Confirm ICD manager is in active mode, we should have 20000 seconds left at that point
613
613
NL_TEST_ASSERT (aSuite, ctx->mICDManager .mOperationalState == ICDManager::OperationalState::ActiveMode);
614
614
0 commit comments