Both test files are Flutter plugin template leftovers that assert behaviour this plugin never implements.
android/src/test/.../SmartTextFlutterPluginTest.kt calls onMethodCall with "getPlatformVersion", a method the plugin does not handle, then verifies a success("Android ...") reply it never sends.
test/src/smart_text_flutter_method_channel_test.dart is named getPlatformVersion, stubs the channel to return the string '42' where the call site requests a List, and expects [].
Neither could be executed during the audit, so treat "these fail" as a strong expectation from reading them rather than a verified result. Either way, neither asserts anything about this plugin, so real coverage is effectively zero.
Proposal: delete both and test the span-stitching logic instead. That logic is pure, it exists in both Kotlin and Swift, and it is where nearly every bug found in the audit lives. Table-driven tests over (input text, detected ranges) would have caught the emoji offset bug, the inverted empty-links branch, and the unsorted-links assumption.
Found during the v0.4.0 codebase audit.
Both test files are Flutter plugin template leftovers that assert behaviour this plugin never implements.
android/src/test/.../SmartTextFlutterPluginTest.ktcallsonMethodCallwith"getPlatformVersion", a method the plugin does not handle, then verifies asuccess("Android ...")reply it never sends.test/src/smart_text_flutter_method_channel_test.dartis namedgetPlatformVersion, stubs the channel to return the string'42'where the call site requests aList, and expects[].Neither could be executed during the audit, so treat "these fail" as a strong expectation from reading them rather than a verified result. Either way, neither asserts anything about this plugin, so real coverage is effectively zero.
Proposal: delete both and test the span-stitching logic instead. That logic is pure, it exists in both Kotlin and Swift, and it is where nearly every bug found in the audit lives. Table-driven tests over (input text, detected ranges) would have caught the emoji offset bug, the inverted empty-links branch, and the unsorted-links assumption.
Found during the v0.4.0 codebase audit.