Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/src/golden_testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,10 @@ suite. The independent JVM Client Tests CI matrix and `just ci` run these checks
- Development and ordinary CI validation select current Rust `stable` (locally
validated with Rust 1.99.0). MSRV checks explicitly select Rust 1.90.0; they do
not substitute for stable validation.
- Local TypeScript validation uses TypeScript 7.0.2 and Vite+ 1.3.0 on Node
24.22.1. The native validators use the active `tsc` and `vp` on `PATH`; when
`tsc` is not globally installed, `npm exec --package typescript -- just
golden-typescript::build-tsc` supplies it without changing generated packages.
- Current local JVM validation uses Homebrew JDK 27 with Gradle 9.8.1, respecting
`JAVA_HOME` or the active JVM. CI validates on JDK 27. Generated libraries may
still declare a Java 17 compile target, independently of the consumer test JVM.
Expand Down
11 changes: 2 additions & 9 deletions src/generators/java/okhttp/sigil_emit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1173,17 +1173,11 @@ mod tests {
JsonElement element = JsonParser.parseReader(reader);
if (element.isJsonNull()) {
return null;

}
if (element.isJsonPrimitive() && element.getAsJsonPrimitive().isString()
) {
return new Choice.VariantString(element
.getAsString());

if (element.isJsonPrimitive() && element.getAsJsonPrimitive().isString()) {
return new Choice.VariantString(element.getAsString());
}
throw new JsonParseException("unknown Choice union value");


}

@Override
Expand All @@ -1194,7 +1188,6 @@ mod tests {
}
if (value instanceof Choice.VariantString) {
gson.toJson(gson.toJsonTree(((Choice.VariantString) value).value0()), writer);

return;
}
}
Expand Down
9 changes: 1 addition & 8 deletions src/generators/kotlin/okhttp/sigil_emit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -933,15 +933,9 @@ mod tests {
val element = JsonParser.parseReader(reader)
return when {
element.isJsonNull -> null

element.isJsonPrimitive && element.asJsonPrimitive.isString
-> Choice.VariantString(element
.asString)

element.isJsonPrimitive && element.asJsonPrimitive.isString -> Choice.VariantString(element.asString)
else -> throw JsonParseException("unknown Choice union value")

}

}

override fun write(writer: JsonWriter, value: Choice?) {
Expand All @@ -952,7 +946,6 @@ mod tests {
when (value) {
is Choice.VariantString -> {
gson.toJson(gson.toJsonTree(value.value0), writer)

}
}
}
Expand Down
Loading
Loading