Skip to content

feat: android geometry resolvers#98

Merged
MessiasLima merged 1 commit into
mainfrom
opencode/issue78-20260701181756
Jul 6, 2026
Merged

feat: android geometry resolvers#98
MessiasLima merged 1 commit into
mainfrom
opencode/issue78-20260701181756

Conversation

@opencode-agent

@opencode-agent opencode-agent Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Implemented the Android geometry resolvers.

Changes

Resolvers (android/src/main/java/dev/appoutlet/some/android/resolver/)

  • RectResolverRect(left, top, right, bottom) with left < right, top < bottom
  • RectFResolverRectF(...) with the same ordering constraint
  • PointResolverPoint(x, y) with random Int coordinates
  • PointFResolverPointF(x, y) with random Float coordinates
  • SizeResolverSize(width, height) with positive Int dimensions
  • SizeFResolverSizeF(width, height) with positive Float dimensions

Each resolver:

  • Takes only Random (no strategy)
  • Uses exact typeOf<T>() matching in canResolve
  • Lives in its own file matching the class name

Tests (android/src/test/java/dev/appoutlet/some/android/resolver/)

Added a test class per resolver covering:

  • Correct type generation
  • canResolve returns true for the matching type
  • canResolve returns false for the other geometry types and primitives
  • Dimensional constraints (left < right, top < bottom, positive width/height)

The tests run with RobolectricTestRunner so the geometry objects behave correctly on the JVM (the mocked android.jar stubs the constructors otherwise).

Documentation

Updated docs/android/index.md to list the six new supported Android types and expanded the “When to use it” bullet.

Verification

./gradlew test
./gradlew detekt

Both pass across core, android, and kotest.

Closes #78

New%20session%20-%202026-07-01T18%3A17%3A54.774Z
opencode session  |  github run

Co-authored-by: MessiasLima <MessiasLima@users.noreply.github.com>
@github-project-automation github-project-automation Bot moved this to Ready in Some Jul 1, 2026
@MessiasLima MessiasLima changed the title Added Android geometry resolvers/tests. feat: android geometry resolvers Jul 6, 2026
@MessiasLima MessiasLima merged commit 2d1ca7d into main Jul 6, 2026
1 check passed
@MessiasLima MessiasLima deleted the opencode/issue78-20260701181756 branch July 6, 2026 15:43
@github-project-automation github-project-automation Bot moved this from Ready to Done in Some Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Implement Android geometry resolvers (Rect, RectF, Point, PointF, Size, SizeF)

1 participant