Merge "vibrator vts: use CompositePrimitives enum_range" am: d895913f1b am: 8679c62cb7

Change-Id: I0ebc9c9add8bb89406fe0e9890ed688c7e8eb3f5
This commit is contained in:
Automerger Merge Worker 2020-01-14 17:31:16 +00:00
commit 48ea7213f3
3 changed files with 11 additions and 8 deletions

View file

@ -0,0 +1,7 @@
{
"presubmit": [
{
"name": "VtsHalVibratorTargetTest"
}
]
}

View file

@ -12,6 +12,7 @@ cc_test {
"android.hardware.vibrator-cpp", "android.hardware.vibrator-cpp",
], ],
test_suites: [ test_suites: [
"general-tests",
"vts-core", "vts-core",
], ],
} }

View file

@ -49,14 +49,9 @@ const std::vector<EffectStrength> kInvalidEffectStrengths = {
static_cast<EffectStrength>(static_cast<int8_t>(kEffectStrengths.back()) + 1), static_cast<EffectStrength>(static_cast<int8_t>(kEffectStrengths.back()) + 1),
}; };
// TODO(b/143992652): autogenerate const std::vector<CompositePrimitive> kCompositePrimitives{
const std::vector<CompositePrimitive> kCompositePrimitives = { android::enum_range<CompositePrimitive>().begin(),
CompositePrimitive::NOOP, CompositePrimitive::CLICK, android::enum_range<CompositePrimitive>().end()};
CompositePrimitive::THUD, CompositePrimitive::SPIN,
CompositePrimitive::QUICK_RISE, CompositePrimitive::SLOW_RISE,
CompositePrimitive::QUICK_FALL,
};
// TODO(b/143992652): autogenerate
const std::vector<CompositePrimitive> kInvalidPrimitives = { const std::vector<CompositePrimitive> kInvalidPrimitives = {
static_cast<CompositePrimitive>(static_cast<int32_t>(kCompositePrimitives.front()) - 1), static_cast<CompositePrimitive>(static_cast<int32_t>(kCompositePrimitives.front()) - 1),