AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Classes | Functions | Variables
alexaClientSDK::acsdkKWDImplementations::test Namespace Reference

Classes

class  AbstractKeyWordDetectorTest
 
class  MockKeyWordDetector
 
class  MockKeywordDetectorStateNotifier
 A test KeywordDetectorStateNotifier. More...
 
class  MockKeywordNotifier
 A test KeywordNotifier. More...
 
class  MockKeyWordObserver
 A test observer that mocks out the KeyWordObserverInterface#onKeyWordDetected() call. More...
 
class  MockStateObserver
 A test observer that mocks out the KeyWordDetectorStateObserverInterface#onStateChanged() call. More...
 

Functions

 TEST_F (AbstractKeyWordDetectorTest, test_addKeyWordObserver)
 
 TEST_F (AbstractKeyWordDetectorTest, test_notifyKeyWordObserver)
 
 TEST_F (AbstractKeyWordDetectorTest, test_removeKeyWordObserver)
 
 TEST_F (AbstractKeyWordDetectorTest, test_addStateObserver)
 
 TEST_F (AbstractKeyWordDetectorTest, test_notifyStateObserver)
 
 TEST_F (AbstractKeyWordDetectorTest, test_removeStateObserver)
 
 TEST_F (AbstractKeyWordDetectorTest, test_observersDontGetNotifiedOfSameStateTwice)
 
 TEST_F (AbstractKeyWordDetectorTest, test_isByteSwappingRequired)
 
 TEST_F (AbstractKeyWordDetectorTest, test_readFromStreamSuccessful)
 
 TEST_F (AbstractKeyWordDetectorTest, test_readFromStreamWhileStreamClosed)
 
 TEST_F (AbstractKeyWordDetectorTest, test_readFromStreamBufferOverrun)
 
 TEST_F (AbstractKeyWordDetectorTest, test_readFromStreamTimedOut)
 

Variables

static constexpr std::chrono::milliseconds TIMEOUT {1000}
 Reader timeout. More...
 
static constexpr size_t TEST_BUFFER_SIZE {4096u}
 The size of reader buffer is one page long. More...
 
static constexpr ssize_t ZERO_WORDS_READ = 0
 
static constexpr ssize_t WORDS_TO_READ = 1
 

Function Documentation

◆ TEST_F() [1/12]

alexaClientSDK::acsdkKWDImplementations::test::TEST_F ( AbstractKeyWordDetectorTest  ,
test_addKeyWordObserver   
)

Tests adding a Keyword Observer to the KWD.

◆ TEST_F() [2/12]

alexaClientSDK::acsdkKWDImplementations::test::TEST_F ( AbstractKeyWordDetectorTest  ,
test_notifyKeyWordObserver   
)

Tests Notifying a Keyword Observer.

◆ TEST_F() [3/12]

alexaClientSDK::acsdkKWDImplementations::test::TEST_F ( AbstractKeyWordDetectorTest  ,
test_removeKeyWordObserver   
)

Tests removing a Keyword Observer to the KWD.

◆ TEST_F() [4/12]

alexaClientSDK::acsdkKWDImplementations::test::TEST_F ( AbstractKeyWordDetectorTest  ,
test_addStateObserver   
)

Tests adding a Detector State Observer to the KWD.

◆ TEST_F() [5/12]

alexaClientSDK::acsdkKWDImplementations::test::TEST_F ( AbstractKeyWordDetectorTest  ,
test_notifyStateObserver   
)

Tests notifying a KeywordDetectorStateObserver.

◆ TEST_F() [6/12]

alexaClientSDK::acsdkKWDImplementations::test::TEST_F ( AbstractKeyWordDetectorTest  ,
test_removeStateObserver   
)

Tests removing a Detector State Observer to the KWD.

◆ TEST_F() [7/12]

alexaClientSDK::acsdkKWDImplementations::test::TEST_F ( AbstractKeyWordDetectorTest  ,
test_observersDontGetNotifiedOfSameStateTwice   
)

Tests that Detector State Observers aren't notified if there is no change in state.

◆ TEST_F() [8/12]

alexaClientSDK::acsdkKWDImplementations::test::TEST_F ( AbstractKeyWordDetectorTest  ,
test_isByteSwappingRequired   
)

Tests if byte swapping of the audio stream is required by comparing format endianness to platform endianness.

◆ TEST_F() [9/12]

alexaClientSDK::acsdkKWDImplementations::test::TEST_F ( AbstractKeyWordDetectorTest  ,
test_readFromStreamSuccessful   
)

Tests that KWD is able to read from stream successfully.

◆ TEST_F() [10/12]

alexaClientSDK::acsdkKWDImplementations::test::TEST_F ( AbstractKeyWordDetectorTest  ,
test_readFromStreamWhileStreamClosed   
)

Test reading from stream while the stream is closed.

◆ TEST_F() [11/12]

alexaClientSDK::acsdkKWDImplementations::test::TEST_F ( AbstractKeyWordDetectorTest  ,
test_readFromStreamBufferOverrun   
)

Test reading from stream when the m_buffer is overrun.

◆ TEST_F() [12/12]

alexaClientSDK::acsdkKWDImplementations::test::TEST_F ( AbstractKeyWordDetectorTest  ,
test_readFromStreamTimedOut   
)

Test reading from stream times out.

Variable Documentation

◆ TEST_BUFFER_SIZE

constexpr size_t alexaClientSDK::acsdkKWDImplementations::test::TEST_BUFFER_SIZE {4096u}
static

The size of reader buffer is one page long.

◆ TIMEOUT

constexpr std::chrono::milliseconds alexaClientSDK::acsdkKWDImplementations::test::TIMEOUT {1000}
static

Reader timeout.

◆ WORDS_TO_READ

constexpr ssize_t alexaClientSDK::acsdkKWDImplementations::test::WORDS_TO_READ = 1
static

◆ ZERO_WORDS_READ

constexpr ssize_t alexaClientSDK::acsdkKWDImplementations::test::ZERO_WORDS_READ = 0
static

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