7#include "gtest/gtest.h"
24 ASSERT_TRUE(copy == stack);
36 ASSERT_TRUE(copy != stack);
39 auto iter = stack.
Bottom();
41 ASSERT_TRUE(iter->get()->GetRRect() == rrect);
44 ASSERT_TRUE(iter->get()->GetRect() == rect);
51 auto iter = stack.
Bottom();
53 ASSERT_TRUE(iter->get()->GetRect() == rect);
60 auto iter = stack.
Bottom();
62 ASSERT_TRUE(iter->get()->GetRRect() == rrect);
69 auto iter = stack.
Bottom();
71 ASSERT_TRUE(iter->get()->GetRSE() == rse);
78 auto iter = stack.
Bottom();
80 ASSERT_TRUE(iter->get()->GetPath() ==
path);
87 auto iter = stack.
Bottom();
89 ASSERT_TRUE(iter->get()->GetMatrix() == matrix);
96 auto iter = stack.
Bottom();
98 ASSERT_TRUE(iter->get()->GetAlpha() == 240);
103 const int num_of_mutators = 10;
104 for (
int i = 0;
i < num_of_mutators;
i++) {
109 auto iter = stack.
Begin();
111 while (iter != stack.
End()) {
113 ASSERT_EQ(iter->get()->GetFilterMutation().GetFilter().asBlur()->sigma_x(),
115 ASSERT_EQ(iter->get()->GetFilterMutation().GetFilterRect().GetX(),
i);
116 ASSERT_EQ(iter->get()->GetFilterMutation().GetFilterRect().GetY(),
i);
117 ASSERT_EQ(iter->get()->GetFilterMutation().GetFilterRect().GetWidth(),
i);
118 ASSERT_EQ(iter->get()->GetFilterMutation().GetFilterRect().GetHeight(),
i);
122 ASSERT_EQ(
i, num_of_mutators);
130 auto iter = stack.
Bottom();
131 ASSERT_TRUE(iter == stack.
Top());
142 auto iter = stack.
Bottom();
144 while (iter != stack.
Top()) {
148 ASSERT_TRUE(iter->get()->GetRRect() == rrect);
152 ASSERT_TRUE(iter->get()->GetRect() == rect);
156 ASSERT_TRUE(iter->get()->GetMatrix() == matrix);
190 uint8_t other_alpha = 240;
195 ASSERT_TRUE(stack == stack_other);
202 ASSERT_TRUE(mutator.
GetRect() == rect);
207 ASSERT_TRUE(mutator2.
GetRRect() == rrect);
212 ASSERT_TRUE(mutator2se.
GetRSE() == rse);
222 ASSERT_TRUE(mutator4.
GetMatrix() == matrix);
238 ASSERT_TRUE(mutator == copy);
243 ASSERT_TRUE(mutator2 == copy2);
248 ASSERT_TRUE(mutator2se == copy2se);
253 ASSERT_TRUE(mutator3 == copy3);
258 ASSERT_TRUE(mutator4 == copy4);
263 ASSERT_TRUE(mutator5 == copy5);
268 ASSERT_TRUE(mutator6 == copy6);
275 ASSERT_TRUE(mutator == other_mutator);
280 ASSERT_TRUE(mutator2 == other_mutator2);
285 ASSERT_TRUE(mutator3 == other_mutator3);
290 ASSERT_TRUE(mutator3se == other_mutator3se);
295 ASSERT_TRUE(mutator4 == other_mutator4);
296 ASSERT_FALSE(mutator2 == mutator);
301 ASSERT_TRUE(mutator5 == other_mutator5);
307 ASSERT_TRUE(mutator6 == other_mutator6);
315 ASSERT_TRUE(not_equal_mutator != mutator);
318 uint8_t alpha2 = 241;
321 ASSERT_TRUE(mutator2 != other_mutator2);
327 ASSERT_TRUE(mutator3 != other_mutator3);
static std::shared_ptr< DlImageFilter > MakeBlur(DlScalar sigma_x, DlScalar sigma_y, DlTileMode tile_mode)
const DlImageFilter & GetFilter() const
const DlMatrix & GetMatrix() const
const ImageFilterMutation & GetFilterMutation() const
MutatorType GetType() const
const DlPath & GetPath() const
const DlRoundSuperellipse & GetRSE() const
const DlRect & GetRect() const
const DlRoundRect & GetRRect() const
void PushTransform(const DlMatrix &matrix)
void PushBackdropFilter(const std::shared_ptr< DlImageFilter > &filter, const DlRect &filter_rect)
void PushClipRect(const DlRect &rect)
void PushClipPath(const DlPath &path)
const std::vector< std::shared_ptr< Mutator > >::const_reverse_iterator Top() const
const std::vector< std::shared_ptr< Mutator > >::const_reverse_iterator Bottom() const
const std::vector< std::shared_ptr< Mutator > >::const_iterator End() const
void PushClipRRect(const DlRoundRect &rrect)
void PushOpacity(const uint8_t &alpha)
void PushClipRSE(const DlRoundSuperellipse &rrect)
const std::vector< std::shared_ptr< Mutator > >::const_iterator Begin() const
TEST(NativeAssetsManagerTest, NoAvailableAssets)
impeller::RoundRect DlRoundRect
impeller::RoundSuperellipse DlRoundSuperellipse
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
A 4x4 matrix using column-major storage.
static constexpr Matrix MakeScale(const Vector3 &s)
static constexpr TRect MakeXYWH(Type x, Type y, Type width, Type height)