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
@@ -9,8 +9,8 @@
|
||||
#include <yoga/Yoga.h>
|
||||
|
||||
TEST(YogaTest, copy_style_same) {
|
||||
const YGNodeRef node0 = YGNodeNew();
|
||||
const YGNodeRef node1 = YGNodeNew();
|
||||
YGNodeRef node0 = YGNodeNew();
|
||||
YGNodeRef node1 = YGNodeNew();
|
||||
|
||||
YGNodeCopyStyle(node0, node1);
|
||||
|
||||
@@ -19,11 +19,11 @@ TEST(YogaTest, copy_style_same) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, copy_style_modified) {
|
||||
const YGNodeRef node0 = YGNodeNew();
|
||||
YGNodeRef node0 = YGNodeNew();
|
||||
ASSERT_EQ(YGFlexDirectionColumn, YGNodeStyleGetFlexDirection(node0));
|
||||
ASSERT_FALSE(YGNodeStyleGetMaxHeight(node0).unit != YGUnitUndefined);
|
||||
|
||||
const YGNodeRef node1 = YGNodeNew();
|
||||
YGNodeRef node1 = YGNodeNew();
|
||||
YGNodeStyleSetFlexDirection(node1, YGFlexDirectionRow);
|
||||
YGNodeStyleSetMaxHeight(node1, 10);
|
||||
|
||||
@@ -36,12 +36,12 @@ TEST(YogaTest, copy_style_modified) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, copy_style_modified_same) {
|
||||
const YGNodeRef node0 = YGNodeNew();
|
||||
YGNodeRef node0 = YGNodeNew();
|
||||
YGNodeStyleSetFlexDirection(node0, YGFlexDirectionRow);
|
||||
YGNodeStyleSetMaxHeight(node0, 10);
|
||||
YGNodeCalculateLayout(node0, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
|
||||
const YGNodeRef node1 = YGNodeNew();
|
||||
YGNodeRef node1 = YGNodeNew();
|
||||
YGNodeStyleSetFlexDirection(node1, YGFlexDirectionRow);
|
||||
YGNodeStyleSetMaxHeight(node1, 10);
|
||||
|
||||
@@ -52,7 +52,7 @@ TEST(YogaTest, copy_style_modified_same) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, initialise_flexShrink_flexGrow) {
|
||||
const YGNodeRef node0 = YGNodeNew();
|
||||
YGNodeRef node0 = YGNodeNew();
|
||||
YGNodeStyleSetFlexShrink(node0, 1);
|
||||
ASSERT_EQ(1, YGNodeStyleGetFlexShrink(node0));
|
||||
|
||||
|
Reference in New Issue
Block a user