AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
Classes | |
class | DeviceInfoTest |
class | MacAddressStringTest |
class | MockRequiresShutdown |
Mock class that implements RequiresShutdown. More... | |
class | Object |
Test class which implements RequiresShutdown. More... | |
class | StreambufTest |
class | StreamFunctionsTest |
Functions | |
TEST_F (DeviceInfoTest, test_buildDefault) | |
TEST_F (DeviceInfoTest, test_buildCustomKeys) | |
TEST_F (DeviceInfoTest, test_buildEmptyStringsInvalid) | |
TEST (ID3v2TagsTest, test_validID3TagsSuccess) | |
TEST (ID3v2TagsTest, test_nullDataFailed) | |
TEST (ID3v2TagsTest, test_validID3TagsMaxTagSizeSuccess) | |
TEST (ID3v2TagsTest, test_shortID3TagsFailed) | |
TEST (ID3v2TagsTest, test_invalidVersionID3TagsVersionFailed) | |
TEST (ID3v2TagsTest, test_invalidID3TagsSize0Failed) | |
TEST (ID3v2TagsTest, test_invalidID3TagsSize1Failed) | |
TEST (ID3v2TagsTest, test_invalidID3TagsSize2Failed) | |
TEST (ID3v2TagsTest, test_invalidID3TagsSize3Failed) | |
TEST (ID3v2TagsTest, test_invalidID3TagsSize4Failed) | |
TEST_F (MacAddressStringTest, test_createWithInvalidHexDigits) | |
TEST_F (MacAddressStringTest, test_createWithInvalidNumberOfOctets) | |
TEST_F (MacAddressStringTest, test_createWithNoDividers) | |
TEST_F (MacAddressStringTest, test_createWithInvalidDividers) | |
TEST_F (MacAddressStringTest, test_createWithValidMacAddress) | |
TEST_F (MacAddressStringTest, test_createWithTruncatedMacAddress) | |
TEST (RequiresShutdownTest, test_allTestCases) | |
TEST_F (StreambufTest, test_creation) | |
TEST_F (StreambufTest, test_seekoffBeginning) | |
TEST_F (StreambufTest, test_seekoffCurrentForward) | |
TEST_F (StreambufTest, test_seekoffFromBeginningUntilEnd) | |
TEST_F (StreambufTest, test_seekoffFromEndUntilBeginning) | |
TEST_F (StreambufTest, test_seekoffCurrentBackward) | |
TEST_F (StreambufTest, test_seekoffBeforeStart) | |
TEST_F (StreambufTest, test_seekoffPastEnd) | |
TEST_F (StreambufTest, test_seekpos) | |
TEST_F (StreambufTest, test_seekposBeforeStart) | |
TEST_F (StreambufTest, test_seekposAfterEnd) | |
TEST_F (StreambufTest, test_seekposToEnd) | |
static bool | streamAndDataAreEqual (const std::istream &stream, const unsigned char *data, size_t length) |
TEST_F (StreamFunctionsTest, test_streamFromData) | |
TEST_F (StreamFunctionsTest, test_dataContainsUnprintableChars) | |
TEST_F (StreamFunctionsTest, test_emptyVector) | |
TEST_F (StreamFunctionsTest, test_multipleStreams) | |
TEST_F (StreamFunctionsTest, test_seekgBasicForward) | |
TEST_F (StreamFunctionsTest, test_seekgBasicReset) | |
TEST_F (StreamFunctionsTest, test_tellgBasic) | |
TEST_F (StreamFunctionsTest, test_tellgPastEnd) | |
TEST_F (StreamFunctionsTest, test_tellgBeforeBeginning) | |
TEST_F (StreamFunctionsTest, test_tellgAfterSeeking) | |
TEST_F (StreamFunctionsTest, test_tellgAfterReading) | |
TEST (StringUtilsTest, test_emptyStringFails) | |
TEST (StringUtilsTest, test_simpleDecimalInteger) | |
TEST (StringUtilsTest, test_negativeInt) | |
TEST (StringUtilsTest, test_initialWhitespaceSucceeds) | |
TEST (StringUtilsTest, test_trailingWhitespaceSucceeds) | |
TEST (StringUtilsTest, test_leadingAndTrailingWhitespaceSucceeds) | |
TEST (StringUtilsTest, test_nonWhitespacePrefixFails) | |
TEST (StringUtilsTest, test_nonWhitespaceSuffixFails) | |
TEST (StringUtilsTest, test_nonWhitespacePrefixAndSuffixFails) | |
TEST (StringUtilsTest, test_nonWhitespaceAndNonWhitespacePrefixFails) | |
TEST (StringUtilsTest, test_nonWhitespaceAndNonWhitespaceSuffixFails) | |
TEST (StringUtilsTest, test_nonWhitespaceAndNonWhitespacePrefixAndSuffixFails) | |
TEST (StringUtilsTest, test_zeroSucceeds) | |
TEST (StringUtilsTest, test_decimalFloatFails) | |
TEST (StringUtilsTest, test_octalInterpretedAsDecimal) | |
TEST (StringUtilsTest, test_hexIntFails) | |
TEST (StringUtilsTest, test_tooLargeIntFails) | |
TEST (StringUtilsTest, test_tooSmallIntFails) | |
TEST (StringUtilsTest, test_multipleNumbers) | |
TEST (StringUtilsTest, test_toLowerEmptyString) | |
TEST (StringUtilsTest, test_toLowerCaseString) | |
TEST (StringUtilsTest, test_toUpperCaseString) | |
TEST (StringUtilsTest, test_toCamelCaseString) | |
Variables | |
static const std::string | TEST_CLIENT_ID = "TEST_CLIENT_ID" |
A Test client Id. More... | |
static const std::string | TEST_PRODUCT_ID = "TEST_PRODUCT_ID" |
A Test product Id. More... | |
static const std::string | TEST_SERIAL_NUMBER = "TEST_SERIAL_NUMBER" |
A Test serial number. More... | |
static const std::string | TEST_MANUFACTURER_NAME = "TEST_MANUFACTURER_NAME" |
A Test manufacturer name. More... | |
static const std::string | TEST_DESCRIPTION = "TEST_DESCRIPTION" |
A Test description. More... | |
static const std::string | TEST_FRIENDLY_NAME = "TEST_FRIENDLY_NAME" |
A Test friendly name. More... | |
static const std::string | TEST_DEVICE_TYPE = "TEST_DEVICE_TYPE" |
A Test device type. More... | |
static const sdkInterfaces::endpoints::EndpointIdentifier | TEST_ENDPOINT_IDENTIFER = "TEST_ENDPOINT_IDENTIFER" |
A Test endpoint identifier name. More... | |
static const std::string | TEST_REGISTRATION_KEY = "TEST_REGISTRATION_KEY" |
A Test registration key name. More... | |
static const std::string | TEST_PRODUCT_ID_KEY = "TEST_PRODUCT_ID_KEY" |
A Test product id key. More... | |
static const std::string | DEFAULT_REGISTRATION_KEY = "registration" |
A Default registration key name. More... | |
static const std::string | DEFAULT_PRODUCT_ID_KEY = "productId" |
A default product id key name. More... | |
static const std::vector< unsigned char > | testData = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9} |
static const unsigned char | TEST_DATA [] = {'T', 'E', 'S', 'T', '_', 'D', 'A', 'T', 'A'} |
|
static |
Utility function to check if a stream contents match a data block
alexaClientSDK::avsCommon::utils::test::TEST | ( | ID3v2TagsTest | , |
test_validID3TagsSuccess | |||
) |
alexaClientSDK::avsCommon::utils::test::TEST | ( | StringUtilsTest | , |
test_emptyStringFails | |||
) |
Verify that converting an empty string to an integer fails.
alexaClientSDK::avsCommon::utils::test::TEST | ( | ID3v2TagsTest | , |
test_nullDataFailed | |||
) |
alexaClientSDK::avsCommon::utils::test::TEST | ( | StringUtilsTest | , |
test_simpleDecimalInteger | |||
) |
Verify that converting a simple decimal integer string to integer succeeds.
alexaClientSDK::avsCommon::utils::test::TEST | ( | ID3v2TagsTest | , |
test_validID3TagsMaxTagSizeSuccess | |||
) |
alexaClientSDK::avsCommon::utils::test::TEST | ( | StringUtilsTest | , |
test_negativeInt | |||
) |
Verify that converting a negative decimal integer string to integer succeeds.
alexaClientSDK::avsCommon::utils::test::TEST | ( | ID3v2TagsTest | , |
test_shortID3TagsFailed | |||
) |
alexaClientSDK::avsCommon::utils::test::TEST | ( | ID3v2TagsTest | , |
test_invalidVersionID3TagsVersionFailed | |||
) |
alexaClientSDK::avsCommon::utils::test::TEST | ( | StringUtilsTest | , |
test_initialWhitespaceSucceeds | |||
) |
Verify that converting a decimal integer string with leading whitespace to integer succeeds.
alexaClientSDK::avsCommon::utils::test::TEST | ( | ID3v2TagsTest | , |
test_invalidID3TagsSize0Failed | |||
) |
alexaClientSDK::avsCommon::utils::test::TEST | ( | RequiresShutdownTest | , |
test_allTestCases | |||
) |
This test covers all cases for RequiresShutdown. It is written this way because the errors are detected when the program exits, so there is no benefit to breaking these out into separate test functions. Also note that there are no EXPECT/ASSERT calls here because there are no outputs from RequiresShutdown. Running this as a unit test verifies that we don't crash, but functional verification currently requires a manual examination of the console output from this test.
alexaClientSDK::avsCommon::utils::test::TEST | ( | StringUtilsTest | , |
test_trailingWhitespaceSucceeds | |||
) |
Verify that converting a decimal integer string with trailing whitespace to integer succeeds.
alexaClientSDK::avsCommon::utils::test::TEST | ( | ID3v2TagsTest | , |
test_invalidID3TagsSize1Failed | |||
) |
alexaClientSDK::avsCommon::utils::test::TEST | ( | ID3v2TagsTest | , |
test_invalidID3TagsSize2Failed | |||
) |
alexaClientSDK::avsCommon::utils::test::TEST | ( | StringUtilsTest | , |
test_leadingAndTrailingWhitespaceSucceeds | |||
) |
Verify that converting a decimal integer string with leading and trailing whitespace to integer succeeds.
alexaClientSDK::avsCommon::utils::test::TEST | ( | ID3v2TagsTest | , |
test_invalidID3TagsSize3Failed | |||
) |
alexaClientSDK::avsCommon::utils::test::TEST | ( | StringUtilsTest | , |
test_nonWhitespacePrefixFails | |||
) |
Verify that converting a decimal integer with leading non-whitespace and non-decimal digit characters fails.
alexaClientSDK::avsCommon::utils::test::TEST | ( | ID3v2TagsTest | , |
test_invalidID3TagsSize4Failed | |||
) |
alexaClientSDK::avsCommon::utils::test::TEST | ( | StringUtilsTest | , |
test_nonWhitespaceSuffixFails | |||
) |
Verify that converting a decimal integer with trailing non-whitespace and non-decimal digit characters fails.
alexaClientSDK::avsCommon::utils::test::TEST | ( | StringUtilsTest | , |
test_nonWhitespacePrefixAndSuffixFails | |||
) |
Verify that converting a decimal integer with leading and trailing non-whitespace and non-decimal digit characters fails.
alexaClientSDK::avsCommon::utils::test::TEST | ( | StringUtilsTest | , |
test_nonWhitespaceAndNonWhitespacePrefixFails | |||
) |
Verify that converting a decimal integer with both leading whitespace and non-whitespace characters fails.
alexaClientSDK::avsCommon::utils::test::TEST | ( | StringUtilsTest | , |
test_nonWhitespaceAndNonWhitespaceSuffixFails | |||
) |
Verify that converting a decimal integer with both trailing whitespace and non-whitespace characters fails.
alexaClientSDK::avsCommon::utils::test::TEST | ( | StringUtilsTest | , |
test_nonWhitespaceAndNonWhitespacePrefixAndSuffixFails | |||
) |
Verify that converting a decimal integer with leading and trailing whitespace and non-whitespace characters fails.
alexaClientSDK::avsCommon::utils::test::TEST | ( | StringUtilsTest | , |
test_zeroSucceeds | |||
) |
Verify that converting "0" to integer succeeds.
alexaClientSDK::avsCommon::utils::test::TEST | ( | StringUtilsTest | , |
test_decimalFloatFails | |||
) |
Verify that converting a floating string to integer fails.
alexaClientSDK::avsCommon::utils::test::TEST | ( | StringUtilsTest | , |
test_octalInterpretedAsDecimal | |||
) |
Verify that converting an octal integer string si interpreted as decmal with a leading zero.
alexaClientSDK::avsCommon::utils::test::TEST | ( | StringUtilsTest | , |
test_hexIntFails | |||
) |
Verify that converting a hex integer string to integer fails.
alexaClientSDK::avsCommon::utils::test::TEST | ( | StringUtilsTest | , |
test_tooLargeIntFails | |||
) |
Verify that converting a too large integer string to int fails.
alexaClientSDK::avsCommon::utils::test::TEST | ( | StringUtilsTest | , |
test_tooSmallIntFails | |||
) |
Verify that converting a too small integer string to int fails.
alexaClientSDK::avsCommon::utils::test::TEST | ( | StringUtilsTest | , |
test_multipleNumbers | |||
) |
Verify that converting a string with multiple numbers in it fails.
alexaClientSDK::avsCommon::utils::test::TEST | ( | StringUtilsTest | , |
test_toLowerEmptyString | |||
) |
Verify that converting a empty string to lower case works.
alexaClientSDK::avsCommon::utils::test::TEST | ( | StringUtilsTest | , |
test_toLowerCaseString | |||
) |
Verify that converting a lower case string to lower case works.
alexaClientSDK::avsCommon::utils::test::TEST | ( | StringUtilsTest | , |
test_toUpperCaseString | |||
) |
Verify that converting a Upper case string to lower case works.
alexaClientSDK::avsCommon::utils::test::TEST | ( | StringUtilsTest | , |
test_toCamelCaseString | |||
) |
Verify that converting a Camel case string to lower case works.
alexaClientSDK::avsCommon::utils::test::TEST_F | ( | MacAddressStringTest | , |
test_createWithInvalidHexDigits | |||
) |
Tests MacAddressString
create method with invalid hexadecimal values in Mac Address.
alexaClientSDK::avsCommon::utils::test::TEST_F | ( | StreambufTest | , |
test_creation | |||
) |
Verify that the Streambuf is created correctly
alexaClientSDK::avsCommon::utils::test::TEST_F | ( | MacAddressStringTest | , |
test_createWithInvalidNumberOfOctets | |||
) |
Tests MacAddressString
create method with invalid number of octets in the Mac Address.
alexaClientSDK::avsCommon::utils::test::TEST_F | ( | StreambufTest | , |
test_seekoffBeginning | |||
) |
Verify that the seekoff can be called based from the beginning
alexaClientSDK::avsCommon::utils::test::TEST_F | ( | StreamFunctionsTest | , |
test_streamFromData | |||
) |
Verify that audio bytes passed in are returned exactly the same
alexaClientSDK::avsCommon::utils::test::TEST_F | ( | MacAddressStringTest | , |
test_createWithNoDividers | |||
) |
Test MacAddressString
create method with no dividers in Mac Address.
alexaClientSDK::avsCommon::utils::test::TEST_F | ( | StreamFunctionsTest | , |
test_dataContainsUnprintableChars | |||
) |
Verify that non-char data streams work correctly
alexaClientSDK::avsCommon::utils::test::TEST_F | ( | MacAddressStringTest | , |
test_createWithInvalidDividers | |||
) |
Test MacAddressString
create method with invalid dividers in Mac Address.
alexaClientSDK::avsCommon::utils::test::TEST_F | ( | StreambufTest | , |
test_seekoffCurrentForward | |||
) |
Verify that the seekoff can be called based from the current positon
alexaClientSDK::avsCommon::utils::test::TEST_F | ( | MacAddressStringTest | , |
test_createWithValidMacAddress | |||
) |
Test MacAddressString
create method with valid Mac address.
alexaClientSDK::avsCommon::utils::test::TEST_F | ( | StreambufTest | , |
test_seekoffFromBeginningUntilEnd | |||
) |
Verify that you can seek all the way until the end correctly
alexaClientSDK::avsCommon::utils::test::TEST_F | ( | DeviceInfoTest | , |
test_buildDefault | |||
) |
alexaClientSDK::avsCommon::utils::test::TEST_F | ( | StreamFunctionsTest | , |
test_emptyVector | |||
) |
Verify that empty datasets work
alexaClientSDK::avsCommon::utils::test::TEST_F | ( | MacAddressStringTest | , |
test_createWithTruncatedMacAddress | |||
) |
Test MacAddressString
create method with truncated Mac address is invalid.
alexaClientSDK::avsCommon::utils::test::TEST_F | ( | StreambufTest | , |
test_seekoffFromEndUntilBeginning | |||
) |
Verify that you can seek all the way from the end to the beginning
alexaClientSDK::avsCommon::utils::test::TEST_F | ( | DeviceInfoTest | , |
test_buildCustomKeys | |||
) |
alexaClientSDK::avsCommon::utils::test::TEST_F | ( | StreamFunctionsTest | , |
test_multipleStreams | |||
) |
Verify that multiple streams created from the same source can be operated on independently
alexaClientSDK::avsCommon::utils::test::TEST_F | ( | StreambufTest | , |
test_seekoffCurrentBackward | |||
) |
Verify that you can seek backward from the end
alexaClientSDK::avsCommon::utils::test::TEST_F | ( | StreamFunctionsTest | , |
test_seekgBasicForward | |||
) |
Verify that seekg works going forward
alexaClientSDK::avsCommon::utils::test::TEST_F | ( | StreambufTest | , |
test_seekoffBeforeStart | |||
) |
Verify that a seek to before the stream results in an error
alexaClientSDK::avsCommon::utils::test::TEST_F | ( | StreamFunctionsTest | , |
test_seekgBasicReset | |||
) |
Verify that seekg can reset
alexaClientSDK::avsCommon::utils::test::TEST_F | ( | StreambufTest | , |
test_seekoffPastEnd | |||
) |
Verify that a seek to after the stream results in an error
alexaClientSDK::avsCommon::utils::test::TEST_F | ( | DeviceInfoTest | , |
test_buildEmptyStringsInvalid | |||
) |
alexaClientSDK::avsCommon::utils::test::TEST_F | ( | StreambufTest | , |
test_seekpos | |||
) |
Verify that a basic seekpos works
alexaClientSDK::avsCommon::utils::test::TEST_F | ( | StreamFunctionsTest | , |
test_tellgBasic | |||
) |
Verify that tellg works on creation
alexaClientSDK::avsCommon::utils::test::TEST_F | ( | StreambufTest | , |
test_seekposBeforeStart | |||
) |
Verify that a basic seekpos before the beginning results in an error
alexaClientSDK::avsCommon::utils::test::TEST_F | ( | StreamFunctionsTest | , |
test_tellgPastEnd | |||
) |
Verify that the stream will have a bad tellg result when seeking past end
alexaClientSDK::avsCommon::utils::test::TEST_F | ( | StreambufTest | , |
test_seekposAfterEnd | |||
) |
Verify that a basic seekpos after the end results in an error
alexaClientSDK::avsCommon::utils::test::TEST_F | ( | StreamFunctionsTest | , |
test_tellgBeforeBeginning | |||
) |
Verify that the stream will have a bad tellg result when seeking before beginning
alexaClientSDK::avsCommon::utils::test::TEST_F | ( | StreambufTest | , |
test_seekposToEnd | |||
) |
Verify that a seekpos to the end is correct
alexaClientSDK::avsCommon::utils::test::TEST_F | ( | StreamFunctionsTest | , |
test_tellgAfterSeeking | |||
) |
Verify that tellg is set correctly after seeking
alexaClientSDK::avsCommon::utils::test::TEST_F | ( | StreamFunctionsTest | , |
test_tellgAfterReading | |||
) |
Verify that tellg is set correctly after reading from stream
|
static |
A default product id key name.
|
static |
A Default registration key name.
|
static |
A Test client Id.
|
static |
|
static |
A Test description.
|
static |
A Test device type.
|
static |
A Test endpoint identifier name.
|
static |
A Test friendly name.
|
static |
A Test manufacturer name.
|
static |
A Test product Id.
|
static |
A Test product id key.
|
static |
A Test registration key name.
|
static |
A Test serial number.
|
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