David Tolnay
adafa9350c
Merge pull request #671 from japaric/gh536
...
tweak f64 deserialization to make float roundtrips work
2020-06-07 00:08:03 -07:00
David Tolnay
39c9499688
Format with rustfmt 2020-05-19
2020-06-06 00:03:10 -07:00
David Tolnay
e943bec750
Deal with clippy lints in tests
...
$ cargo clippy --tests
2020-06-06 00:01:53 -07:00
David Tolnay
b886294415
Support verifying no-std support through serde_json_test
...
Tested with:
cargo check \
--manifest-path tests/crate/Cargo.toml \
--target aarch64-unknown-none \
--no-default-features \
--features alloc
which fails before this commit and succeeds after.
Before this commit:
Checking serde_json_test v0.0.0
error[E0463]: can't find crate for `std`
|
= note: the `aarch64-unknown-none` target may not be installed
error: aborting due to previous error
2020-06-04 23:12:05 -07:00
David Tolnay
c594eb00fc
Allow but ignore trailing comma in test macros
2020-05-27 15:05:59 -07:00
David Tolnay
f38e6b5c16
Be better at computer numbering
2020-05-27 15:04:43 -07:00
Jorge Aparicio
cfd0a317fd
add sample roundtrip test
2020-05-13 17:59:29 +02:00
David Tolnay
351d847e17
Omit a layer of unnecessary nesting from Debug impl
2020-05-09 16:30:09 -07:00
David Tolnay
baae6d9306
Add test for {:#?} format of Value
2020-05-09 16:27:55 -07:00
David Tolnay
a1b1199e72
Test stream behavior after error
2020-04-04 10:24:23 -07:00
David Tolnay
8d0505803b
Update ui tests to nightly-2020-02-08
2020-02-07 18:07:46 -08:00
Jean-Marc Fiaschi
0b43936690
remplace serialize key,value functions by serialize_entry
...
call serialize_key/value into serialize_entry
2020-02-02 17:25:24 +01:00
David Tolnay
f3b059c006
Discard unimportant lines from ui tests
2020-01-24 21:36:31 -08:00
David Tolnay
67dfe5951b
Switch rustfmt skip to tool attribute
2020-01-22 15:57:07 -08:00
David Tolnay
7cf0156d47
Switch to tool attrs
2020-01-22 14:03:12 -08:00
David Tolnay
17d9a5ea9b
Organize imports
2020-01-22 13:53:35 -08:00
David Tolnay
3040daa1c6
Update tests to 2018 edition
2020-01-22 13:45:47 -08:00
David Tolnay
c19f26a518
Update serde_json_test to 2018 edition
2020-01-22 13:43:34 -08:00
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