Commit Graph

11 Commits

Author SHA1 Message Date
Maicol 49b00d1a86
Port all Junit assert to Truth asserts (#2304)
* Port Junit assert to Truth in `com.google.gson.stream`

* Port Junit assert to Truth in `com.google.gson.regression`

* Port Junit assert to Truth in `om.google.gson.reflect`

* Port Junit assert to Truth in `com.google.gson.metrics`

* Port Junit assert to Truth in `com.google.gson.internal`

* Port Junit assert to Truth in `com.google.gson.internal.sql`

* Port Junit assert to Truth in `com.google.gson.internal.reflect`

* Port Junit assert to Truth in `com.google.gson.internal.bind`

* Port Junit assert to Truth in `com.google.gson.internal.bind.util`

* Port Junit assert to Truth in `com.google.gson.functional`

* Replaces `List.of` with `Arrays.asList` to grant legacy

* Simplify `==` asserts

* Simplify `.contain()` asserts + Minor fixes

* Simplify asserts
2023-01-31 11:20:54 -08:00
Maicol 1a2170b99c
Port tests from JUnit 3 to JUnit 4 (#2294)
* Port tests from JUnit 3 to JUnit 4

* Port tests from JUnit 3 to JUnit 4

* Add `@Test` above `@Ignore`
2022-12-22 06:04:16 -08:00
Marcono1234 a1d2ebc8b5
Fix #1702: Gson.toJson creates CharSequence which does not implement toString (#1703)
* Gson.toJson creates CharSequence which does not implement toString

* Improve Streams.AppendableWriter.CurrentWrite test

* Make setChars package-private
2022-08-03 14:25:12 -07:00
Jesse Wilson 016261d9cf Throw JsonParseException in event of binding failures like type mismatches. 2011-10-24 01:32:46 +00:00
Jesse Wilson 38ce53766e More consistency on serializeNulls: we never emit the empty string for top-level objects. 2011-10-01 01:10:11 +00:00
Inderjeet Singh c64b79c0f9 Implemented suggestions from the code review of r436: throwing NoSuchElementException in case the stream hits EOF. 2009-10-01 18:34:11 +00:00
Inderjeet Singh 3b1056c097 Renamed JsonParserAsync to JsonStreamParser as that is a more appropriate name.
Added a TODO in JsonSerializationVisitor per code review of r453.
2009-10-01 17:46:28 +00:00
Inderjeet Singh f4f596ec3d Made JsonParser implement Iterator 2009-08-12 21:01:42 +00:00
Inderjeet Singh 6e59e502c2 Refactored the Async parser interface out of JsonParser into a new class JsonParserAsync. Updated the JsonParser to detect Eof and return a null instead of throwing a ParseException. 2009-05-14 20:18:45 +00:00
Inderjeet Singh 0127891081 Added a new API method in JsonParser to allow reading of multiple JSON objects on a stream asynchronously. 2009-05-08 22:22:34 +00:00
Inderjeet Singh 57d1f32de5 moved gson as a project under trunk 2008-09-01 03:13:32 +00:00