mirror of
https://github.com/mii443/AzooKeyKanaKanjiConverter.git
synced 2025-12-03 02:58:27 +00:00
fix: input rangeの間違った設定を修正
This commit is contained in:
@@ -320,8 +320,6 @@ public final class DicdataStore {
|
|||||||
}
|
}
|
||||||
dynamicDicdata[depth, default: []].append(data.adjustedData(adjust))
|
dynamicDicdata[depth, default: []].append(data.adjustedData(adjust))
|
||||||
}
|
}
|
||||||
// stringToInfoにも追加(getLOUDSDataInRangeでの処理のため)
|
|
||||||
stringToInfo.append((Array(data.ruby), (depth - 1, info.penalty)))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if availableMaxIndex < characters.endIndex - 1 {
|
if availableMaxIndex < characters.endIndex - 1 {
|
||||||
|
|||||||
@@ -290,6 +290,7 @@ final class DicdataStoreTests: XCTestCase {
|
|||||||
sequentialInput(&c, sequence: "tesutowaーdo", inputStyle: .roman2kana)
|
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)
|
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 == "テストワード"}))
|
XCTAssertTrue(result.contains(where: {$0.data.word == "テストワード"}))
|
||||||
|
XCTAssertEqual(result.first(where: {$0.data.word == "テストワード"})?.inputRange, 0 ..< 11)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 動的ユーザ辞書の単語が通常の辞書よりも優先されることのテスト
|
// 動的ユーザ辞書の単語が通常の辞書よりも優先されることのテスト
|
||||||
|
|||||||
Reference in New Issue
Block a user