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
@@ -5,7 +5,7 @@
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* clang-format off
|
||||
* @generated SignedSource<<978290b757d2f39abc464e60100f422f>>
|
||||
* @generated SignedSource<<6b9e472d3a0bac5e3a5501788c9971c6>>
|
||||
* generated by gentest/gentest-driver.ts from gentest/fixtures/YGBorderTest.html
|
||||
*/
|
||||
|
||||
@@ -14,9 +14,9 @@
|
||||
#include "../util/TestUtil.h"
|
||||
|
||||
TEST(YogaTest, border_no_size) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetBorder(root, YGEdgeLeft, 10);
|
||||
YGNodeStyleSetBorder(root, YGEdgeTop, 10);
|
||||
@@ -42,16 +42,16 @@ TEST(YogaTest, border_no_size) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, border_container_match_child) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetBorder(root, YGEdgeLeft, 10);
|
||||
YGNodeStyleSetBorder(root, YGEdgeTop, 10);
|
||||
YGNodeStyleSetBorder(root, YGEdgeRight, 10);
|
||||
YGNodeStyleSetBorder(root, YGEdgeBottom, 10);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 10);
|
||||
YGNodeStyleSetHeight(root_child0, 10);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -85,9 +85,9 @@ TEST(YogaTest, border_container_match_child) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, border_flex_child) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetBorder(root, YGEdgeLeft, 10);
|
||||
YGNodeStyleSetBorder(root, YGEdgeTop, 10);
|
||||
@@ -96,7 +96,7 @@ TEST(YogaTest, border_flex_child) {
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetWidth(root_child0, 10);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -130,9 +130,9 @@ TEST(YogaTest, border_flex_child) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, border_stretch_child) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetBorder(root, YGEdgeLeft, 10);
|
||||
YGNodeStyleSetBorder(root, YGEdgeTop, 10);
|
||||
@@ -141,7 +141,7 @@ TEST(YogaTest, border_stretch_child) {
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetHeight(root_child0, 10);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
@@ -174,9 +174,9 @@ TEST(YogaTest, border_stretch_child) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, border_center_child) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetJustifyContent(root, YGJustifyCenter);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignCenter);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
@@ -186,7 +186,7 @@ TEST(YogaTest, border_center_child) {
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 10);
|
||||
YGNodeStyleSetHeight(root_child0, 10);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
Reference in New Issue
Block a user