|
|
|
@ -21,6 +21,7 @@ import org.jetbrains.compose.web.css.ms
|
|
|
|
|
import org.jetbrains.compose.web.css.number |
|
|
|
|
import org.jetbrains.compose.web.css.pc |
|
|
|
|
import org.jetbrains.compose.web.css.percent |
|
|
|
|
import org.jetbrains.compose.web.css.plus |
|
|
|
|
import org.jetbrains.compose.web.css.pt |
|
|
|
|
import org.jetbrains.compose.web.css.px |
|
|
|
|
import org.jetbrains.compose.web.css.rad |
|
|
|
@ -222,4 +223,40 @@ class CSSUnitApiTests {
|
|
|
|
|
|
|
|
|
|
assertEquals(12.fr, 3 * 4.fr) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
fun addHomogenous() { |
|
|
|
|
assertEquals(13.percent, 7.percent + 4.percent + 2.percent) |
|
|
|
|
|
|
|
|
|
assertEquals(13.em, 7.em + 4.em + 2.em) |
|
|
|
|
assertEquals(13.ch, 7.ch + 4.ch + 2.ch) |
|
|
|
|
|
|
|
|
|
assertEquals(13.cssRem, 7.cssRem + 4.cssRem + 2.cssRem) |
|
|
|
|
|
|
|
|
|
assertEquals(13.vw, 7.vw + 4.vw + 2.vw) |
|
|
|
|
assertEquals(13.vh, 7.vh + 4.vh + 2.vh) |
|
|
|
|
|
|
|
|
|
assertEquals(13.vmin, 7.vmin + 4.vmin + 2.vmin) |
|
|
|
|
assertEquals(13.vmax, 7.vmax + 4.vmax + 2.vmax) |
|
|
|
|
assertEquals(13.cm, 7.cm + 4.cm + 2.cm) |
|
|
|
|
assertEquals(13.mm, 7.mm + 4.mm + 2.mm) |
|
|
|
|
|
|
|
|
|
assertEquals(13.pt, 7.pt + 4.pt + 2.pt) |
|
|
|
|
assertEquals(13.pc, 7.pc + 4.pc + 2.pc) |
|
|
|
|
assertEquals(13.px, 7.px + 4.px + 2.px) |
|
|
|
|
|
|
|
|
|
assertEquals(13.deg, 7.deg + 4.deg + 2.deg) |
|
|
|
|
assertEquals(13.grad, 7.grad + 4.grad + 2.grad) |
|
|
|
|
assertEquals(13.rad, 7.rad + 4.rad + 2.rad) |
|
|
|
|
assertEquals(13.turn, 7.turn + 4.turn + 2.turn) |
|
|
|
|
|
|
|
|
|
assertEquals(13.s, 7.s + 4.s + 2.s) |
|
|
|
|
assertEquals(13.ms, 7.ms + 4.ms + 2.ms) |
|
|
|
|
|
|
|
|
|
assertEquals(13.dpi, 7.dpi + 4.dpi + 2.dpi) |
|
|
|
|
assertEquals(13.dpcm, 7.dpcm + 4.dpcm + 2.dpcm) |
|
|
|
|
assertEquals(13.dppx, 7.dppx + 4.dppx + 2.dppx) |
|
|
|
|
|
|
|
|
|
assertEquals(13.fr, 7.fr + 4.fr + 2.fr) |
|
|
|
|
} |
|
|
|
|
} |