Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit b18f1b1

Browse files
committed
Bug 1937785 - Use min to chomp the given string. r=botond,geckoview-reviewers,owlish.
Differential Revision: https://phabricator.services.mozilla.com/D232893
1 parent 9dd2357 commit b18f1b1

File tree

1 file changed

+2
-2
lines changed
  • mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/util

1 file changed

+2
-2
lines changed

mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/util/AssertUtils.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import android.util.Log
1010
import org.junit.Assert.assertEquals
1111
import org.junit.Assert.assertNotNull
1212
import java.io.ByteArrayOutputStream
13-
import kotlin.math.max
13+
import kotlin.math.min
1414

1515
object AssertUtils {
1616
private val lineLength = 1024
@@ -19,7 +19,7 @@ object AssertUtils {
1919

2020
private fun outputLongString(prefix: String, string: String) {
2121
for (i in 0..string.length step lineLength) {
22-
Log.d(LOGTAG, prefix + string.substring(i, max(i + lineLength, string.length)))
22+
Log.d(LOGTAG, prefix + string.substring(i, min(i + lineLength, string.length)))
2323
}
2424
}
2525

0 commit comments

Comments
 (0)