Description
Add resolvers for Compose unit and geometry types: Dp, Sp, Offset, Size, Rect, IntOffset, and IntSize. Each lives in dev.appoutlet.some.android.resolver.compose. These are Compose inline/value classes and are handled directly rather than relying on ValueClassResolver.
-
Scope and constraints
DpResolver — Dp(value) with random float in 0..1000 range. Constructor receives random: Random only.
SpResolver — Sp(value) with random float in 0..100 range. Constructor receives random: Random only.
OffsetResolver — Offset(x, y) with random float coordinates. Constructor receives random: Random only.
SizeResolver — Size(width, height) with random positive float dimensions. Constructor receives random: Random only.
RectResolver — Rect(left, top, right, bottom) with randomized bounds ensuring left < right and top < bottom. Constructor receives random: Random only.
IntOffsetResolver — IntOffset(x, y) with random integer coordinates. Constructor receives random: Random only.
IntSizeResolver — IntSize(width, height) with random positive integer dimensions. Constructor receives random: Random only.
- Each
canResolve() uses exact type matching via typeOf<T>().
- Each resolver has its own JVM unit test class verifying type output,
canResolve behavior, and dimensional constraints where applicable.
- Depends on
androidx.compose.ui:ui (transitively provides ui-unit and ui-geometry).
-
References
Scope
In scope: 7 resolver classes + 7 test classes.
Out of scope: registering resolvers in AndroidTypeResolverProvider (ticket #14).
Acceptance criteria
Description
Add resolvers for Compose unit and geometry types:
Dp,Sp,Offset,Size,Rect,IntOffset, andIntSize. Each lives indev.appoutlet.some.android.resolver.compose. These are Compose inline/value classes and are handled directly rather than relying onValueClassResolver.Scope and constraints
DpResolver—Dp(value)with random float in 0..1000 range. Constructor receivesrandom: Randomonly.SpResolver—Sp(value)with random float in 0..100 range. Constructor receivesrandom: Randomonly.OffsetResolver—Offset(x, y)with random float coordinates. Constructor receivesrandom: Randomonly.SizeResolver—Size(width, height)with random positive float dimensions. Constructor receivesrandom: Randomonly.RectResolver—Rect(left, top, right, bottom)with randomized bounds ensuringleft < rightandtop < bottom. Constructor receivesrandom: Randomonly.IntOffsetResolver—IntOffset(x, y)with random integer coordinates. Constructor receivesrandom: Randomonly.IntSizeResolver—IntSize(width, height)with random positive integer dimensions. Constructor receivesrandom: Randomonly.canResolve()uses exact type matching viatypeOf<T>().canResolvebehavior, and dimensional constraints where applicable.androidx.compose.ui:ui(transitively providesui-unitandui-geometry).References
Scope
In scope: 7 resolver classes + 7 test classes.
Out of scope: registering resolvers in
AndroidTypeResolverProvider(ticket #14).Acceptance criteria
DpResolvergenerates Dp values in a sensible range (0..1000)SpResolvergenerates Sp values in a sensible range (0..100)OffsetResolvergenerates Offsets with float coordinatesSizeResolvergenerates sizes with positive float dimensionsRectResolvergenerates rects whereleft < rightandtop < bottomIntOffsetResolvergenerates IntOffsets with integer coordinatesIntSizeResolvergenerates IntSizes with positive integer dimensionscanResolvereturns true for its own type and false for othersandroid.jarwithandroidx.compose.ui:uion classpath and run as JVM unit tests