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

Classes

class  EqualizerControllerTest
 
class  EqualizerLinearBandMapperTest
 
class  InMemoryEqualizerConfigurationTest
 
class  SDKConfigEqualizerConfigurationTest
 

Typedefs

using JSONStream = std::vector< std::shared_ptr< std::istream > >
 Alias for JSON stream type used in ConfigurationNode initialization. More...
 

Functions

 TEST_F (EqualizerControllerTest, test_providedEmptyConfig_shouldUseDefaults)
 
 TEST_F (EqualizerControllerTest, test_changeBandLevels_shouldSucceed)
 
 TEST_F (EqualizerControllerTest, test_setInvalidBandLevels_shouldClampToSupportedRange)
 
 TEST_F (EqualizerControllerTest, test_setMode_shouldSucceed)
 
 TEST_F (EqualizerControllerTest, test_setInvalidMode_shouldNotChangeMode)
 
 TEST_F (EqualizerControllerTest, test_providedBandLevelChanges_addRemoveListener_shouldFollowSubscriptionStatus)
 
 TEST_F (EqualizerControllerTest, test_providedModeChanges_addRemoveListener_shouldFollowSubscriptionStatus)
 
 TEST_F (EqualizerControllerTest, test_providedBandLevelChanges_addRemoveMultipleListeners_shouldFollowSubscriptionStatus)
 
 TEST_F (EqualizerControllerTest, test_triggerChangesMultipleTimes_ExpectListenersNotifiedSameTimes)
 
 TEST_F (EqualizerControllerTest, test_providedBandLevelChanges_addRemoveSingleEqualizer_shouldFollowRegistrationStatus)
 
 TEST_F (EqualizerControllerTest, test_providedBandLevelChanges_addRemoveMultipleEqualizers_shouldFollowRegistrationStatus)
 
 TEST_F (EqualizerControllerTest, test_triggerChangesMultipleTimes_ExpectEqualizersCalledSameTimes)
 
 TEST_F (EqualizerControllerTest, test_saveLoadStateWithPersistentStorage_shouldSucceed)
 
 TEST_F (EqualizerControllerTest, test_setLevelBelowEqualizerMinimum_shouldClamp)
 
 TEST_F (EqualizerControllerTest, test_setLevelAboveEqualizerMaximum_shouldClamp)
 
 TEST_F (EqualizerLinearBandMapperTest, test_givenValidParameters_create_shouldSucceed)
 Valid parameters. More...
 
 TEST_F (EqualizerLinearBandMapperTest, test_givenInvalidParameters_create_shouldFail)
 Invalid parameters. More...
 
 TEST_F (EqualizerLinearBandMapperTest, test_givenSameAsAVSBands_map_shouldNotModifyLevels)
 Test mapping AVS bands to the same number of bands. No value must be modified. More...
 
 TEST_F (EqualizerLinearBandMapperTest, test_givenMoreBandsToMapTo_mapAllSameNonZero_shouldMapToSame)
 AVS bands < target bands. Mapping non-zero value. More...
 
 TEST_F (EqualizerLinearBandMapperTest, test_givenMoreBandsToMapTo_mapAllSameZero_shouldMapToSame)
 AVS bands < target bands. Mapping zero value. More...
 
 TEST_F (EqualizerLinearBandMapperTest, test_givenDoubleBandsToMapTo_mapAllSameNonZero_shouldMapToSame)
 AVS bands * 2 = target bands. Mapping non-zero value. No averaged bands. More...
 
 TEST_F (EqualizerLinearBandMapperTest, test_givenDoubleBandsToMapTo_mapAllSameZero_shouldMapToSame)
 AVS bands * 2 = target bands. Mapping zero value. No averaged bands. More...
 
 TEST_F (EqualizerLinearBandMapperTest, test_givenLessBandsToMapTo_mapAllSameNonZero_shouldMapToSame)
 AVS bands > target bands. Mapping non-zero value. More...
 
 TEST_F (EqualizerLinearBandMapperTest, test_givenLessBandsToMapTo_mapAllSameZero_shouldMapToSame)
 AVS bands > target bands. Mapping zero value. More...
 
 TEST_F (EqualizerLinearBandMapperTest, test_givenOneBandToMapTo_mapNonZero_shouldMapToSame)
 Mapping AVS bands to 1 target band. Non-zero value. More...
 
 TEST_F (EqualizerLinearBandMapperTest, test_givenOneBandToMapTo_mapZero_shouldMapToSame)
 Mapping AVS bands to 1 target band. Zero value. More...
 
 TEST_F (EqualizerLinearBandMapperTest, test_givenAnyNumberOfBands_map_shouldKeepAverageLevel)
 Since mapper has a linear nature mapped values must keep the same average as original ones. Testing this here. More...
 
 TEST_F (EqualizerLinearBandMapperTest, test_givenMoreBandsToMapTo_mapSpecificValues_shouldMapToSpecificOutput)
 Test specific transformation. This test depends on current number of bands supported by AVS. More...
 
 TEST_F (EqualizerLinearBandMapperTest, test_givenEvenMoreBandsToMapTo_mapSpecificValues_shouldMapToSpecificOutput)
 Test specific transformation. This test depends on current number of bands supported by AVS. More...
 
 TEST_F (EqualizerLinearBandMapperTest, test_givenLessBandsToMapTo_mapSpecificValues_shouldMapToSpecificOutput)
 Test specific transformation. This test depends on current number of bands supported by AVS. More...
 
 TEST_F (EqualizerLinearBandMapperTest, test_givenEvenLessBandsToMapTo_mapSpecificValues_shouldMapToSpecificOutput)
 Test specific transformation. This test depends on current number of bands supported by AVS. More...
 
 TEST_F (EqualizerLinearBandMapperTest, test_givenOneBandSupported_mapToOneBand_shouldMapSameValue)
 
 TEST_F (EqualizerLinearBandMapperTest, test_givenOneBandSupported_mapToTwoBands_shouldMapToBothSame)
 
 TEST_F (EqualizerLinearBandMapperTest, test_givenTwoBandsSupported_mapToOneBands_shouldMapToAverage)
 
 TEST_F (InMemoryEqualizerConfigurationTest, test_providedValidParameters_createInstance_shouldSucceed)
 Simple successful case. More...
 
 TEST_F (InMemoryEqualizerConfigurationTest, test_providedInvalidLevelRange_createInstance_shouldFail)
 Min level > Max level. More...
 
 TEST_F (InMemoryEqualizerConfigurationTest, test_providedInvalidBandDelta_createInstance_shouldFail)
 adjust delta of 0 More...
 
 TEST_F (InMemoryEqualizerConfigurationTest, test_providedMixMaxLevelSetToDefault_createInstance_shouldSucceed)
 Min and Max are equal (DEFAULT_LEVEL), must succeed. More...
 
 TEST_F (InMemoryEqualizerConfigurationTest, test_providedSameNonDefaultMixMaxLevel_createInstance_shouldSucceed)
 Min and Max are equal (non-DEFAULT_LEVEL), must fail because all modes use DEFAULT_LEVEL as band levels. More...
 
 TEST_F (InMemoryEqualizerConfigurationTest, test_providedDefaultStateLevelAboveMax_createInstance_shouldFail)
 Invalid band value in default state (above max) More...
 
 TEST_F (InMemoryEqualizerConfigurationTest, test_providedDefaultStateLevelBelowMin_createInstance_shouldFail)
 Invalid band value in default state (below min) More...
 
 TEST_F (InMemoryEqualizerConfigurationTest, test_providedDefaultStateLevelBelowMinDifferentBand_createInstance_shouldFail)
 Invalid band value in default state (below min, another band) More...
 
 TEST_F (InMemoryEqualizerConfigurationTest, test_providedNoModes_createInstance_shouldSucceed)
 
 TEST_F (InMemoryEqualizerConfigurationTest, test_providedSupportedModeInDefaultState_createInstance_shouldSucceed)
 
 TEST_F (InMemoryEqualizerConfigurationTest, test_providedUnsupportedModeInDefaultState_createInstance_shouldFail)
 
 TEST_F (InMemoryEqualizerConfigurationTest, test_providedNONEModeAsSupported_createInstance_shouldSucceed)
 
 TEST_F (InMemoryEqualizerConfigurationTest, test_providedValidConfiguration_isSupportedMethods_shouldSucceed)
 
 INSTANTIATE_TEST_CASE_P (MiscDBStorageTests, EqualizerStorageInterfaceTest, ::testing::Values([]() { return MiscDBEqualizerStorage::create(StubMiscStorage::create());}))
 Apply EqualizerStorageInterfaceTest test fixture to MiscDBEqualizerStorage. More...
 
static ConfigurationNode generateConfigFromJSON (std::string json)
 
 TEST_F (SDKConfigEqualizerConfigurationTest, test_providedEmptyConfig_shouldSucceed)
 
 TEST_F (SDKConfigEqualizerConfigurationTest, test_providedEmptyConfig_shouldUseDefaultConfig)
 
 TEST_F (SDKConfigEqualizerConfigurationTest, test_providedLimitedBandsDefined_shouldSucceed)
 
 TEST_F (SDKConfigEqualizerConfigurationTest, test_providedLimitedBandsOneMissing_shouldSucceed)
 
 TEST_F (SDKConfigEqualizerConfigurationTest, test_havingEmptyBandList_shouldUseHardDefaults)
 
 TEST_F (SDKConfigEqualizerConfigurationTest, test_havingOnlyInvalidBand_shouldSucceedAndSupportNone)
 
 TEST_F (SDKConfigEqualizerConfigurationTest, test_oneModeDefinedAndEnabled_shouldPutOthersToDefaults)
 
 TEST_F (SDKConfigEqualizerConfigurationTest, test_oneModeDefinedAndDisabled_shouldPutOthersToDefaults)
 
 TEST_F (SDKConfigEqualizerConfigurationTest, test_givenEmptyDefaultStateBranchEmpty_shouldUseHardDefaults)
 
 TEST_F (SDKConfigEqualizerConfigurationTest, test_givenSupportedDefaultMode_shouldSucceed)
 
 TEST_F (SDKConfigEqualizerConfigurationTest, test_givenUnsupportedDefaultMode_shouldFail)
 
 TEST_F (SDKConfigEqualizerConfigurationTest, test_havingNotAllBandsInDefaultState_shouldFail)
 
 TEST_F (SDKConfigEqualizerConfigurationTest, test_havingNoBandsDefinedInDefaultStateWithNoBandsSupported_shouldSucceed)
 

Variables

static constexpr int MIN_LEVEL = -10
 Band level used as minimum value in tests. More...
 
static constexpr int MAX_LEVEL = 10
 Band level used as maximum value in tests. More...
 
static constexpr int BELOW_MIN_LEVEL = -11
 Band level below the minimum allowed. More...
 
static constexpr int ABOVE_MAX_LEVEL = 11
 Band level above the maximum allowed. More...
 
static constexpr int DEFAULT_LEVEL = 0
 Band level used as a default. More...
 
static constexpr int DEFAULT_ADJUST_DELTA = 1
 Default value to adjust band level. More...
 
static constexpr int DEFAULT_MIDRANGE = DEFAULT_LEVEL
 A sample default band level for MIDRANGE band. More...
 
static constexpr int NON_DEFAULT_MIDRANGE = 4
 A sample band level for MIDRANGE band different from default. More...
 
static constexpr int DEFAULT_TREBLE = 5
 A sample default band level for TREBLE band. More...
 
static constexpr int NON_DEFAULT_TREBLE = -5
 A sample band level for TREBLE band different from default. More...
 
static constexpr EqualizerMode DEFAULT_MODE = EqualizerMode::NONE
 A sample default mode. More...
 
static constexpr int STABILITY_CHECK_ITERATIONS = 100
 Number of times to perform an operation to make sure that it provides consistent results. More...
 
static constexpr int VALID_NUMBER_OF_BANDS = 3
 Valid number of output bands. More...
 
static constexpr int INVALID_NUMBER_OF_BANDS_BELOW = 0
 Invalid number of output bands, below lower bound. More...
 
static constexpr int INVALID_NUMBER_OF_BANDS_ABOVE = 999999
 Invalid number of output bands, above higher bound. More...
 
static constexpr int BAND_LEVEL_TOP = 10
 Band level representing high value. More...
 
static constexpr int BAND_LEVEL_BOTTOM = -10
 Band level representing low value. More...
 
static constexpr int BAND_LEVEL_ZERO = 0
 Band level representing no equalization. More...
 
static constexpr int BAND_LEVEL_AVERAGE = (BAND_LEVEL_TOP + BAND_LEVEL_BOTTOM + BAND_LEVEL_ZERO) / 3
 Band level representing average of top, bottom and zero levels. More...
 
static constexpr int CURRENT_NUMBER_OF_AVS_BANDS = 3
 
static constexpr int MIN_LEVEL = -6
 Band level used as a minimum . More...
 
static constexpr int MAX_LEVEL = 6
 Band level used as a maximum. More...
 
static constexpr int DEFAULT_ADJUST_DELTA = 1
 Default value to adjust band level. More...
 
static constexpr int BELOW_MIN_LEVEL = MIN_LEVEL - 100
 Band level below minimum value. More...
 
static constexpr int ABOVE_MAX_LEVEL = MAX_LEVEL + 100
 Band level above maximum value. More...
 
static constexpr int DEFAULT_LEVEL = 0
 Band level used as a default. More...
 
const std::string JSON_LIMITED_BANDS = R"({"bands":{"BASS":false, "MIDRANGE":false, "TREBLE":true}})"
 JSON configuration with all bands defined, but not all supported. More...
 
const std::string JSON_LIMITED_BANDS_ONE_MISSING = R"({"bands":{"BASS":false, "MIDRANGE":false}})"
 JSON configuration with a limited set of bands defined. More...
 
const std::string JSON_NO_BANDS_PROVIDED = R"({"bands":{}})"
 JSON configuration with a an empty supported bands branch. More...
 
const std::string JSON_INVALID_BAND = R"({"bands":{"DEEPBASS":true}})"
 JSON configuration with a an invalid band listed as supported. More...
 
const std::string JSON_ONE_MODE_MENTIONED_ENABLED = R"({"modes":{"NIGHT": true}})"
 JSON configuration with a one mode defined and supported. More...
 
const std::string JSON_ONE_MODE_MENTIONED_DISABLED = R"({"modes":{"NIGHT": false}})"
 JSON configuration with a one mode defined but unsupported. More...
 
const std::string JSON_EMPTY_DEFAULT_STATE_BRANCH = R"({"defaultState":{}})"
 JSON configuration with an empty default state branch. More...
 
const std::string JSON_DEFAULT_MODE_SUPPORTED = R"({"modes": {"NIGHT":true}, "defaultState":{"mode":"NIGHT"}})"
 JSON configuration with a default supported mode provided. More...
 
const std::string JSON_DEFAULT_MODE_UNSUPPORTED = R"({"defaultState":{"mode":"NIGHT"}})"
 JSON configuration with a default unsupported mode provided. More...
 
const std::string JSON_DEFAULT_STATE_MISSING_BANDS = R"({"defaultState":{"bands":{"BASS": 1}}})"
 JSON configuration with a missing band levels in default state. More...
 
const std::string JSON_DEFAULT_STATE_BANDS_EMPTY_NO_BANDS_SUPPORTED
 JSON configuration with all band defined but unsupported and empty bands branch in default state.s. More...
 

Typedef Documentation

◆ JSONStream

using alexaClientSDK::acsdkEqualizer::test::JSONStream = typedef std::vector<std::shared_ptr<std::istream> >

Alias for JSON stream type used in ConfigurationNode initialization.

Function Documentation

◆ generateConfigFromJSON()

static ConfigurationNode alexaClientSDK::acsdkEqualizer::test::generateConfigFromJSON ( std::string  json)
static

◆ INSTANTIATE_TEST_CASE_P()

alexaClientSDK::acsdkEqualizer::test::INSTANTIATE_TEST_CASE_P ( MiscDBStorageTests  ,
EqualizerStorageInterfaceTest  ,
::testing::Values([]() { return MiscDBEqualizerStorage::create(StubMiscStorage::create());})   
)

Apply EqualizerStorageInterfaceTest test fixture to MiscDBEqualizerStorage.

◆ TEST_F() [1/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( InMemoryEqualizerConfigurationTest  ,
test_providedValidParameters_createInstance_shouldSucceed   
)

Simple successful case.

◆ TEST_F() [2/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( EqualizerLinearBandMapperTest  ,
test_givenValidParameters_create_shouldSucceed   
)

Valid parameters.

◆ TEST_F() [3/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( InMemoryEqualizerConfigurationTest  ,
test_providedInvalidLevelRange_createInstance_shouldFail   
)

Min level > Max level.

◆ TEST_F() [4/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( EqualizerLinearBandMapperTest  ,
test_givenInvalidParameters_create_shouldFail   
)

Invalid parameters.

◆ TEST_F() [5/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( InMemoryEqualizerConfigurationTest  ,
test_providedInvalidBandDelta_createInstance_shouldFail   
)

adjust delta of 0

◆ TEST_F() [6/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( SDKConfigEqualizerConfigurationTest  ,
test_providedEmptyConfig_shouldSucceed   
)

◆ TEST_F() [7/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( EqualizerLinearBandMapperTest  ,
test_givenSameAsAVSBands_map_shouldNotModifyLevels   
)

Test mapping AVS bands to the same number of bands. No value must be modified.

◆ TEST_F() [8/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( InMemoryEqualizerConfigurationTest  ,
test_providedMixMaxLevelSetToDefault_createInstance_shouldSucceed   
)

Min and Max are equal (DEFAULT_LEVEL), must succeed.

◆ TEST_F() [9/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( EqualizerControllerTest  ,
test_providedEmptyConfig_shouldUseDefaults   
)

◆ TEST_F() [10/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( SDKConfigEqualizerConfigurationTest  ,
test_providedEmptyConfig_shouldUseDefaultConfig   
)

◆ TEST_F() [11/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( InMemoryEqualizerConfigurationTest  ,
test_providedSameNonDefaultMixMaxLevel_createInstance_shouldSucceed   
)

Min and Max are equal (non-DEFAULT_LEVEL), must fail because all modes use DEFAULT_LEVEL as band levels.

◆ TEST_F() [12/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( InMemoryEqualizerConfigurationTest  ,
test_providedDefaultStateLevelAboveMax_createInstance_shouldFail   
)

Invalid band value in default state (above max)

◆ TEST_F() [13/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( EqualizerLinearBandMapperTest  ,
test_givenMoreBandsToMapTo_mapAllSameNonZero_shouldMapToSame   
)

AVS bands < target bands. Mapping non-zero value.

◆ TEST_F() [14/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( EqualizerLinearBandMapperTest  ,
test_givenMoreBandsToMapTo_mapAllSameZero_shouldMapToSame   
)

AVS bands < target bands. Mapping zero value.

◆ TEST_F() [15/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( InMemoryEqualizerConfigurationTest  ,
test_providedDefaultStateLevelBelowMin_createInstance_shouldFail   
)

Invalid band value in default state (below min)

◆ TEST_F() [16/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( SDKConfigEqualizerConfigurationTest  ,
test_providedLimitedBandsDefined_shouldSucceed   
)

◆ TEST_F() [17/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( EqualizerControllerTest  ,
test_changeBandLevels_shouldSucceed   
)

◆ TEST_F() [18/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( EqualizerLinearBandMapperTest  ,
test_givenDoubleBandsToMapTo_mapAllSameNonZero_shouldMapToSame   
)

AVS bands * 2 = target bands. Mapping non-zero value. No averaged bands.

◆ TEST_F() [19/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( InMemoryEqualizerConfigurationTest  ,
test_providedDefaultStateLevelBelowMinDifferentBand_createInstance_shouldFail   
)

Invalid band value in default state (below min, another band)

◆ TEST_F() [20/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( EqualizerLinearBandMapperTest  ,
test_givenDoubleBandsToMapTo_mapAllSameZero_shouldMapToSame   
)

AVS bands * 2 = target bands. Mapping zero value. No averaged bands.

◆ TEST_F() [21/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( SDKConfigEqualizerConfigurationTest  ,
test_providedLimitedBandsOneMissing_shouldSucceed   
)

◆ TEST_F() [22/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( EqualizerLinearBandMapperTest  ,
test_givenLessBandsToMapTo_mapAllSameNonZero_shouldMapToSame   
)

AVS bands > target bands. Mapping non-zero value.

◆ TEST_F() [23/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( InMemoryEqualizerConfigurationTest  ,
test_providedNoModes_createInstance_shouldSucceed   
)

◆ TEST_F() [24/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( EqualizerLinearBandMapperTest  ,
test_givenLessBandsToMapTo_mapAllSameZero_shouldMapToSame   
)

AVS bands > target bands. Mapping zero value.

◆ TEST_F() [25/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( SDKConfigEqualizerConfigurationTest  ,
test_havingEmptyBandList_shouldUseHardDefaults   
)

◆ TEST_F() [26/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( EqualizerControllerTest  ,
test_setInvalidBandLevels_shouldClampToSupportedRange   
)

◆ TEST_F() [27/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( EqualizerLinearBandMapperTest  ,
test_givenOneBandToMapTo_mapNonZero_shouldMapToSame   
)

Mapping AVS bands to 1 target band. Non-zero value.

◆ TEST_F() [28/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( InMemoryEqualizerConfigurationTest  ,
test_providedSupportedModeInDefaultState_createInstance_shouldSucceed   
)

◆ TEST_F() [29/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( EqualizerLinearBandMapperTest  ,
test_givenOneBandToMapTo_mapZero_shouldMapToSame   
)

Mapping AVS bands to 1 target band. Zero value.

◆ TEST_F() [30/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( EqualizerLinearBandMapperTest  ,
test_givenAnyNumberOfBands_map_shouldKeepAverageLevel   
)

Since mapper has a linear nature mapped values must keep the same average as original ones. Testing this here.

◆ TEST_F() [31/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( SDKConfigEqualizerConfigurationTest  ,
test_havingOnlyInvalidBand_shouldSucceedAndSupportNone   
)

◆ TEST_F() [32/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( InMemoryEqualizerConfigurationTest  ,
test_providedUnsupportedModeInDefaultState_createInstance_shouldFail   
)

◆ TEST_F() [33/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( EqualizerControllerTest  ,
test_setMode_shouldSucceed   
)

◆ TEST_F() [34/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( InMemoryEqualizerConfigurationTest  ,
test_providedNONEModeAsSupported_createInstance_shouldSucceed   
)

◆ TEST_F() [35/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( SDKConfigEqualizerConfigurationTest  ,
test_oneModeDefinedAndEnabled_shouldPutOthersToDefaults   
)

◆ TEST_F() [36/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( EqualizerControllerTest  ,
test_setInvalidMode_shouldNotChangeMode   
)

◆ TEST_F() [37/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( InMemoryEqualizerConfigurationTest  ,
test_providedValidConfiguration_isSupportedMethods_shouldSucceed   
)

◆ TEST_F() [38/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( EqualizerLinearBandMapperTest  ,
test_givenMoreBandsToMapTo_mapSpecificValues_shouldMapToSpecificOutput   
)

Test specific transformation. This test depends on current number of bands supported by AVS.

◆ TEST_F() [39/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( EqualizerControllerTest  ,
test_providedBandLevelChanges_addRemoveListener_shouldFollowSubscriptionStatus   
)

◆ TEST_F() [40/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( SDKConfigEqualizerConfigurationTest  ,
test_oneModeDefinedAndDisabled_shouldPutOthersToDefaults   
)

◆ TEST_F() [41/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( EqualizerLinearBandMapperTest  ,
test_givenEvenMoreBandsToMapTo_mapSpecificValues_shouldMapToSpecificOutput   
)

Test specific transformation. This test depends on current number of bands supported by AVS.

◆ TEST_F() [42/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( SDKConfigEqualizerConfigurationTest  ,
test_givenEmptyDefaultStateBranchEmpty_shouldUseHardDefaults   
)

◆ TEST_F() [43/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( EqualizerControllerTest  ,
test_providedModeChanges_addRemoveListener_shouldFollowSubscriptionStatus   
)

◆ TEST_F() [44/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( SDKConfigEqualizerConfigurationTest  ,
test_givenSupportedDefaultMode_shouldSucceed   
)

◆ TEST_F() [45/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( EqualizerLinearBandMapperTest  ,
test_givenLessBandsToMapTo_mapSpecificValues_shouldMapToSpecificOutput   
)

Test specific transformation. This test depends on current number of bands supported by AVS.

◆ TEST_F() [46/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( SDKConfigEqualizerConfigurationTest  ,
test_givenUnsupportedDefaultMode_shouldFail   
)

◆ TEST_F() [47/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( SDKConfigEqualizerConfigurationTest  ,
test_havingNotAllBandsInDefaultState_shouldFail   
)

◆ TEST_F() [48/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( EqualizerControllerTest  ,
test_providedBandLevelChanges_addRemoveMultipleListeners_shouldFollowSubscriptionStatus   
)

◆ TEST_F() [49/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( SDKConfigEqualizerConfigurationTest  ,
test_havingNoBandsDefinedInDefaultStateWithNoBandsSupported_shouldSucceed   
)

◆ TEST_F() [50/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( EqualizerLinearBandMapperTest  ,
test_givenEvenLessBandsToMapTo_mapSpecificValues_shouldMapToSpecificOutput   
)

Test specific transformation. This test depends on current number of bands supported by AVS.

◆ TEST_F() [51/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( EqualizerLinearBandMapperTest  ,
test_givenOneBandSupported_mapToOneBand_shouldMapSameValue   
)

◆ TEST_F() [52/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( EqualizerControllerTest  ,
test_triggerChangesMultipleTimes_ExpectListenersNotifiedSameTimes   
)

◆ TEST_F() [53/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( EqualizerLinearBandMapperTest  ,
test_givenOneBandSupported_mapToTwoBands_shouldMapToBothSame   
)

◆ TEST_F() [54/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( EqualizerControllerTest  ,
test_providedBandLevelChanges_addRemoveSingleEqualizer_shouldFollowRegistrationStatus   
)

◆ TEST_F() [55/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( EqualizerLinearBandMapperTest  ,
test_givenTwoBandsSupported_mapToOneBands_shouldMapToAverage   
)

◆ TEST_F() [56/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( EqualizerControllerTest  ,
test_providedBandLevelChanges_addRemoveMultipleEqualizers_shouldFollowRegistrationStatus   
)

◆ TEST_F() [57/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( EqualizerControllerTest  ,
test_triggerChangesMultipleTimes_ExpectEqualizersCalledSameTimes   
)

◆ TEST_F() [58/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( EqualizerControllerTest  ,
test_saveLoadStateWithPersistentStorage_shouldSucceed   
)

◆ TEST_F() [59/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( EqualizerControllerTest  ,
test_setLevelBelowEqualizerMinimum_shouldClamp   
)

◆ TEST_F() [60/60]

alexaClientSDK::acsdkEqualizer::test::TEST_F ( EqualizerControllerTest  ,
test_setLevelAboveEqualizerMaximum_shouldClamp   
)

Variable Documentation

◆ ABOVE_MAX_LEVEL [1/2]

constexpr int alexaClientSDK::acsdkEqualizer::test::ABOVE_MAX_LEVEL = MAX_LEVEL + 100
static

Band level above maximum value.

◆ ABOVE_MAX_LEVEL [2/2]

constexpr int alexaClientSDK::acsdkEqualizer::test::ABOVE_MAX_LEVEL = 11
static

Band level above the maximum allowed.

◆ BAND_LEVEL_AVERAGE

constexpr int alexaClientSDK::acsdkEqualizer::test::BAND_LEVEL_AVERAGE = (BAND_LEVEL_TOP + BAND_LEVEL_BOTTOM + BAND_LEVEL_ZERO) / 3
static

Band level representing average of top, bottom and zero levels.

◆ BAND_LEVEL_BOTTOM

constexpr int alexaClientSDK::acsdkEqualizer::test::BAND_LEVEL_BOTTOM = -10
static

Band level representing low value.

◆ BAND_LEVEL_TOP

constexpr int alexaClientSDK::acsdkEqualizer::test::BAND_LEVEL_TOP = 10
static

Band level representing high value.

◆ BAND_LEVEL_ZERO

constexpr int alexaClientSDK::acsdkEqualizer::test::BAND_LEVEL_ZERO = 0
static

Band level representing no equalization.

◆ BELOW_MIN_LEVEL [1/2]

constexpr int alexaClientSDK::acsdkEqualizer::test::BELOW_MIN_LEVEL = MIN_LEVEL - 100
static

Band level below minimum value.

◆ BELOW_MIN_LEVEL [2/2]

constexpr int alexaClientSDK::acsdkEqualizer::test::BELOW_MIN_LEVEL = -11
static

Band level below the minimum allowed.

◆ CURRENT_NUMBER_OF_AVS_BANDS

constexpr int alexaClientSDK::acsdkEqualizer::test::CURRENT_NUMBER_OF_AVS_BANDS = 3
static

Current number of AVS bands assumed in some tests. If the actual number of AVS bands changes these test would have to be rewritten.

◆ DEFAULT_ADJUST_DELTA [1/2]

constexpr int alexaClientSDK::acsdkEqualizer::test::DEFAULT_ADJUST_DELTA = 1
static

Default value to adjust band level.

◆ DEFAULT_ADJUST_DELTA [2/2]

constexpr int alexaClientSDK::acsdkEqualizer::test::DEFAULT_ADJUST_DELTA = 1
static

Default value to adjust band level.

◆ DEFAULT_LEVEL [1/2]

constexpr int alexaClientSDK::acsdkEqualizer::test::DEFAULT_LEVEL = 0
static

Band level used as a default.

◆ DEFAULT_LEVEL [2/2]

constexpr int alexaClientSDK::acsdkEqualizer::test::DEFAULT_LEVEL = 0
static

Band level used as a default.

◆ DEFAULT_MIDRANGE

constexpr int alexaClientSDK::acsdkEqualizer::test::DEFAULT_MIDRANGE = DEFAULT_LEVEL
static

A sample default band level for MIDRANGE band.

◆ DEFAULT_MODE

constexpr EqualizerMode alexaClientSDK::acsdkEqualizer::test::DEFAULT_MODE = EqualizerMode::NONE
static

A sample default mode.

◆ DEFAULT_TREBLE

constexpr int alexaClientSDK::acsdkEqualizer::test::DEFAULT_TREBLE = 5
static

A sample default band level for TREBLE band.

◆ INVALID_NUMBER_OF_BANDS_ABOVE

constexpr int alexaClientSDK::acsdkEqualizer::test::INVALID_NUMBER_OF_BANDS_ABOVE = 999999
static

Invalid number of output bands, above higher bound.

◆ INVALID_NUMBER_OF_BANDS_BELOW

constexpr int alexaClientSDK::acsdkEqualizer::test::INVALID_NUMBER_OF_BANDS_BELOW = 0
static

Invalid number of output bands, below lower bound.

◆ JSON_DEFAULT_MODE_SUPPORTED

const std::string alexaClientSDK::acsdkEqualizer::test::JSON_DEFAULT_MODE_SUPPORTED = R"({"modes": {"NIGHT":true}, "defaultState":{"mode":"NIGHT"}})"

JSON configuration with a default supported mode provided.

◆ JSON_DEFAULT_MODE_UNSUPPORTED

const std::string alexaClientSDK::acsdkEqualizer::test::JSON_DEFAULT_MODE_UNSUPPORTED = R"({"defaultState":{"mode":"NIGHT"}})"

JSON configuration with a default unsupported mode provided.

◆ JSON_DEFAULT_STATE_BANDS_EMPTY_NO_BANDS_SUPPORTED

const std::string alexaClientSDK::acsdkEqualizer::test::JSON_DEFAULT_STATE_BANDS_EMPTY_NO_BANDS_SUPPORTED
Initial value:
=
R"({"bands":{"BASS":false, "MIDRANGE":false, "TREBLE":false}, "defaultState":{"bands":{}}})"

JSON configuration with all band defined but unsupported and empty bands branch in default state.s.

◆ JSON_DEFAULT_STATE_MISSING_BANDS

const std::string alexaClientSDK::acsdkEqualizer::test::JSON_DEFAULT_STATE_MISSING_BANDS = R"({"defaultState":{"bands":{"BASS": 1}}})"

JSON configuration with a missing band levels in default state.

◆ JSON_EMPTY_DEFAULT_STATE_BRANCH

const std::string alexaClientSDK::acsdkEqualizer::test::JSON_EMPTY_DEFAULT_STATE_BRANCH = R"({"defaultState":{}})"

JSON configuration with an empty default state branch.

◆ JSON_INVALID_BAND

const std::string alexaClientSDK::acsdkEqualizer::test::JSON_INVALID_BAND = R"({"bands":{"DEEPBASS":true}})"

JSON configuration with a an invalid band listed as supported.

◆ JSON_LIMITED_BANDS

const std::string alexaClientSDK::acsdkEqualizer::test::JSON_LIMITED_BANDS = R"({"bands":{"BASS":false, "MIDRANGE":false, "TREBLE":true}})"

JSON configuration with all bands defined, but not all supported.

◆ JSON_LIMITED_BANDS_ONE_MISSING

const std::string alexaClientSDK::acsdkEqualizer::test::JSON_LIMITED_BANDS_ONE_MISSING = R"({"bands":{"BASS":false, "MIDRANGE":false}})"

JSON configuration with a limited set of bands defined.

◆ JSON_NO_BANDS_PROVIDED

const std::string alexaClientSDK::acsdkEqualizer::test::JSON_NO_BANDS_PROVIDED = R"({"bands":{}})"

JSON configuration with a an empty supported bands branch.

◆ JSON_ONE_MODE_MENTIONED_DISABLED

const std::string alexaClientSDK::acsdkEqualizer::test::JSON_ONE_MODE_MENTIONED_DISABLED = R"({"modes":{"NIGHT": false}})"

JSON configuration with a one mode defined but unsupported.

◆ JSON_ONE_MODE_MENTIONED_ENABLED

const std::string alexaClientSDK::acsdkEqualizer::test::JSON_ONE_MODE_MENTIONED_ENABLED = R"({"modes":{"NIGHT": true}})"

JSON configuration with a one mode defined and supported.

◆ MAX_LEVEL [1/2]

constexpr int alexaClientSDK::acsdkEqualizer::test::MAX_LEVEL = 6
static

Band level used as a maximum.

◆ MAX_LEVEL [2/2]

constexpr int alexaClientSDK::acsdkEqualizer::test::MAX_LEVEL = 10
static

Band level used as maximum value in tests.

◆ MIN_LEVEL [1/2]

constexpr int alexaClientSDK::acsdkEqualizer::test::MIN_LEVEL = -6
static

Band level used as a minimum .

◆ MIN_LEVEL [2/2]

constexpr int alexaClientSDK::acsdkEqualizer::test::MIN_LEVEL = -10
static

Band level used as minimum value in tests.

◆ NON_DEFAULT_MIDRANGE

constexpr int alexaClientSDK::acsdkEqualizer::test::NON_DEFAULT_MIDRANGE = 4
static

A sample band level for MIDRANGE band different from default.

◆ NON_DEFAULT_TREBLE

constexpr int alexaClientSDK::acsdkEqualizer::test::NON_DEFAULT_TREBLE = -5
static

A sample band level for TREBLE band different from default.

◆ STABILITY_CHECK_ITERATIONS

constexpr int alexaClientSDK::acsdkEqualizer::test::STABILITY_CHECK_ITERATIONS = 100
static

Number of times to perform an operation to make sure that it provides consistent results.

◆ VALID_NUMBER_OF_BANDS

constexpr int alexaClientSDK::acsdkEqualizer::test::VALID_NUMBER_OF_BANDS = 3
static

Valid number of output bands.

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