|
1 | 1 | # CleverKeys TODO |
2 | 2 |
|
| 3 | +## Completed (2026-02-11) |
| 4 | +- ✅ **Tier 2 instrumented tests**: 58 new tests on emulator.wtf (542 → 600 total) |
| 5 | + - SwipeMLDataStoreTest (36): SQLite CRUD, async store/load, search, pagination, statistics, |
| 6 | + batch operations, SwipeMLData model (JSON round-trip, validation, dedup, normalization) |
| 7 | + - ClipboardDatabaseTest (39): add/retrieve, expiry, pin/todo management, size limits, |
| 8 | + export/import round-trip, ClipboardEntry model, ordering, storage stats |
| 9 | + - LanguageDetectorTest enhanced (18 → 30): detectLanguageWithConfidence, |
| 10 | + detectLanguageFromWordsWithConfidence, unsupported language checks, DetectionResult data class |
| 11 | +- ✅ **Production bug fix**: PersonalizationManager.applyFrequencyDecay |
| 12 | + - Fixed ConcurrentHashMap.Entry.setValue UnsupportedOperationException on API 34 |
| 13 | + - Replaced removeIf+setValue with explicit iterate+put/remove pattern |
| 14 | +- ✅ **OOM test failures fixed**: WordPredictorTest + SwipePredictionTest (12 failures → 0) |
| 15 | + - WordPredictorTest: reflection-based 57-word test dictionary injection |
| 16 | + - SwipePredictionTest: OOM guard on NeuralSwipeTypingEngine construction |
| 17 | +- **Total test coverage**: ~898 local (770 pure + 128 mock) + 600 instrumented = ~1,498 tests |
| 18 | + |
3 | 19 | ## Completed (2026-02-10) |
4 | 20 | - ✅ **Major feature instrumented tests**: 94 new tests on emulator.wtf (427 → 521 total) |
5 | 21 | - SuggestionRankerTest (20): scoring formula, ranking, merge/dedup, language context, prefix boost |
|
8 | 24 | - EditorInfoHelperTest (22): action extraction, label/resource mapping, swap enter flag |
9 | 25 | - UserAdaptationManagerTest (22): singleton, selection tracking, multipliers, persistence |
10 | 26 | - BackupRestoreManagerTest (12): config/dict export-import round-trip, metadata, screen mismatch |
11 | | - - Documented production bug: PersonalizationManager.applyFrequencyDecay throws |
12 | | - UnsupportedOperationException on API 34 (ConcurrentHashMap.Entry.setValue) |
13 | | - - **Total test coverage**: 827 local (699 pure + 128 mock) + 521 instrumented = 1,348 tests |
14 | | - - 12 pre-existing OOM failures in WordPredictorTest/SwipePredictionTest (BinaryDictionaryLoader) |
15 | 27 | - ✅ **Instrumented gap-fill tests**: 36 new tests on emulator.wtf (391 → 427 total) |
16 | 28 | - PrivacyManagerInstrumentedTest (13): org.json audit trail, exportSettings JSON, full lifecycle |
17 | 29 | - DirectBootInstrumentedTest (11): PreferenceManager paths, device-protected storage, |
|
383 | 395 |
|
384 | 396 | ### Test |
385 | 397 | ```bash |
386 | | -# Instrumented (emulator.wtf) — 521 tests (509 pass, 12 pre-existing OOM) |
| 398 | +# Instrumented (emulator.wtf) — 600 tests, 0 failures |
387 | 399 | ew-cli --app build/outputs/apk/debug/CleverKeys-v1.2.9-x86_64.apk \ |
388 | 400 | --test build/outputs/apk/androidTest/debug/CleverKeys-debug-androidTest.apk \ |
389 | | - --device model=Pixel7,version=34 --use-orchestrator --clear-package-data |
| 401 | + --device model=Pixel7,version=34 |
390 | 402 |
|
391 | 403 | # Local JVM (Gradle — preferred) |
392 | | -./gradlew runPureTests # 699 pure JVM tests |
| 404 | +./gradlew runPureTests # 770 pure JVM tests |
393 | 405 | ./gradlew runMockTests # 128 MockK tests (needs android.jar) |
394 | | -./gradlew runAllTests # all 827 tests |
| 406 | +./gradlew runAllTests # all ~898 tests |
395 | 407 | ./gradlew runPureTests -PtestClass=ClassName # single class (pure) |
396 | 408 | ./gradlew runMockTests -PtestClass=ClassName # single class (mock) |
397 | 409 | ``` |
|
0 commit comments