Maicol
af21798436
Fix the `equals` method of `JsonPrimitive` to work with `BigInteger` ( #2311 )
...
* Fix the `equals` method of `JsonPrimitive` to work with BigInteger
* Improve the `equals` & `getAsBigInteger` methods in `JsonPrimitive`
2023-02-06 09:40:11 -08:00
Maicol
be87c3fd0e
Port Junit test to Truth in the package `com.google.gson` of the module `gson` ( #2299 )
...
* Add the Truth dependency
* Port Junit test to Truth in the package `com.google.gson` of the module `gson`
* Replace the `assertThat(e.getMessage()).isEqualTo(...)"` with `assertThat(e).hasMessageThat().isEqualTo(...)`
* Minor fixes
2023-01-17 07:59:10 -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
51a72b463b
Make JsonElement conversion methods more consistent and fix javadoc ( #2178 )
...
* Make JsonElement conversion methods more consistent and fix javadoc
* Address some review comments
2022-08-21 13:29:40 -07:00
Jiechuan Chen
4d735f1903
Add new testcases ( #1638 )
...
* Json Primitive Tests
* Json Tree Writer tests
* Add Tests for ISO8601Utils
* Add Tests for ISO8601Utils
2020-02-17 14:55:19 -08:00
Degubi
7845c38077
Minor cleanups in deprecations and other warnings ( #1522 )
2019-10-03 15:49:24 -07:00
Jake Wharton
a817604a41
Add test coverage for passing null to JsonPrimitive constuctors
2019-03-11 10:50:22 -04:00
Jesse Wilson
9c4b23b39a
JsonObject.deepCopy() for Gson.
2012-08-21 01:19:43 +00:00
Jesse Wilson
0340e01f98
Support booleans as strings in stream binding. Remove support for interpreting "1" as true.
...
Interpreting '1' as true was not backwards compatible.
2011-10-23 21:41:30 +00:00
Inderjeet Singh
423d18feb5
Revised test to take into account known problems with JsonElement that holds BigInteger values.
2011-09-29 22:18:16 +00:00
Jesse Wilson
2ee89879e1
New failing test to show that JsonPrimitive.equals() is broken for values that are out of 'long' range
2011-09-09 07:58:52 +00:00
Joel Leitch
c894fb6c23
Default support for BitSet. As well, provide more flexibility on getAsBoolean for a JsonPrimitive.
2011-04-14 02:42:47 +00:00
Inderjeet Singh
feb9617bf0
Incorporated comments from r726
2011-04-04 22:09:51 +00:00
Jesse Wilson
3d006c90a2
equals & hashCode for subclasses of JsonElement.
...
Resolves issue 64.
2011-02-15 00:14:20 +00:00
Inderjeet Singh
fdcd3945c5
Fixed issue 147.
...
Integral values (byte, short, integer, long, BigInteger) are now comparable to each other.
Floating point values (float, double, BigDecimal) are now comparable to each other.
2009-09-23 18:54:01 +00:00
Joel Leitch
50eb582657
Ensure that the JsonElement.toString() will always generate valid JSON (even when control characters/whitespace characters are used).
2009-09-23 18:28:03 +00:00
Joel Leitch
17256b8ce5
Added tests for JsonPrimitive object creation with a char type.
...
Suggestion from r321 code review.
2008-12-18 20:06:20 +00:00
Joel Leitch
0c98c2f8d1
More lenient parsing of Numbers and Booleans. Basically, can deserialize properly formatted stringr representations of numbers and booleans.
2008-11-20 19:40:12 +00:00