David Tolnay
ea39ccb88a
Mirror serde_json features to serde_json_test crate
2020-01-22 12:59:08 -08:00
Dean Karn
a240606c32
Add append to Map
...
This adds append to the Map type. There are two underlying map type ATM:
- BTreeMap
- IndexMap
For BTreeMap this exposes the existing append method which has some nice
perf benefits vs doing a for on the other map and insert on each
element.
For IndexMap there is no existing append method and so as a fallback and
convenience there is a for over the elements and insert simulating an
append.
2020-01-07 08:16:08 -08:00
Erick Tryzelaar
4ae13a5393
Implement IntoDeserializer for Value
...
This allows users to deserialize from types like `HashMap<String, Value>`.
2019-12-04 10:41:10 -08:00
David Tolnay
5bc17fa49a
Remove try! macro from tests
2019-10-02 21:13:55 -04:00
David Tolnay
7613c0443f
Enable testing cargo build on old compilers
2019-08-17 13:20:05 -07:00
David Tolnay
cc59b26045
Work around rust-lang/cargo#4664
...
Our dev-dependency on trybuild enables serde's "derive" feature, which
we don't want affecting `cargo build`.
2019-08-17 13:15:57 -07:00
David Tolnay
e3a2c3af66
Switch to rustversion
2019-07-07 21:13:29 -07:00
David Tolnay
d1423a6fec
Remove old instructions intended for compiletest
2019-05-06 16:16:41 -07:00
David Tolnay
6b15f48393
Run ui tests on nightly only
...
Where the nightly and other compiler stderr messages differ, nightly is
the one that makes sense to test.
2019-05-06 10:22:54 -07:00
David Tolnay
8d7f731c2d
Switch ui tests to trybuild
2019-05-06 09:57:57 -07:00
Yorhel
69bfbfc71f
Return EOF error on cut-off negative sign or exponent
2019-03-19 10:10:34 +01:00
Yorhel
367a1de69e
Return EOF error on cut-off decimal number
...
Fixes #524
2019-03-18 14:08:13 +01:00
David Tolnay
d79c8e5f1e
Fix adjacently tagged f32 roundtrip regression
2019-02-28 00:57:55 -08:00
David Tolnay
d6ff3de39c
Simplify running update-references.sh
2019-02-17 11:12:26 -08:00
David Tolnay
dc6edcbadd
Merge pull request #509 from dtolnay/stacker
...
Unbounded depth
2019-01-31 18:20:01 -08:00
David Tolnay
7e4427c781
Quotes around u128 in map key
2019-01-16 13:55:52 -08:00
David Tolnay
1168aedc4d
More sensitive test for recursion error
...
If eat_char is moved before the recursion check, the original test will
continue to pass but the new test will catch it.
2019-01-14 10:11:29 -08:00
David Tolnay
df1a227cc7
Unbounded depth
2019-01-13 11:27:04 -08:00
David Tolnay
48980ef754
Update ui tests to 2018 edition
2019-01-12 15:16:36 -08:00
David Tolnay
4d5234c8d9
Copyright/license headers
...
The following changes are included:
- Delete per-file license notices at the top of each file.
- Delete the first paragraph of LICENSE-MIT (an inaccurate
pseudo-copyright line), leaving only the text of the MIT license.
Nothing about the license of Serde code has changed, only our
understanding of how to correctly communicate the license has changed.
This mirrors an equivalent change being applied in the rust-lang/rust
repository.
2019-01-12 15:14:56 -08:00
David Tolnay
ca7c5b406b
Simplify compiletest setup
2019-01-12 15:11:27 -08:00
David Tolnay
8304704f76
Update name of deprecated str::trim_right
2018-12-30 22:35:07 -05:00
koushiro
f3c641c228
Modify test
...
Signed-off-by: koushiro <koushiro.cqx@gmail.com>
2018-12-29 17:14:04 +08:00
koushiro
f69e1ffe3f
Fix serialization of i128 and u128 types
...
Signed-off-by: koushiro <koushiro.cqx@gmail.com>
2018-12-29 17:08:02 +08:00
David Tolnay
e9570bfe7d
Update ui tests for rustc nightly-2018-11-29
2018-11-28 22:47:44 -08:00
David Tolnay
bcad4a9460
Allow map key to be borrowed from &Value
2018-11-09 09:13:51 -08:00
David Tolnay
b3001f48ee
Format with rustfmt 0.99.6-nightly
2018-11-06 14:22:39 -08:00
David Tolnay
5186b8f566
Update ui tests at nightly 2018-10-26
2018-10-27 18:14:48 -07:00
David Tolnay
2161f0540f
Fix overflow on i32::min_value() as exponent
2018-10-03 22:23:48 -07:00
Jihyun Yu
ab670b4e9f
fix bug on error position
2018-09-29 15:39:58 +09:00
David Tolnay
a45b5c592a
Fix malicious arbitrary precision number test
2018-09-20 10:48:48 -07:00
David Tolnay
82abb08f90
Use Box<RawValue> as the owned raw value
2018-09-20 01:34:12 -07:00
David Tolnay
9c60f196f2
Split RawSlice and RawValue
2018-09-19 23:01:26 -07:00
David Tolnay
f96b59d6b3
Cfg gate everything having to do with RawValue
2018-09-17 08:11:00 -07:00
Sam Rijs
6d38232a2c
Implement RawValue type
...
fixes #355
2018-09-14 20:11:44 +10:00
David Tolnay
5c931e0536
Make json macro compatible with deny(unused_results)
...
The unused_results lint triggers on any function call returning anything
other than () or ! that is not used. The Map::insert function returns
Option<Value> of the previous value of the inserted key.
2018-07-16 09:35:44 -07:00
David Tolnay
1b36cec484
Format with rustfmt 0.8.2
2018-07-08 19:01:20 -07:00
David Tolnay
9530ff6337
Skip auto formatting test_stream macro
2018-07-08 19:01:02 -07:00
David Tolnay
22046a50dc
Produce eof error on truncated ident
2018-06-24 16:31:12 -07:00
David Tolnay
7efc0972cd
Add some rules to catch json macro syntax errors
2018-06-24 15:32:21 -07:00
David Tolnay
25b5dfbb6c
Improve error message of unexpected colon or comma in json macro
...
These rules regressed when the unimplemented macro began accepting
formatter arguments.
2018-06-24 15:16:20 -07:00
David Tolnay
75312089bd
Format with rustfmt 0.8.2
2018-06-16 19:58:12 -07:00
David Tolnay
9316c31625
Add tests for map with char keys
2018-06-16 19:58:11 -07:00
David Tolnay
1e64efc65a
Basic support for i128 and u128
2018-05-26 15:20:58 -07:00
David Tolnay
8ffe4d8222
Format with rustfmt 0.7.0
2018-05-26 11:44:13 -07:00
David Tolnay
961a5f018e
Update invalid length error messages for serde 1.0.52
2018-05-09 14:25:22 -07:00
David Tolnay
1a9d024e5f
Format with rustfmt 0.4.2
2018-04-17 00:19:50 -07:00
David Tolnay
a66a00b0f6
Struct deserialization from array Value
2018-04-16 22:36:49 -07:00
David Tolnay
28ea01fbb9
Cleaner Debug representation of Error
2018-03-28 15:08:47 +02:00
David Tolnay
2311fb3e86
Update ui tests for nightly-2018-03-26
2018-03-27 10:35:42 +02:00