Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b5df7268 authored by Tyler Freeman's avatar Tyler Freeman Committed by Automerger Merge Worker
Browse files

Merge "FontScaleConverterFactoryTest: 15x perf increase" into udc-dev am: 6e374e9b

parents e0ce9b2a 6e374e9b
Loading
Loading
Loading
Loading
+7 −3
Original line number Original line Diff line number Diff line
@@ -132,9 +132,13 @@ class FontScaleConverterFactoryTest {
            }
            }
            .forEach { (table, sp) ->
            .forEach { (table, sp) ->
                try {
                try {
                    // Truth is slow because it creates a bunch of
                    // objects. Don't use it unless we need to.
                    if (!table.convertSpToDp(sp).isFinite()) {
                        assertWithMessage("convertSpToDp(%s) on table: %s", sp, table)
                        assertWithMessage("convertSpToDp(%s) on table: %s", sp, table)
                            .that(table.convertSpToDp(sp))
                            .that(table.convertSpToDp(sp))
                            .isFinite()
                            .isFinite()
                    }
                } catch (e: Exception) {
                } catch (e: Exception) {
                    throw AssertionError("Exception during convertSpToDp($sp) on table: $table", e)
                    throw AssertionError("Exception during convertSpToDp($sp) on table: $table", e)
                }
                }