Merge "Avoid sub_overflow_minimal in AIDL effects VTS" into main
This commit is contained in:
commit
5348432dea
2 changed files with 4 additions and 4 deletions
|
@ -250,11 +250,11 @@ class EffectHelper {
|
|||
maxLimit = std::numeric_limits<S>::max();
|
||||
if (s.size()) {
|
||||
const auto min = *s.begin(), max = *s.rbegin();
|
||||
s.insert(min + (max - min) / 2);
|
||||
if (min != minLimit) {
|
||||
s.insert((min & max) + ((min ^ max) >> 1));
|
||||
if (min > minLimit + 1) {
|
||||
s.insert(min - 1);
|
||||
}
|
||||
if (max != maxLimit) {
|
||||
if (max < maxLimit - 1) {
|
||||
s.insert(max + 1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -208,7 +208,7 @@ INSTANTIATE_TEST_SUITE_P(
|
|||
HapticGeneratorInvalidTest, HapticGeneratorParamTest,
|
||||
::testing::Combine(testing::ValuesIn(EffectFactoryHelper::getAllEffectDescriptors(
|
||||
IFactory::descriptor, getEffectTypeUuidHapticGenerator())),
|
||||
testing::Values(MIN_ID - 1),
|
||||
testing::Values(MIN_ID),
|
||||
testing::Values(HapticGenerator::VibratorScale::NONE),
|
||||
testing::Values(MIN_FLOAT), testing::Values(MIN_FLOAT),
|
||||
testing::Values(MIN_FLOAT)),
|
||||
|
|
Loading…
Reference in a new issue