AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Classes | Namespaces | Functions | Variables
TimerTest.cpp File Reference
#include <deque>
#include <gtest/gtest.h>
#include <AVSCommon/Utils/Timing/Timer.h>
Include dependency graph for TimerTest.cpp:

Classes

class  alexaClientSDK::avsCommon::utils::timing::test::TimerTest
 Test harness for Timer class. More...
 

Namespaces

 alexaClientSDK
 Whether or not curl logs should be emitted.
 
 alexaClientSDK::avsCommon
 
 alexaClientSDK::avsCommon::utils
 
 alexaClientSDK::avsCommon::utils::timing
 
 alexaClientSDK::avsCommon::utils::timing::test
 

Functions

 alexaClientSDK::avsCommon::utils::timing::test::TEST_F (TimerTest, testTimer_singleShot)
 This test runs a single-shot timer and verifies that the task is called once, at the expected time. More...
 
 alexaClientSDK::avsCommon::utils::timing::test::TEST_F (TimerTest, testTimer_multiShot)
 
 alexaClientSDK::avsCommon::utils::timing::test::TEST_F (TimerTest, testTimer_multiShotWithDelay)
 
 alexaClientSDK::avsCommon::utils::timing::test::TEST_F (TimerTest, testTimer_forever)
 
 alexaClientSDK::avsCommon::utils::timing::test::TEST_F (TimerTest, testTimer_slowTaskLessThanPeriod)
 
 alexaClientSDK::avsCommon::utils::timing::test::TEST_F (TimerTest, testTimer_slowTaskGreaterThanPeriod)
 
 alexaClientSDK::avsCommon::utils::timing::test::TEST_F (TimerTest, testTimer_slowTaskGreaterThanTwoPeriods)
 
 alexaClientSDK::avsCommon::utils::timing::test::TEST_F (TimerTest, testTimer_endToStartPeriod)
 
 alexaClientSDK::avsCommon::utils::timing::test::TEST_F (TimerTest, testTimer_stopSingleShotBeforeTask)
 
 alexaClientSDK::avsCommon::utils::timing::test::TEST_F (TimerTest, testTimer_stopSingleShotDuringTask)
 
 alexaClientSDK::avsCommon::utils::timing::test::TEST_F (TimerTest, testTimer_stopSingleShotAfterTask)
 
 alexaClientSDK::avsCommon::utils::timing::test::TEST_F (TimerTest, testTimer_stopMultiShot)
 
 alexaClientSDK::avsCommon::utils::timing::test::TEST_F (TimerTest, testTimer_startRunningBeforeTask)
 
 alexaClientSDK::avsCommon::utils::timing::test::TEST_F (TimerTest, testTimer_startRunningDuringTask)
 
 alexaClientSDK::avsCommon::utils::timing::test::TEST_F (TimerTest, testTimer_startRunningAfterTask)
 
 alexaClientSDK::avsCommon::utils::timing::test::TEST_F (TimerTest, test_deleteBeforeTask)
 This test verifies that a timer which is deleted while active, but before running its task, does not run the task. More...
 
 alexaClientSDK::avsCommon::utils::timing::test::TEST_F (TimerTest, testTimer_deleteDuringTask)
 This test verifies that a timer which is deleted while running a task completes the task. More...
 
 alexaClientSDK::avsCommon::utils::timing::test::TEST_F (TimerTest, testTimer_startRunningAfterStopDuringTask)
 
 alexaClientSDK::avsCommon::utils::timing::test::TEST_F (TimerTest, testTimer_multipleStopsDoesntDeadlock)
 

Variables

static const auto alexaClientSDK::avsCommon::utils::timing::test::ACCURACY = std::chrono::milliseconds(15)
 Specifies the expected timing accuracy (timestamps must be within +/- ACCURACY of expected values). More...
 
static const auto alexaClientSDK::avsCommon::utils::timing::test::NO_DELAY = std::chrono::milliseconds(0)
 Used for cases where the task should return immediately, without delay. More...
 
static const auto alexaClientSDK::avsCommon::utils::timing::test::SHORT_DELAY = ACCURACY * 2
 Used for cases where the task duration or timer period should be shorter than MEDIUM_DELAY and LONG_DELAY. More...
 
static const auto alexaClientSDK::avsCommon::utils::timing::test::MEDIUM_DELAY = SHORT_DELAY + ACCURACY
 Used for cases where the task duration or timer period should be greater than SHORT_DELAY and less than LONG_DELAY. More...
 
static const auto alexaClientSDK::avsCommon::utils::timing::test::LONG_DELAY = SHORT_DELAY * 2 + ACCURACY
 
static const auto alexaClientSDK::avsCommon::utils::timing::test::TIMEOUT = std::chrono::seconds(1)
 
static const size_t alexaClientSDK::avsCommon::utils::timing::test::ITERATIONS = 5
 Number of task iterations to run for multi-shot tests. More...
 

AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0