Skip to content

Commit

Permalink
Changed String.format to String template (ankidroid#12871)
Browse files Browse the repository at this point in the history
* Changed String.format to String template

* Revert changes
  • Loading branch information
SanjaySargam authored Nov 21, 2022
1 parent 2d6d53b commit 0febc58
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ abstract class NoteEditorTest protected constructor() {
fun before() {
for (invalid in invalidSdksImpl) {
Assume.assumeThat(
String.format("Test fails on Travis API %d", invalid),
"Test fails on Travis API $invalid",
Build.VERSION.SDK_INT,
Matchers.not(
Matchers.`is`(invalid)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class ImportTest : InstrumentedTest() {
os.close()
imp = Anki2Importer(empty, testCol.path)
imp.run()
expected = listOf("foo.mp3", String.format("foo_%s.mp3", mid))
expected = listOf("foo.mp3", "foo_$mid.mp3")
actual = mutableListOf(*File(empty.media.dir()).list()!!)
actual.retainAll(expected)
assertEquals(expected.size.toLong(), actual.size.toLong())
Expand All @@ -126,7 +126,7 @@ class ImportTest : InstrumentedTest() {
os.close()
imp = Anki2Importer(empty, testCol.path)
imp.run()
expected = listOf("foo.mp3", String.format("foo_%s.mp3", mid))
expected = listOf("foo.mp3", "foo_$mid.mp3")
actual = mutableListOf(*File(empty.media.dir()).list()!!)
actual.retainAll(expected)
assertEquals(expected.size.toLong(), actual.size.toLong())
Expand Down

0 comments on commit 0febc58

Please sign in to comment.