diff --git a/Sources/Layout/LayoutItem.swift b/Sources/Layout/LayoutItem.swift index 0bf065f5..5129d806 100644 --- a/Sources/Layout/LayoutItem.swift +++ b/Sources/Layout/LayoutItem.swift @@ -250,11 +250,20 @@ extension LayoutItem { insets: NSDirectionalEdgeInsets = .zero, priority: UILayoutPriority = .required ) -> LayoutItem { - self - .toMargin(.leading, insets.leading, priority: priority) - .toMargin(.trailing, -insets.trailing, priority: priority) - .toMargin(.top, insets.top, priority: priority) - .toMargin(.bottom, -insets.bottom, priority: priority) + addingSuperviewConstraints { + $0.layoutItemView + .constraint(for: .top, toSuperview: .topMargin, constant: insets.top) + .withPriority(priority) + $0.layoutItemView + .constraint(for: .bottom, toSuperview: .bottomMargin, constant: -insets.bottom) + .withPriority(priority) + $0.layoutItemView + .constraint(for: .leading, toSuperview: .leadingMargin, constant: insets.leading) + .withPriority(priority) + $0.layoutItemView + .constraint(for: .trailing, toSuperview: .trailingMargin, constant: -insets.trailing) + .withPriority(priority) + } } /// Constrains the view to the margins of the superview with an `inset`. @@ -376,58 +385,6 @@ extension LayoutItem { } } - /// Constrains the `attribute` to the superview's corresponding `attribute` margin - /// - /// - Note: - /// Equation: view.attribute = multiplier × superview.attribute + constant - /// - Parameters: - /// - attribute: attribute to constrain - /// - relation: (optional) relationship (=, ≤, ≥) - /// - multiplier: (optional) multiplier - /// - constant: (optional) constant - /// - priority: (optional) priority of constraint - public func toMargin( - _ attribute: NSLayoutConstraint.Attribute, - is relation: NSLayoutConstraint.Relation = .equal, - multiplier: CGFloat = 1, - _ constant: CGFloat = 0, - priority: UILayoutPriority = .required - ) -> LayoutItem { - addingSuperviewConstraints { - $0.layoutItemView - .constraint(for: attribute, - is: relation, - toSuperview: attribute.marginAttribute, - multiplier: multiplier, - constant: constant) - .withPriority(priority) - } - } - - /// Constrains the `attributes` to the superview's corresponding `attributes` margin - /// - /// - Note: - /// Equation: view.attribute = superview.attribute + constant - /// - Parameters: - /// - attributes: attribute to constrain - /// - constant: (optional) constant - /// - priority: (optional) priority of constraint - public func toMargin( - _ attributes: [NSLayoutConstraint.Attribute], - _ constant: CGFloat = 0, - priority: UILayoutPriority = .required - ) -> LayoutItem { - addingSuperviewConstraints { - for attribute in attributes { - $0.layoutItemView - .constraint(for: attribute, - toSuperview: attribute.marginAttribute, - constant: constant) - .withPriority(priority) - } - } - } - /// Constrains the `bottom` to the bottom margin with a minimum bottom inset /// Useful for bottom-aligned elements on iPhoneX family devices that require /// an additional bottom margin on non-iPhoneX devices. diff --git a/Tests/LayoutTests/LayoutItemTests.swift b/Tests/LayoutTests/LayoutItemTests.swift index d27746ef..6484e19b 100644 --- a/Tests/LayoutTests/LayoutItemTests.swift +++ b/Tests/LayoutTests/LayoutItemTests.swift @@ -296,7 +296,7 @@ final class LayoutItemTests: XCTestCase { } } - func testToMarginWithInset_andWithPriority() { + func testToMarginsWithInset_andWithPriority() { assertLayout { view in view.layout { pinkView @@ -524,114 +524,6 @@ final class LayoutItemTests: XCTestCase { } } - func testToMargin_andWithMultiplier_andWithConstant_andWithPriority() { - assertLayout { view in - view.layout { - - // To Top Leading - - pinkView - .size(width: 100, height: 100) - .toMargin(.top) - .toMargin(.leading) - - // To Top Leading with Constant - - yellowView - .size(width: 100, height: 100) - .toMargin(.top, 100) - .toMargin(.leading, 100) - - // To Top Trailing with Multiplier - - blueView - .size(width: 100, height: 100) - .toMargin(.top) - .toMargin(.trailing, multiplier: 0.75) - - // To Bottom Leading with Bottom Multiplier and Constant - - greenView - .size(width: 100, height: 100) - .to(.bottom, multiplier: 0.75, 50) - .to(.leading) - - // To Bottom Trailing with Constant and Priority - - orangeView - .size(width: 100, height: 100) - .toMargin(.bottom, -100, priority: .low) - .toMargin(.bottom, -50, priority: .high) - .toMargin(.trailing, -50) - } - } - } - - func testToMarginWithRelation() { - assertLayout { view in - view.layout { - - // To Top Leading With Less Than Or Equal Relation and Higher Constraint - - pinkView - .size(width: 100, height: 100) - .toMargin(.top, is: .lessThanOrEqual, 100) - .toMargin(.top, 150, priority: .high) - .toMargin(.leading, 50) - - // To Top Trailing With Less Than Or Equal Relation and Lower Constraint - - yellowView - .size(width: 100, height: 100) - .toMargin(.top, is: .lessThanOrEqual, 100) - .toMargin(.top, 50, priority: .high) - .toMargin(.trailing, -50) - - // To Top Trailing With Greater Than Or Equal Relation and Lower Constraint - - blueView - .size(width: 100, height: 100) - .toMargin(.bottom, is: .greaterThanOrEqual, -100) - .toMargin(.bottom, -150, priority: .high) - .toMargin(.leading, 50) - - // To Top Trailing With Greater Than Or Equal Relation and Higher Constraint - - greenView - .size(width: 100, height: 100) - .toMargin(.bottom, is: .greaterThanOrEqual, -100) - .toMargin(.bottom, -50, priority: .high) - .toMargin(.trailing, -50) - } - } - } - - func testToMarginWithAttributes_andWithConstant_andWithPriority() { - assertLayout { view in - view.layout { - - // To Bottom Leading - - pinkView - .size(width: 100, height: 100) - .toMargin([.bottom, .leading]) - - // To Bottom Trailing with Constant - - yellowView - .size(width: 100, height: 100) - .toMargin([.bottom, .trailing], -100) - - // To Top Leading with Priority - - blueView - .size(width: 100, height: 100) - .toMargin([.top, .leading], 25, priority: .low) - .toMargin([.top, .leading], 100, priority: .high) - } - } - } - func testToBottomMargin_andWithPriority() { assertLayout { view in view.layout { diff --git a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithAttributes_andWithConstant_andWithPriority.iPhone-13-mini-portrait.png b/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithAttributes_andWithConstant_andWithPriority.iPhone-13-mini-portrait.png deleted file mode 100644 index 9a3cfd58..00000000 Binary files a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithAttributes_andWithConstant_andWithPriority.iPhone-13-mini-portrait.png and /dev/null differ diff --git a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithAttributes_andWithConstant_andWithPriority.iPhone-13-mini-portrait.txt b/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithAttributes_andWithConstant_andWithPriority.iPhone-13-mini-portrait.txt deleted file mode 100644 index b3b1f668..00000000 --- a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithAttributes_andWithConstant_andWithPriority.iPhone-13-mini-portrait.txt +++ /dev/null @@ -1,4 +0,0 @@ -> - | > - | > - | > \ No newline at end of file diff --git a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithAttributes_andWithConstant_andWithPriority.iPhone-13-portrait.png b/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithAttributes_andWithConstant_andWithPriority.iPhone-13-portrait.png deleted file mode 100644 index d6b8796d..00000000 Binary files a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithAttributes_andWithConstant_andWithPriority.iPhone-13-portrait.png and /dev/null differ diff --git a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithAttributes_andWithConstant_andWithPriority.iPhone-13-portrait.txt b/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithAttributes_andWithConstant_andWithPriority.iPhone-13-portrait.txt deleted file mode 100644 index 669b20d6..00000000 --- a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithAttributes_andWithConstant_andWithPriority.iPhone-13-portrait.txt +++ /dev/null @@ -1,4 +0,0 @@ -> - | > - | > - | > \ No newline at end of file diff --git a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithAttributes_andWithConstant_andWithPriority.iPhone-8-portrait.png b/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithAttributes_andWithConstant_andWithPriority.iPhone-8-portrait.png deleted file mode 100644 index 2dca4cdd..00000000 Binary files a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithAttributes_andWithConstant_andWithPriority.iPhone-8-portrait.png and /dev/null differ diff --git a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithAttributes_andWithConstant_andWithPriority.iPhone-8-portrait.txt b/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithAttributes_andWithConstant_andWithPriority.iPhone-8-portrait.txt deleted file mode 100644 index 5cb8e13d..00000000 --- a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithAttributes_andWithConstant_andWithPriority.iPhone-8-portrait.txt +++ /dev/null @@ -1,4 +0,0 @@ -> - | > - | > - | > \ No newline at end of file diff --git a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithAttributes_andWithConstant_andWithPriority.iPhone-SE-portrait.png b/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithAttributes_andWithConstant_andWithPriority.iPhone-SE-portrait.png deleted file mode 100644 index 5e7dd8b4..00000000 Binary files a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithAttributes_andWithConstant_andWithPriority.iPhone-SE-portrait.png and /dev/null differ diff --git a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithAttributes_andWithConstant_andWithPriority.iPhone-SE-portrait.txt b/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithAttributes_andWithConstant_andWithPriority.iPhone-SE-portrait.txt deleted file mode 100644 index d1c53e42..00000000 --- a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithAttributes_andWithConstant_andWithPriority.iPhone-SE-portrait.txt +++ /dev/null @@ -1,4 +0,0 @@ -> - | > - | > - | > \ No newline at end of file diff --git a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithAttributes_andWithConstant_andWithPriority.iPhone-X-portrait.png b/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithAttributes_andWithConstant_andWithPriority.iPhone-X-portrait.png deleted file mode 100644 index 0e2b8e2d..00000000 Binary files a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithAttributes_andWithConstant_andWithPriority.iPhone-X-portrait.png and /dev/null differ diff --git a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithAttributes_andWithConstant_andWithPriority.iPhone-X-portrait.txt b/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithAttributes_andWithConstant_andWithPriority.iPhone-X-portrait.txt deleted file mode 100644 index 60d9988d..00000000 --- a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithAttributes_andWithConstant_andWithPriority.iPhone-X-portrait.txt +++ /dev/null @@ -1,4 +0,0 @@ -> - | > - | > - | > \ No newline at end of file diff --git a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithRelation.iPhone-13-mini-portrait.png b/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithRelation.iPhone-13-mini-portrait.png deleted file mode 100644 index 4cdaece4..00000000 Binary files a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithRelation.iPhone-13-mini-portrait.png and /dev/null differ diff --git a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithRelation.iPhone-13-mini-portrait.txt b/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithRelation.iPhone-13-mini-portrait.txt deleted file mode 100644 index 86e7b07f..00000000 --- a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithRelation.iPhone-13-mini-portrait.txt +++ /dev/null @@ -1,5 +0,0 @@ -> - | > - | > - | > - | > \ No newline at end of file diff --git a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithRelation.iPhone-13-portrait.png b/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithRelation.iPhone-13-portrait.png deleted file mode 100644 index 943becb0..00000000 Binary files a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithRelation.iPhone-13-portrait.png and /dev/null differ diff --git a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithRelation.iPhone-13-portrait.txt b/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithRelation.iPhone-13-portrait.txt deleted file mode 100644 index 22a0c5ec..00000000 --- a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithRelation.iPhone-13-portrait.txt +++ /dev/null @@ -1,5 +0,0 @@ -> - | > - | > - | > - | > \ No newline at end of file diff --git a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithRelation.iPhone-8-portrait.png b/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithRelation.iPhone-8-portrait.png deleted file mode 100644 index 22608732..00000000 Binary files a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithRelation.iPhone-8-portrait.png and /dev/null differ diff --git a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithRelation.iPhone-8-portrait.txt b/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithRelation.iPhone-8-portrait.txt deleted file mode 100644 index c6cd1982..00000000 --- a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithRelation.iPhone-8-portrait.txt +++ /dev/null @@ -1,5 +0,0 @@ -> - | > - | > - | > - | > \ No newline at end of file diff --git a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithRelation.iPhone-SE-portrait.png b/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithRelation.iPhone-SE-portrait.png deleted file mode 100644 index edddcbf2..00000000 Binary files a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithRelation.iPhone-SE-portrait.png and /dev/null differ diff --git a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithRelation.iPhone-SE-portrait.txt b/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithRelation.iPhone-SE-portrait.txt deleted file mode 100644 index 54921cb3..00000000 --- a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithRelation.iPhone-SE-portrait.txt +++ /dev/null @@ -1,5 +0,0 @@ -> - | > - | > - | > - | > \ No newline at end of file diff --git a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithRelation.iPhone-X-portrait.png b/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithRelation.iPhone-X-portrait.png deleted file mode 100644 index 74dcfafd..00000000 Binary files a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithRelation.iPhone-X-portrait.png and /dev/null differ diff --git a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithRelation.iPhone-X-portrait.txt b/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithRelation.iPhone-X-portrait.txt deleted file mode 100644 index c0cae8bf..00000000 --- a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithRelation.iPhone-X-portrait.txt +++ /dev/null @@ -1,5 +0,0 @@ -> - | > - | > - | > - | > \ No newline at end of file diff --git a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMargin_andWithMultiplier_andWithConstant_andWithPriority.iPhone-13-mini-portrait.png b/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMargin_andWithMultiplier_andWithConstant_andWithPriority.iPhone-13-mini-portrait.png deleted file mode 100644 index 93c25889..00000000 Binary files a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMargin_andWithMultiplier_andWithConstant_andWithPriority.iPhone-13-mini-portrait.png and /dev/null differ diff --git a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMargin_andWithMultiplier_andWithConstant_andWithPriority.iPhone-13-mini-portrait.txt b/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMargin_andWithMultiplier_andWithConstant_andWithPriority.iPhone-13-mini-portrait.txt deleted file mode 100644 index acac638c..00000000 --- a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMargin_andWithMultiplier_andWithConstant_andWithPriority.iPhone-13-mini-portrait.txt +++ /dev/null @@ -1,6 +0,0 @@ -> - | > - | > - | > - | > - | > \ No newline at end of file diff --git a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMargin_andWithMultiplier_andWithConstant_andWithPriority.iPhone-13-portrait.png b/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMargin_andWithMultiplier_andWithConstant_andWithPriority.iPhone-13-portrait.png deleted file mode 100644 index dde65b93..00000000 Binary files a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMargin_andWithMultiplier_andWithConstant_andWithPriority.iPhone-13-portrait.png and /dev/null differ diff --git a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMargin_andWithMultiplier_andWithConstant_andWithPriority.iPhone-13-portrait.txt b/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMargin_andWithMultiplier_andWithConstant_andWithPriority.iPhone-13-portrait.txt deleted file mode 100644 index a822df9d..00000000 --- a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMargin_andWithMultiplier_andWithConstant_andWithPriority.iPhone-13-portrait.txt +++ /dev/null @@ -1,6 +0,0 @@ -> - | > - | > - | > - | > - | > \ No newline at end of file diff --git a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMargin_andWithMultiplier_andWithConstant_andWithPriority.iPhone-8-portrait.png b/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMargin_andWithMultiplier_andWithConstant_andWithPriority.iPhone-8-portrait.png deleted file mode 100644 index 6468f55b..00000000 Binary files a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMargin_andWithMultiplier_andWithConstant_andWithPriority.iPhone-8-portrait.png and /dev/null differ diff --git a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMargin_andWithMultiplier_andWithConstant_andWithPriority.iPhone-8-portrait.txt b/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMargin_andWithMultiplier_andWithConstant_andWithPriority.iPhone-8-portrait.txt deleted file mode 100644 index 84e0b43e..00000000 --- a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMargin_andWithMultiplier_andWithConstant_andWithPriority.iPhone-8-portrait.txt +++ /dev/null @@ -1,6 +0,0 @@ -> - | > - | > - | > - | > - | > \ No newline at end of file diff --git a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMargin_andWithMultiplier_andWithConstant_andWithPriority.iPhone-SE-portrait.png b/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMargin_andWithMultiplier_andWithConstant_andWithPriority.iPhone-SE-portrait.png deleted file mode 100644 index 7c07942c..00000000 Binary files a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMargin_andWithMultiplier_andWithConstant_andWithPriority.iPhone-SE-portrait.png and /dev/null differ diff --git a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMargin_andWithMultiplier_andWithConstant_andWithPriority.iPhone-SE-portrait.txt b/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMargin_andWithMultiplier_andWithConstant_andWithPriority.iPhone-SE-portrait.txt deleted file mode 100644 index 39296db4..00000000 --- a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMargin_andWithMultiplier_andWithConstant_andWithPriority.iPhone-SE-portrait.txt +++ /dev/null @@ -1,6 +0,0 @@ -> - | > - | > - | > - | > - | > \ No newline at end of file diff --git a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMargin_andWithMultiplier_andWithConstant_andWithPriority.iPhone-X-portrait.png b/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMargin_andWithMultiplier_andWithConstant_andWithPriority.iPhone-X-portrait.png deleted file mode 100644 index 224c4806..00000000 Binary files a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMargin_andWithMultiplier_andWithConstant_andWithPriority.iPhone-X-portrait.png and /dev/null differ diff --git a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMargin_andWithMultiplier_andWithConstant_andWithPriority.iPhone-X-portrait.txt b/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMargin_andWithMultiplier_andWithConstant_andWithPriority.iPhone-X-portrait.txt deleted file mode 100644 index 160ef6a9..00000000 --- a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMargin_andWithMultiplier_andWithConstant_andWithPriority.iPhone-X-portrait.txt +++ /dev/null @@ -1,6 +0,0 @@ -> - | > - | > - | > - | > - | > \ No newline at end of file diff --git a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithInset_andWithPriority.iPhone-13-mini-portrait.png b/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginsWithInset_andWithPriority.iPhone-13-mini-portrait.png similarity index 100% rename from Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithInset_andWithPriority.iPhone-13-mini-portrait.png rename to Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginsWithInset_andWithPriority.iPhone-13-mini-portrait.png diff --git a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithInset_andWithPriority.iPhone-13-mini-portrait.txt b/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginsWithInset_andWithPriority.iPhone-13-mini-portrait.txt similarity index 100% rename from Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithInset_andWithPriority.iPhone-13-mini-portrait.txt rename to Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginsWithInset_andWithPriority.iPhone-13-mini-portrait.txt diff --git a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithInset_andWithPriority.iPhone-13-portrait.png b/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginsWithInset_andWithPriority.iPhone-13-portrait.png similarity index 100% rename from Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithInset_andWithPriority.iPhone-13-portrait.png rename to Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginsWithInset_andWithPriority.iPhone-13-portrait.png diff --git a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithInset_andWithPriority.iPhone-13-portrait.txt b/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginsWithInset_andWithPriority.iPhone-13-portrait.txt similarity index 100% rename from Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithInset_andWithPriority.iPhone-13-portrait.txt rename to Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginsWithInset_andWithPriority.iPhone-13-portrait.txt diff --git a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithInset_andWithPriority.iPhone-8-portrait.png b/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginsWithInset_andWithPriority.iPhone-8-portrait.png similarity index 100% rename from Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithInset_andWithPriority.iPhone-8-portrait.png rename to Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginsWithInset_andWithPriority.iPhone-8-portrait.png diff --git a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithInset_andWithPriority.iPhone-8-portrait.txt b/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginsWithInset_andWithPriority.iPhone-8-portrait.txt similarity index 100% rename from Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithInset_andWithPriority.iPhone-8-portrait.txt rename to Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginsWithInset_andWithPriority.iPhone-8-portrait.txt diff --git a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithInset_andWithPriority.iPhone-SE-portrait.png b/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginsWithInset_andWithPriority.iPhone-SE-portrait.png similarity index 100% rename from Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithInset_andWithPriority.iPhone-SE-portrait.png rename to Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginsWithInset_andWithPriority.iPhone-SE-portrait.png diff --git a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithInset_andWithPriority.iPhone-SE-portrait.txt b/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginsWithInset_andWithPriority.iPhone-SE-portrait.txt similarity index 100% rename from Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithInset_andWithPriority.iPhone-SE-portrait.txt rename to Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginsWithInset_andWithPriority.iPhone-SE-portrait.txt diff --git a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithInset_andWithPriority.iPhone-X-portrait.png b/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginsWithInset_andWithPriority.iPhone-X-portrait.png similarity index 100% rename from Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithInset_andWithPriority.iPhone-X-portrait.png rename to Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginsWithInset_andWithPriority.iPhone-X-portrait.png diff --git a/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithInset_andWithPriority.iPhone-X-portrait.txt b/Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginsWithInset_andWithPriority.iPhone-X-portrait.txt similarity index 100% rename from Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginWithInset_andWithPriority.iPhone-X-portrait.txt rename to Tests/LayoutTests/__Snapshots__/LayoutItemTests/testToMarginsWithInset_andWithPriority.iPhone-X-portrait.txt