Commit Graph

373 Commits

Author SHA1 Message Date
David Tolnay
dd1f4b483e
Make it clearer that the private implementation details are private
Both of these modules are doc(hidden) and commented "Not public API",
but incorrect downstream code sometimes still references them. Naming
the module __private will make it more likely to be noticed in code
review.
2021-01-08 19:55:31 -08:00
David Tolnay
91bfa8f947
Refresh expandtest files with most recent rustfmt 2021-01-08 19:54:21 -08:00
David Tolnay
8847800ce2
Ignore from_over_into clippy lint in test suite 2021-01-03 19:05:43 -08:00
David Tolnay
e3d871ff7b
Opt in to experimental trybuild diffs 2020-10-31 13:28:19 -07:00
David Tolnay
8084258a3e
Update ui tests to nightly-2020-10-20 2020-10-20 19:17:50 -07:00
David Tolnay
26186bddd1
Add test for flattened unit 2020-08-10 15:06:34 -07:00
David Tolnay
29c5a50935
Suppress unused_attributes warning in test suite
This test has multiple #[ignore] attributes in some configurations.

    $ cargo +beta check --test expandtest
    warning: unused attribute
     --> test_suite/tests/expandtest.rs:2:29
      |
    2 | #[cfg_attr(not(expandtest), ignore)]
      |                             ^^^^^^
      |
      = note: `#[warn(unused_attributes)]` on by default
2020-06-26 21:37:30 -07:00
David Tolnay
c619b2a7c4
Suppress unknown_lints warning in test suite
When building with beta and older rustc:

    error: unknown lint: `mixed_script_confusables`
     --> test_suite/tests/test_gen.rs:7:10
      |
    7 | #![allow(mixed_script_confusables, clippy::trivially_copy_pass_by_ref)]
      |          ^^^^^^^^^^^^^^^^^^^^^^^^
      |
    note: the lint level is defined here
     --> test_suite/tests/test_gen.rs:5:9
      |
    5 | #![deny(warnings)]
      |         ^^^^^^^^
      = note: `#[deny(unknown_lints)]` implied by `#[deny(warnings)]`
2020-06-26 21:37:26 -07:00
David Tolnay
764ebd9b17
Suppress mixed_script_confusables in test suite
error: The usage of Script Group `Greek` in this crate consists solely of mixed script confusables
       --> test_suite/tests/test_gen.rs:269:9
        |
    269 |         σ: f64,
        |         ^
        |
    note: the lint level is defined here
       --> test_suite/tests/test_gen.rs:5:9
        |
    5   | #![deny(warnings)]
        |         ^^^^^^^^
        = note: `#[deny(mixed_script_confusables)]` implied by `#[deny(warnings)]`
        = note: The usage includes 'σ' (U+03C3).
        = note: Please recheck to make sure their usages are indeed what you want.
2020-06-26 19:06:13 -07:00
Tanner Rogalsky
7e5701ad2b add alignment specific packed repr tests 2020-06-21 16:46:27 -07:00
Tanner Rogalsky
d5e6436b28 Add tests validating Serialize derivation for packed structs. 2020-06-21 16:46:27 -07:00
Taiki Endo
a50e1c20e9 Use underscore consts on Rust 1.37+ 2020-06-19 15:55:43 +09:00
David Tolnay
f7d06cae4c
Add failing test involving macro_rules metavariable 2020-05-29 17:58:10 -07:00
David Tolnay
c2114491ca
Add test of Serialize impl for packed struct 2020-05-09 22:52:49 -07:00
asdsad
172edc4cf4
Allow optional content field for adjacently tagged newtype variants
* Deserialize adjacently tagged newtype variants with optional content as None instead of erroring when content field is missing

* refactor to remove duplicate code and remove panic
2020-05-09 20:58:28 -07:00
David Tolnay
f44402e224
Add regression test for issue 1804 2020-05-08 15:38:44 -07:00
David Tolnay
115c1b4830
Exclude expansion tests from test suite by default
This test isn't high enough signal to have all contributors run it.
2020-05-05 21:52:37 -07:00
David Tolnay
23db3a41e7
Run expansion tests only if rustfmt is present 2020-05-05 21:50:14 -07:00
David Tolnay
19a11237b8
Regenerate macrotest *.expanded.rs files
This picks up changes from a135199ab1 and 1b35c9e27e.
2020-05-05 17:23:30 -07:00
David Tolnay
732544aed6
Update to macrotest 1.0 2020-05-05 17:23:30 -07:00
David Tolnay
65dfa607c8
Update to rustversion 1.0 2020-05-05 17:23:30 -07:00
David Tolnay
03addbae55
Format with rustfmt 2020-03-11 2020-04-19 17:32:11 -07:00
David Tolnay
a61cd0f236
Update ui tests to nightly-2020-02-08 2020-02-08 00:10:00 -08:00
David Tolnay
895eb2ba6c
Update ui tests to nightly-2019-12-19 2019-12-18 23:46:29 -08:00
David Tolnay
cd365de70c
Update ui tests to nightly-2019-12-18 2019-12-17 23:47:40 -08:00
David Tolnay
b9909cef3d
Revert "Remove never_type feature gate"
This reverts commit 533fb9cc44.
2019-12-15 19:52:59 -08:00
David Tolnay
d540e72fc7
Format with rustfmt 2019-10-07 2019-11-26 00:02:11 -08:00
David Tolnay
13d0899776
Add missing import in de_enum expand test 2019-11-26 00:00:05 -08:00
David Tolnay
4fefa7a01d
Format imports in expandtest inputs 2019-11-25 23:57:34 -08:00
David Tolnay
90486607a1
Update test suite to nightly-2019-11-26 2019-11-25 23:51:43 -08:00
David Tolnay
0b303c766c
Mark tests ignored on emscripten rather than omitting
This way they still appear in `cargo test`'s output.
2019-11-24 17:27:30 -08:00
David Tolnay
c371563bfc
Reduce nesting of macrotest test cases 2019-11-24 17:25:44 -08:00
David Tolnay
d17d8eb3ee
Rely on std::process::Command's path search 2019-11-24 17:23:02 -08:00
David Tolnay
bcaebdb2b7
Merge pull request #1662 from eupn/use-macrotest
Implement expansion tests
2019-11-24 17:14:35 -08:00
David Tolnay
ff70409215
Merge pull request #1669 from H2CO3/master
Allow untagged unit variants to deserialize from `Visitor::visit_none()`
2019-11-24 16:13:37 -08:00
David Tolnay
97a98a7031
Test only deser for untagged unit visit_none 2019-11-24 15:59:08 -08:00
David Tolnay
533fb9cc44
Remove never_type feature gate
The stabilization for this feature has landed in nightly.
2019-11-23 19:30:39 -08:00
Árpád Goretity
59b99d2d60 Move test for untagged-variant-from-unit where it belongs 2019-11-07 21:18:12 +01:00
Árpád Goretity
c796daed7c Fix test for untagged unit variant 2019-11-07 12:58:09 +01:00
Árpád Goretity
6e2c385fa5 Allow untagged unit variants to deserialize from Visitor::visit_none() 2019-11-06 17:31:27 +01:00
Evgenii P
9a0e4e0176 Ignore expansion test if cargo-expand subcommand isn't present 2019-11-03 20:31:08 +08:00
Evgenii P
640f8e0e82 Remove stdlib derives and fix expanded files to have newlines at the end 2019-11-03 20:08:39 +08:00
Evgenii P
4dda90502a Add *.expanded.rs files 2019-11-01 02:32:34 +08:00
Evgenii P
dc6dbba47c Implement derive macros expansion tests using macrotest 2019-11-01 02:32:06 +08:00
Jan Alexander Steffens (heftig)
b8772a1e40
Deserialize Box<Path> through PathBuf::into_boxed_path
Including Rc<Path> et al.

Fixes https://github.com/serde-rs/serde/issues/1633
2019-10-22 22:31:51 +02:00
Jan Alexander Steffens (heftig)
42990d8264
Deserialize PathBuf from bytes
&Path already allows this. Also complete the tests for Path/PathBuf.
2019-10-22 22:30:53 +02:00
David Tolnay
44fa7b0f6b
Remove unused rustc-serialize dependency from test suite 2019-10-04 21:29:06 -04:00
David Tolnay
bda561df4e
Update test suite to nightly-2019-10-04 2019-10-03 21:45:09 -04:00
David Tolnay
8955420baf
Update test suite to nightly-2019-10-02 2019-10-02 09:45:00 -04:00
David Tolnay
21ee256911
Update test suite to nightly-2019-09-30 2019-09-30 15:56:04 -04:00