mirror of
https://github.com/serde-rs/serde.git
synced 2025-10-02 07:21:12 +00:00
Share unit struct Unit between all tests
This commit is contained in:
parent
93bda5f1dc
commit
48de0c51b0
@ -12,6 +12,9 @@ use serde_derive::{Deserialize, Serialize};
|
|||||||
use serde_test::{assert_de_tokens, assert_de_tokens_error, assert_tokens, Token};
|
use serde_test::{assert_de_tokens, assert_de_tokens_error, assert_tokens, Token};
|
||||||
use std::collections::BTreeMap;
|
use std::collections::BTreeMap;
|
||||||
|
|
||||||
|
#[derive(Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
struct Unit;
|
||||||
|
|
||||||
#[derive(Debug, PartialEq, Serialize, Deserialize)]
|
#[derive(Debug, PartialEq, Serialize, Deserialize)]
|
||||||
struct Newtype(BTreeMap<String, String>);
|
struct Newtype(BTreeMap<String, String>);
|
||||||
|
|
||||||
@ -635,9 +638,6 @@ fn newtype_variant_containing_externally_tagged_enum() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn newtype_variant_containing_unit_struct() {
|
fn newtype_variant_containing_unit_struct() {
|
||||||
#[derive(Debug, PartialEq, Serialize, Deserialize)]
|
|
||||||
struct Unit;
|
|
||||||
|
|
||||||
#[derive(Debug, PartialEq, Serialize, Deserialize)]
|
#[derive(Debug, PartialEq, Serialize, Deserialize)]
|
||||||
#[serde(tag = "tag")]
|
#[serde(tag = "tag")]
|
||||||
enum Message {
|
enum Message {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user