forked from flutter/engine
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add DlColorSource objects to hold information for SkShaders (flutter#…
- Loading branch information
Showing
34 changed files
with
2,341 additions
and
329 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// Copyright 2013 The Flutter Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#ifndef FLUTTER_DISPLAY_LIST_DISPLAY_LIST_ATTRIBUTES_TESTING_H_ | ||
#define FLUTTER_DISPLAY_LIST_DISPLAY_LIST_ATTRIBUTES_TESTING_H_ | ||
|
||
#include "flutter/display_list/display_list_attributes.h" | ||
#include "flutter/display_list/display_list_comparable.h" | ||
#include "gtest/gtest.h" | ||
|
||
namespace flutter { | ||
namespace testing { | ||
|
||
template <class T> | ||
static void TestEquals(T& source1, T& source2) { | ||
ASSERT_TRUE(source1 == source2); | ||
ASSERT_TRUE(source2 == source1); | ||
ASSERT_FALSE(source1 != source2); | ||
ASSERT_FALSE(source2 != source1); | ||
ASSERT_EQ(source1, source2); | ||
ASSERT_EQ(source2, source1); | ||
ASSERT_TRUE(Equals(&source1, &source2)); | ||
ASSERT_TRUE(Equals(source1.shared(), source2.shared())); | ||
} | ||
|
||
template <class T> | ||
static void TestNotEquals(T& source1, T& source2, std::string label) { | ||
ASSERT_FALSE(source1 == source2) << label; | ||
ASSERT_FALSE(source2 == source1) << label; | ||
ASSERT_TRUE(source1 != source2) << label; | ||
ASSERT_TRUE(source2 != source1) << label; | ||
ASSERT_NE(source1, source2) << label; | ||
ASSERT_NE(source2, source1) << label; | ||
ASSERT_TRUE(NotEquals(&source1, &source2)); | ||
ASSERT_TRUE(NotEquals(source1.shared(), source2.shared())); | ||
} | ||
|
||
} // namespace testing | ||
} // namespace flutter | ||
|
||
#endif // FLUTTER_DISPLAY_LIST_DISPLAY_LIST_ATTRIBUTES_TESTING_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.