Commit 0adcc78
test(jvm-codegen): cover Kotlin long/double/bool scalar arrays + Java extract throw-on-lost-required + Kotlin optional-absent
Gap A: Kotlin compile-run extractor fixture extended with required
List<Long>/List<Double>/List<Boolean> scalar arrays (counts/weights/active),
asserting typed values + boxed element types — exercising the it.toLong()/
it.toDouble()/it.toBoolean() element parses the int/float fixture left untested.
Gap B: Java GeneratedExtractorCompileRunTest now asserts the generated
<Name>Extractor.extract(loader, lostRequiredText) throws — reflectively unwraps
InvocationTargetException and asserts the cause is
com.metaobjects.render.extract.ExtractException (a RuntimeException) naming the
lost required path, for both pojoAware + valueObject flavors.
Gap C (Kotlin optional-absent -> null): N/A. KotlinPayloadGenerator types every
payload field non-null (via KotlinTypeMapper.kotlinTypeName, no @required-based
nullability) — same all-required-payload shape as the C# port — so an
absent-optional cannot be represented as null; documented as the no-skew
invariant in KotlinExtractorGenerator.
Test-only. codegen-kotlin + codegen-spring: 81 tests green, no regression.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 47b4cf5 commit 0adcc78
2 files changed
Lines changed: 56 additions & 1 deletion
File tree
- server/java
- codegen-kotlin/src/test/kotlin/com/metaobjects/generator/kotlin
- codegen-spring/src/test/java/com/metaobjects/generator/spring
Lines changed: 29 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
29 | 32 | | |
30 | 33 | | |
31 | 34 | | |
| |||
51 | 54 | | |
52 | 55 | | |
53 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
54 | 60 | | |
55 | 61 | | |
56 | 62 | | |
| |||
102 | 108 | | |
103 | 109 | | |
104 | 110 | | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
105 | 114 | | |
106 | 115 | | |
107 | 116 | | |
| |||
135 | 144 | | |
136 | 145 | | |
137 | 146 | | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
138 | 165 | | |
139 | 166 | | |
140 | 167 | | |
| |||
156 | 183 | | |
157 | 184 | | |
158 | 185 | | |
159 | | - | |
| 186 | + | |
| 187 | + | |
160 | 188 | | |
161 | 189 | | |
162 | 190 | | |
| |||
Lines changed: 27 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
262 | 262 | | |
263 | 263 | | |
264 | 264 | | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
265 | 292 | | |
266 | 293 | | |
267 | 294 | | |
0 commit comments