Skip to content

Commit

Permalink
fix: testコードでのエラーを修正
Browse files Browse the repository at this point in the history
  • Loading branch information
ensan-hcl committed Sep 28, 2024
1 parent 5916f34 commit 84dfb9f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ final class DicdataStoreTests: XCTestCase {
for (key, word) in mustWords {
var c = ComposingText()
c.insertAtCursorPosition(key, inputStyle: .direct)
let result = dicdataStore.getLOUDSData(inputData: c, from: 0, to: c.input.endIndex - 1)
let result = dicdataStore.getLOUDSData(inputData: c, from: 0, to: c.input.endIndex - 1, needTypoCorrection: false)
// 冗長な書き方だが、こうすることで「どの項目でエラーが発生したのか」がはっきりするため、こう書いている。
XCTAssertEqual(result.first(where: {$0.data.word == word})?.data.word, word)
}
Expand All @@ -80,7 +80,7 @@ final class DicdataStoreTests: XCTestCase {
for (key, word) in mustWords {
var c = ComposingText()
c.insertAtCursorPosition(key, inputStyle: .direct)
let result = dicdataStore.getLOUDSData(inputData: c, from: 0, to: c.input.endIndex - 1)
let result = dicdataStore.getLOUDSData(inputData: c, from: 0, to: c.input.endIndex - 1, needTypoCorrection: false)
XCTAssertNil(result.first(where: {$0.data.word == word && $0.data.ruby == key}))
}
}
Expand Down

0 comments on commit 84dfb9f

Please sign in to comment.