Commit Graph

234 Commits

Author SHA1 Message Date
David Tolnay
16787318d1
Enable clippy_pedantic in serde_test 2017-11-06 22:31:35 -08:00
David Tolnay
f4ae0888c8
Run clippy on serde_test in Travis 2017-11-06 22:28:58 -08:00
David Tolnay
213071fe5c
Combine identical match arms in serde_test
As recommended by Clippy's match_same_arms lint.
2017-11-06 22:27:51 -08:00
David Tolnay
cfd26c6fda
Avoid cloning Copy types
As recommended by Clippy's clone_on_copy lint.
2017-11-06 22:26:55 -08:00
David Tolnay
23fa83941e
Whitelist float_cmp lint in serde_test 2017-11-06 22:26:01 -08:00
David Tolnay
88f5b9511d
Use .. in patterns
As recommended by Clippy's unneeded_field_pattern lint.
2017-11-06 22:24:25 -08:00
David Tolnay
f6ac232580
Merge pull request #1084 from Marwes/serde_test_readable_
Add an API for making tests for readable/compact representations
2017-11-06 22:05:29 -08:00
Markus Westerlind
aad7a7987f Add an example to the Configure trait 2017-11-06 10:35:22 +01:00
Konrad Borowski
5796f1a0f5 serde_test requires serde 1.0.16 to work
This is due to implementing is_human_readable which was
added in serde 1.0.16.
2017-11-05 23:51:01 +01:00
David Tolnay
ab68132b1f
Release 1.0.18 2017-11-03 10:20:41 -07:00
Markus Westerlind
1b9a096fa7 Export configure api 2017-11-02 16:03:50 +01:00
Markus Westerlind
39e05ffad2 Implement Deserializer for Readable/Compact 2017-11-02 15:47:07 +01:00
Markus Westerlind
78fab25c5c implement Serializer for Readable/Compact 2017-11-02 15:47:07 +01:00
David Tolnay
ad680cbd44
Release 1.0.17 2017-10-31 09:36:06 -07:00
David Tolnay
422191fcb0
Release 1.0.16 2017-10-22 11:29:44 -07:00
David Tolnay
4ed0362c8e
Panic by default in serde_test is_human_readable
The serde_test Serializer and Deserializer panic in is_human_readable unless the
readableness has been set explicitly through one of the hidden functions. This
is to force types that have distinct readable/compact representations to be
tested explicitly in one or the other, rather than with a plain assert_tokens
which arbitrarily picks one.

We need to follow up by designing a better API in serde_test to expose this
publicly. For now serde_test cannot be used to test types that rely on
is_human_readable. (The hidden functions are meant for our test suite only.)
2017-10-17 09:49:42 -07:00
David Tolnay
030459a040 Merge pull request #1044 from Marwes/human_readable
Serialize to binary if the serde format is not human readable
2017-10-15 16:39:58 -07:00
Markus Westerlind
e9b530a000 Hide is_human_readable constructors in serde_test
Until a good API can be found
2017-10-13 17:37:47 +02:00
David Tolnay
ea1a729088
Release 1.0.15 2017-09-17 13:58:35 -07:00
Markus Westerlind
e36915300f Properly deserialize non-readable IpAddr and SocketAddr 2017-09-14 17:08:17 +02:00
David Tolnay
4b00de0e22
Release 1.0.14 2017-09-09 12:50:57 -07:00
David Tolnay
c3eced410f
Release 1.0.13 2017-09-09 11:40:31 -07:00
Markus Westerlind
0dccbb1f11 Serialize to binary if the serde format is not human readable
This implements the KISS suggested in https://github.com/serde-rs/serde/issues/790.
It is possible that one of the other approaches may be better but this
seemed like the simplest one to reignite som discussion.

Personally I find the original suggestion of adding two traits perhaps slightly
cleaner in theory but I think it ends up more complicated in the end
since the added traits also need to be duplicated to to the `Seed`
traits.

Closes #790
2017-09-07 16:20:57 +02:00
David Tolnay
d4042872f5
Release 1.0.12 2017-09-04 11:11:44 -07:00
David Tolnay
26098ed877
Release 1.0.11 2017-07-27 00:56:28 -07:00
David Tolnay
83537c95e1
Release 1.0.10 2017-07-11 21:19:24 -07:00
David Tolnay
9ecb0839de
Release 1.0.9 2017-06-29 20:21:29 -07:00
David Tolnay
fd3d1396d3
Release 1.0.8 2017-05-24 00:17:27 -07:00
David Tolnay
c47b4c8e0b
Release 1.0.7 2017-05-19 17:00:31 -07:00
David Tolnay
3d7aad1e7b
Release 1.0.6 2017-05-17 08:20:54 -07:00
David Tolnay
4d5e450054
Release 1.0.5 2017-05-14 12:53:48 -07:00
David Tolnay
c68b959696
Release 1.0.4 2017-05-10 20:05:22 -07:00
David Tolnay
58e30eaee4
Release 1.0.3 2017-05-10 10:15:39 -07:00
David Tolnay
8fafc7420c
Release 1.0.2 2017-04-27 12:32:30 -07:00
David Tolnay
c7901e532e
Release 1.0.1 2017-04-23 16:40:56 -07:00
David Tolnay
d7ccef0cac
Release 1.0.0 2017-04-20 08:19:31 -07:00
David Tolnay
2d465415c5
Take credit 2017-04-20 08:13:46 -07:00
David Tolnay
bc982f9757
Examples for serde_test methods 2017-04-19 14:39:52 -07:00
David Tolnay
0240814677
Update post-merge html_root_urls 2017-04-19 14:32:04 -07:00
David Tolnay
670be2ce2f
Crate-level documentation for serde_test 2017-04-19 14:31:07 -07:00
David Tolnay
c893e3e872
Support old rustc 2017-04-19 14:17:18 -07:00
David Tolnay
fe8141fd70
Reorder Tokens to match the Serializer trait 2017-04-19 14:15:24 -07:00
David Tolnay
aa750d2bf3
Examples of every token 2017-04-19 14:12:56 -07:00
David Tolnay
4cea214da2
Update the assert_ser_tokens_error example 2017-04-19 13:11:14 -07:00
David Tolnay
4767ca3f5d
Use struct variants in token 2017-04-19 12:20:17 -07:00
David Tolnay
26a6ba177c
Remove error from serde_test public API 2017-04-19 11:54:48 -07:00
David Tolnay
974c8434e9
Add example of Error::Message 2017-04-19 10:42:15 -07:00
David Tolnay
0734b44a3a
Remove unneeded trait bounds 2017-04-19 10:41:58 -07:00
David Tolnay
d0f846182b
Keep serde_test serializer and deserializer private 2017-04-19 09:46:30 -07:00
David Tolnay
6279b0d930
Resolve merge conflicts 2017-04-17 14:25:29 -07:00
David Tolnay
a778425d0f
Merge branch 'origin/master' into 'origin/1.0'
Conflicts:
    serde/Cargo.toml
    serde/src/de/impls.rs
    serde/src/ser/impls.rs
    serde_derive/Cargo.toml
    serde_test/Cargo.toml
2017-04-17 14:18:33 -07:00
David Tolnay
86deb8db79
Remove seq_fixed_size in favor of tuple 2017-04-17 12:07:49 -07:00
David Tolnay
d4d2061a2e
Release 0.9.14 2017-04-17 07:33:45 -07:00
David Tolnay
c13a37d4db
Rename VariantAccess methods to not conflict with Deserializer 2017-04-15 12:35:04 -07:00
David Tolnay
54bbf81dfc
Put deserialize_struct and deserialize_enum adjacent 2017-04-14 22:00:27 -07:00
David Tolnay
5b118fdef4
Reorder methods to match the serializer trait 2017-04-14 15:24:21 -07:00
David Tolnay
337c6e91d8
Access terminology in serde_test 2017-04-14 15:07:19 -07:00
David Tolnay
0c5db90de8
Simplify size_hint to Option<usize> 2017-04-14 13:31:46 -07:00
David Tolnay
e77e7c4bba
Rename Deserializer::deserialize to deserialize_any 2017-04-14 12:52:57 -07:00
David Tolnay
31cec05712
Access traits 2017-04-14 12:24:35 -07:00
David Tolnay
3f920f645c
License boilerplate 2017-04-13 17:34:42 -07:00
David Tolnay
ea8fb97beb
Format in rfc style 2017-04-13 12:32:29 -07:00
David Tolnay
dc7ab2696a
Point html_root_url to docs.rs 2017-04-13 11:31:29 -07:00
David Tolnay
07154303ed
Implement Debug for public types 2017-04-13 11:04:16 -07:00
David Tolnay
4f39766211
Fix paths to readme files 2017-04-13 10:37:24 -07:00
David Tolnay
0d82bbf74f
Rename ValueDeserializer trait to IntoDeserializer 2017-04-11 23:20:35 -07:00
David Tolnay
aed5a77540
Fix assert_next_token on old rustc 2017-04-10 19:41:32 -07:00
David Tolnay
52e93150e6
Standardize on u32 as the type of a variant index 2017-04-09 14:03:18 -07:00
David Tolnay
a38b24136b
Rename deserialize_struct_field to deserialize_identifier
Because it applies to both struct fields and discriminants of an enum.
2017-04-09 13:35:22 -07:00
David Tolnay
8fd41d3b28
Disable publishing 2017-04-05 15:11:47 -07:00
David Tolnay
a7f6ad137a
Merge branch 'master' into '1.0'
Conflicts:
    serde/src/macros.rs
2017-04-05 15:10:18 -07:00
David Tolnay
1b763da529
Release 0.9.13 2017-04-05 15:03:37 -07:00
David Tolnay
826b53f691
Update token names in serde_test 2017-04-05 10:30:46 -07:00
David Tolnay
b6605b57e0
Modernize serde_test Token names 2017-04-05 10:26:34 -07:00
David Tolnay
f03e8e6056
Exhaustive match in serde_test deserializer 2017-04-05 09:54:12 -07:00
David Tolnay
67ed7a0edd
Eliminate Sep tokens in serde_test 2017-04-05 09:42:27 -07:00
David Tolnay
c3d9b42cdf
Fix handling of option and newtype in IgnoredAny 2017-04-05 09:19:22 -07:00
David Tolnay
b2377d4c0b
Allow enums in ignored map value in serde_test 2017-04-05 08:54:30 -07:00
David Tolnay
21adee8f40
Partial support for EnumStart in assert_ser_tokens 2017-04-05 01:15:42 -07:00
David Tolnay
afaab12b66
Improve assert_ser_tokens error messages 2017-04-05 01:06:42 -07:00
David Tolnay
93860d0643
Require slice of tokens in serde_test::Serializer 2017-04-05 00:27:30 -07:00
David Tolnay
b43554fbb1
Require slice of tokens in serde_test::Deserializer 2017-04-05 00:22:00 -07:00
David Tolnay
5871fb9ce0
Remove lifetime from serde_test::Token 2017-04-05 00:17:50 -07:00
David Tolnay
211e2bb8d9
Support borrowed tokens in serde_test 2017-04-04 09:56:01 -07:00
David Tolnay
d3a2f5e268
Add a 'de lifetime to the deserialize traits 2017-03-29 00:10:34 -07:00
David Tolnay
59b3961ad4
Release 0.9.12 2017-03-27 15:45:14 -07:00
David Tolnay
dc9445f873
Release 0.9.11 2017-03-05 16:51:44 -08:00
David Tolnay
d70636f4d4 Merge pull request #794 from clarcharr/master
Documentation for serde_test.
2017-03-02 11:53:05 -08:00
Clar Charr
09e467cc4c Documentation for serde_test. 2017-02-28 18:20:27 -05:00
David Tolnay
51ed9c2a40
Release 0.9.10 2017-02-28 12:45:39 -08:00
David Tolnay
59ec931d8f
Release 0.9.9 2017-02-24 13:57:52 -08:00
David Tolnay
5fbdadefb2
Deserializing enums in serde_test 2017-02-24 13:47:04 -08:00
David Tolnay
017e6d304f
Release 0.9.8 2017-02-21 10:59:42 -08:00
David Tolnay
89cbb81673
Include readme and licenses in crates.io archive
Fixes #772.
2017-02-20 21:11:57 -08:00
David Tolnay
e8651a52e7
Rustfmt 2017-02-12 22:15:59 -08:00
David Tolnay
964a2dd4d1
Release 0.9.7 2017-02-09 17:52:11 -08:00
David Tolnay
d1306a78ec
Release 0.9.6 2017-02-03 08:02:47 -08:00
David Tolnay
ff21d557c7
Untagged and internally tagged enums 2017-02-02 18:48:30 -08:00
David Tolnay
d960571439
Release 0.9.5 2017-02-01 01:01:06 -08:00
Oliver Schneider
368784949e move to cargo clippy instead of using the clippy plugin (#733)
* move to cargo clippy instead of using the clippy plugin

fixes #729

* non-exectable scripts must be run with `sh`

* don't build serde in the clippy travis job

* only run clippy tests if installing clippy succeeds

* why is travis so picky?

* no more serde_codegen

* serde_test_suite_deps has no features

* don't use empty loops, llvm optimizes them to undefined behaviour

* abort the clippy job when clippy lints are triggered

* use caches on travis to speed up builds

* why are we even using `travis-cargo`?

* need to reinstall clippy frequently due to nightly updates

* command line tools are hard
2017-01-31 09:09:37 -08:00