Fix misc-misplaced-const
warnings in Yoga tests (#1677)
Summary: Pull Request resolved: https://github.com/facebook/yoga/pull/1677 We have Clang Tidy warnings enabled internally, that will flag `const YG*Ref` as misleading, as a const pointer to non-const, instead of non-const pointer to const. Let's remove all the misleading const in existing tests, and generated tests. Reviewed By: joevilches Differential Revision: D59335968 fbshipit-source-id: c66af878904ba7900f8ffcd99162968d90f8e5c7
This commit is contained in:
committed by
Facebook GitHub Bot
parent
e4fe14ab3e
commit
5009f5c1ac
@@ -10,7 +10,7 @@
|
||||
#include <array>
|
||||
|
||||
TEST(YogaTest, computed_layout_padding) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
YGNodeStyleSetPaddingPercent(root, YGEdgeStart, 10);
|
||||
@@ -43,7 +43,7 @@ TEST(YogaTest, padding_side_overrides_horizontal_and_vertical) {
|
||||
? YGEdgeVertical
|
||||
: YGEdgeHorizontal;
|
||||
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
YGNodeStyleSetPadding(root, horizontalOrVertical, 10);
|
||||
@@ -69,7 +69,7 @@ TEST(YogaTest, padding_side_overrides_all) {
|
||||
|
||||
for (float edgeValue = 0; edgeValue < 2; ++edgeValue) {
|
||||
for (const auto& edge : edges) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
YGNodeStyleSetPadding(root, YGEdgeAll, 10);
|
||||
@@ -89,7 +89,7 @@ TEST(YogaTest, padding_horizontal_and_vertical_overrides_all) {
|
||||
|
||||
for (float directionValue = 0; directionValue < 2; ++directionValue) {
|
||||
for (const auto& direction : directions) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
YGNodeStyleSetPadding(root, YGEdgeAll, 10);
|
||||
|
Reference in New Issue
Block a user