fix: input rangeの間違った設定を修正

This commit is contained in:
Miwa / Ensan
2025-07-06 18:51:46 +09:00
parent 5599566147
commit 947ca5e689
2 changed files with 1 additions and 2 deletions

View File

@ -320,8 +320,6 @@ public final class DicdataStore {
}
dynamicDicdata[depth, default: []].append(data.adjustedData(adjust))
}
// stringToInfogetLOUDSDataInRange
stringToInfo.append((Array(data.ruby), (depth - 1, info.penalty)))
}
}
if availableMaxIndex < characters.endIndex - 1 {

View File

@ -290,6 +290,7 @@ final class DicdataStoreTests: XCTestCase {
sequentialInput(&c, sequence: "tesutowaーdo", inputStyle: .roman2kana)
let result = dicdataStore.getLOUDSDataInRange(inputData: c, from: 0, toIndexRange: c.input.endIndex - 1 ..< c.input.endIndex, needTypoCorrection: false)
XCTAssertTrue(result.contains(where: {$0.data.word == "テストワード"}))
XCTAssertEqual(result.first(where: {$0.data.word == "テストワード"})?.inputRange, 0 ..< 11)
}
//