Skip to content

Commit

Permalink
Simplify CSSFlexTests
Browse files Browse the repository at this point in the history
  • Loading branch information
Schahen committed Jul 20, 2021
1 parent ef56aba commit f4fc51f
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions web/core/src/jsTest/kotlin/css/CSSFlexTests.kt
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,11 @@ class CSSFlexTests {
}
}

flexDirections.forEachIndexed { i, flexDirection ->
flexWraps.forEachIndexed { j, flexWrap ->
flexDirections.forEach { flexDirection ->
flexWraps.forEach { flexWrap ->
assertEquals(
"${flexDirection.value} ${flexWrap.value}",
(root.children[3 * i + j % 3] as HTMLElement).style.flexFlow
(nextChild()).style.flexFlow
)
}
}
Expand All @@ -161,10 +161,10 @@ class CSSFlexTests {
}
}

enumValues.forEachIndexed { index, justifyContent ->
enumValues.forEach { justifyContent ->
assertEquals(
"${justifyContent.value}",
(root.children[index] as HTMLElement).style.justifyContent
justifyContent.value,
(nextChild()).style.justifyContent
)
}
}
Expand All @@ -184,10 +184,10 @@ class CSSFlexTests {
}
}

enumValues.forEachIndexed { index, alignSelf ->
enumValues.forEach { alignSelf ->
assertEquals(
"${alignSelf.value}",
(root.children[index] as HTMLElement).style.alignSelf
alignSelf.value,
nextChild().style.alignSelf
)
}
}
Expand All @@ -209,7 +209,7 @@ class CSSFlexTests {

enumValues.forEachIndexed { index, alignItems ->
assertEquals(
"${alignItems.value}",
alignItems.value,
(root.children[index] as HTMLElement).style.alignItems
)
}
Expand All @@ -230,10 +230,10 @@ class CSSFlexTests {
}
}

enumValues.forEachIndexed { index, alignContent ->
enumValues.forEach { alignContent ->
assertEquals(
"${alignContent.value}",
(root.children[index] as HTMLElement).style.alignContent
alignContent.value,
(nextChild()).style.alignContent
)
}
}
Expand All @@ -253,10 +253,10 @@ class CSSFlexTests {
}
}

enumValues.forEachIndexed { index, displayStyle ->
enumValues.forEach { displayStyle ->
assertEquals(
"${displayStyle.value}",
(root.children[index] as HTMLElement).style.flexDirection
displayStyle.value,
(nextChild()).style.flexDirection
)
}
}
Expand All @@ -277,10 +277,10 @@ class CSSFlexTests {
}
}

enumValues.forEachIndexed { index, displayStyle ->
enumValues.forEach { displayStyle ->
assertEquals(
"${displayStyle.value}",
(root.children[index] as HTMLElement).style.flexWrap
displayStyle.value,
nextChild().style.flexWrap
)
}
}
Expand Down

0 comments on commit f4fc51f

Please sign in to comment.