You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Three defects in packages/sherpa-onnx.rn/android/src/androidTest/. All predate #468, which touches none of these lines. They matter once #475 makes the suites runnable: two would throw, and the rest pass while asserting nothing.
1. isLibraryLoaded reflection always passes
TtsIntegrationTest.kt:193 reflects isLibraryLoaded as a field. It is a companion-object var in SherpaOnnxImpl.kt:49, so only a getter exists and getDeclaredField throws NoSuchFieldException. A generic catch swallows that and the test passes unconditionally.
Correcting the reflection exposes a second bug at line 202: it checks for com.k2fsa.sherpa.onnx.Tts, which does not exist. The class is OfflineTts.
Net effect: a test named for native integration validates nothing and cannot fail.
2. ASR test reads a key the handler never returns
RealAsrFunctionalityTest.kt:251:
val duration = recognizeResult?.getInt("durationMs") ?:0
ASRHandler never puts durationMs into its result map. On a successful file recognition this throws — so the failure only appears once the test starts working.
3. Error-handling tests assert nothing
The ASR and TTS error-handling tests contain no assertions and do not require their callbacks to complete. They pass whether or not the error path behaves correctly.
Why separate
#468 is a documentation PR. Its only test changes align config keys with what the handlers read. These three are runtime-test defects needing their own fix and verification, best done when the suites can actually run (#475).
Activity
fix(sherpa-onnx.rn): correct the generated TTS dataDir and three more…
docs(sherpa-onnx.rn): describe the tests and module wiring that exist (…