Merge "Fix/suppress hwui/tests google-explicit-constructor warnings"
This commit is contained in:
@@ -31,7 +31,7 @@ static bool _BitmapFillrate(
|
||||
|
||||
class BitmapFillrate : public TestScene {
|
||||
public:
|
||||
BitmapFillrate(BitmapAllocationTestUtils::BitmapAllocator allocator)
|
||||
explicit BitmapFillrate(BitmapAllocationTestUtils::BitmapAllocator allocator)
|
||||
: TestScene(), mAllocator(allocator) {}
|
||||
|
||||
void createContent(int width, int height, Canvas& canvas) override {
|
||||
@@ -70,4 +70,4 @@ private:
|
||||
|
||||
BitmapAllocationTestUtils::BitmapAllocator mAllocator;
|
||||
std::vector<sp<RenderNode> > mNodes;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -26,7 +26,7 @@ static bool _BitmapShaders(BitmapAllocationTestUtils::registerBitmapAllocationSc
|
||||
|
||||
class BitmapShaders : public TestScene {
|
||||
public:
|
||||
BitmapShaders(BitmapAllocationTestUtils::BitmapAllocator allocator)
|
||||
explicit BitmapShaders(BitmapAllocationTestUtils::BitmapAllocator allocator)
|
||||
: TestScene(), mAllocator(allocator) {}
|
||||
|
||||
sp<RenderNode> card;
|
||||
|
||||
@@ -48,7 +48,7 @@ static bool _TvAppNoRoundedCornerColorFilter(
|
||||
|
||||
class TvApp : public TestScene {
|
||||
public:
|
||||
TvApp(BitmapAllocationTestUtils::BitmapAllocator allocator)
|
||||
explicit TvApp(BitmapAllocationTestUtils::BitmapAllocator allocator)
|
||||
: TestScene(), mAllocator(allocator) {}
|
||||
|
||||
sp<RenderNode> mBg;
|
||||
@@ -232,7 +232,7 @@ private:
|
||||
|
||||
class TvAppNoRoundedCorner : public TvApp {
|
||||
public:
|
||||
TvAppNoRoundedCorner(BitmapAllocationTestUtils::BitmapAllocator allocator) : TvApp(allocator) {}
|
||||
explicit TvAppNoRoundedCorner(BitmapAllocationTestUtils::BitmapAllocator allocator) : TvApp(allocator) {}
|
||||
|
||||
private:
|
||||
virtual float roundedCornerRadius() override { return dp(0); }
|
||||
@@ -240,7 +240,7 @@ private:
|
||||
|
||||
class TvAppColorFilter : public TvApp {
|
||||
public:
|
||||
TvAppColorFilter(BitmapAllocationTestUtils::BitmapAllocator allocator) : TvApp(allocator) {}
|
||||
explicit TvAppColorFilter(BitmapAllocationTestUtils::BitmapAllocator allocator) : TvApp(allocator) {}
|
||||
|
||||
private:
|
||||
virtual bool useOverlay() override { return false; }
|
||||
@@ -248,7 +248,7 @@ private:
|
||||
|
||||
class TvAppNoRoundedCornerColorFilter : public TvApp {
|
||||
public:
|
||||
TvAppNoRoundedCornerColorFilter(BitmapAllocationTestUtils::BitmapAllocator allocator)
|
||||
explicit TvAppNoRoundedCornerColorFilter(BitmapAllocationTestUtils::BitmapAllocator allocator)
|
||||
: TvApp(allocator) {}
|
||||
|
||||
private:
|
||||
|
||||
@@ -45,7 +45,7 @@ static void testProperty(std::function<void(RenderProperties&)> propSetupCallbac
|
||||
static const int CANVAS_HEIGHT = 100;
|
||||
class PropertyTestCanvas : public TestCanvasBase {
|
||||
public:
|
||||
PropertyTestCanvas(std::function<void(const SkCanvas&)> callback)
|
||||
explicit PropertyTestCanvas(std::function<void(const SkCanvas&)> callback)
|
||||
: TestCanvasBase(CANVAS_WIDTH, CANVAS_HEIGHT), mCallback(callback) {}
|
||||
void onDrawRect(const SkRect& rect, const SkPaint& paint) override {
|
||||
EXPECT_EQ(mDrawCounter++, 0);
|
||||
|
||||
@@ -95,7 +95,7 @@ TEST(ThreadBase, lifecyclePerf) {
|
||||
};
|
||||
|
||||
struct Counter {
|
||||
Counter(EventCount* count) : mCount(count) { mCount->construct++; }
|
||||
explicit Counter(EventCount* count) : mCount(count) { mCount->construct++; }
|
||||
|
||||
Counter(const Counter& other) : mCount(other.mCount) {
|
||||
if (mCount) mCount->copy++;
|
||||
@@ -148,4 +148,4 @@ TEST(ThreadBase, lifecycle) {
|
||||
ASSERT_EQ(1, dummyObject->getStrongCount());
|
||||
ASSERT_EQ(2, lifecycleTestHelper(dummyObject));
|
||||
ASSERT_EQ(1, dummyObject->getStrongCount());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user