Skip to content

test: migrate unit tests from Google Truth to Kotlin Power-Assert - #152

Open
dkhawk wants to merge 3 commits into
mainfrom
feat/power-assert
Open

dkhawk wants to merge 3 commits into
mainfrom
feat/power-assert

Conversation

@dkhawk

@dkhawk dkhawk commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

Resolves the // TODO: Kotlin power assert? in places-compose-demo/build.gradle.kts by migrating the unit test suites in :places-compose and :places-compose-demo from Google Truth (com.google.truth:truth) to the Kotlin Power-Assert compiler plugin (org.jetbrains.kotlin.plugin.power-assert).

Changes

  • Gradle Configuration:
    • Added org.jetbrains.kotlin.plugin.power-assert to gradle/libs.versions.toml, build.gradle.kts, places-compose/build.gradle.kts, and places-compose-demo/build.gradle.kts.
    • Configured powerAssert for kotlin.assert, kotlin.test.assertTrue, kotlin.test.assertEquals, kotlin.test.assertNull, and kotlin.test.assertNotNull, scoped to test source sets (debugUnitTest, releaseUnitTest, debugAndroidTest).
    • Removed the com.google.truth:truth test dependency.
  • Unit Test Migration:
    • Migrated all 12 unit test files in :places-compose and :places-compose-demo from Truth.assertThat(...) to assert(...), assertNotNull(...), and assertNull(...).

Verification

  • ./gradlew testDebugUnitTest spotlessCheck passes across all unit tests and formatting checks.

@dkhawk dkhawk self-assigned this Oct 20, 2026
@dkhawk
dkhawk marked this pull request as ready for review October 20, 2026 22:12
@googlemaps-bot

googlemaps-bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Code Coverage

Overall Project 89.1% 🍏

There is no coverage information present for the Files changed

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants