Replace Calculator placeholder with tests against real radioplayer types#7
Draft
Replace Calculator placeholder with tests against real radioplayer types#7
Conversation
Co-authored-by: markst <274318+markst@users.noreply.github.com> Agent-Logs-Url: https://github.com/markst/radioplayer-kt/sessions/5aaaef5f-f91c-4642-b8b9-2d7ddabc2d74
Copilot
AI
changed the title
[WIP] Add new subproject for testing KMP functionality
Add :tests subproject demonstrating KMP multiplatform testing without swiftklib
Mar 25, 2026
Co-authored-by: markst <274318+markst@users.noreply.github.com> Agent-Logs-Url: https://github.com/markst/radioplayer-kt/sessions/20d6d844-9b00-43b1-91b4-d6390e9ca75a
Copilot
AI
changed the title
Add :tests subproject demonstrating KMP multiplatform testing without swiftklib
Replace Calculator placeholder with tests against real radioplayer types
Mar 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
:testssubproject existed purely as a structural demo with an unrelatedCalculatorclass. It now imports:radioplayerand tests the actual public API.Constraint
PlatformMediaPlayeris anexpect classwithactualimplementations only for Android and iOS. Adding a JVM target to:testswould fail to compile without a JVMactual.Changes
radioplayer— addsjvm()target + a JVM stubactual class PlatformMediaPlayerthat firessubscribeState/subscribeProgresscallbacks synchronously and exposescurrentStateandemitProgress()for test assertionstests/build.gradle.kts— addsprojects.radioplayeras acommonTestdependencytests/commonTest— replacesCalculatorTestwith four focused test classes:ProgressTest— data class equality, copy, elapsed/duration ratioPlaybackStateTest— all 5 enum values, names, countMediaPlayerItemTest— live station and on-demand track implementationsPlatformMediaPlayerTest— state transitions viasubscribeState(common API only)tests/jvmTest—PlatformMediaPlayerJvmTestexercises JVM-stub extras (currentState,emitProgress)Run with
./gradlew :tests:jvmTest.🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.