Skip to content

Commit

Permalink
Add crate docs to test cases
Browse files Browse the repository at this point in the history
More warnings appear after rust-lang/rust#130025
  • Loading branch information
jonasbb committed Sep 12, 2024
1 parent 7898991 commit fbc4532
Show file tree
Hide file tree
Showing 20 changed files with 38 additions and 1 deletion.
1 change: 1 addition & 0 deletions serde_with/tests/base64.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//! Test Cases
#![allow(
// This allows the tests to be written more uniform and not have to special case the last clone().
clippy::redundant_clone,
Expand Down
2 changes: 2 additions & 0 deletions serde_with/tests/chrono_0_4.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Test Cases

extern crate alloc;

mod utils;
Expand Down
2 changes: 2 additions & 0 deletions serde_with/tests/derives/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Test Cases

mod deserialize_fromstr;
mod serialize_display;
#[path = "../utils.rs"]
Expand Down
2 changes: 2 additions & 0 deletions serde_with/tests/hashbrown_0_14.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Test Cases

mod utils;

use crate::utils::{check_deserialization, check_error_deserialization, is_equal};
Expand Down
2 changes: 2 additions & 0 deletions serde_with/tests/hex.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Test Cases

mod utils;

use crate::utils::{check_deserialization, check_error_deserialization, is_equal};
Expand Down
2 changes: 2 additions & 0 deletions serde_with/tests/indexmap_1.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Test Cases

mod utils;

use crate::utils::{check_deserialization, check_error_deserialization, is_equal};
Expand Down
2 changes: 2 additions & 0 deletions serde_with/tests/indexmap_2.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Test Cases

mod utils;

use crate::utils::{check_deserialization, check_error_deserialization, is_equal};
Expand Down
2 changes: 2 additions & 0 deletions serde_with/tests/json.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Test Cases

mod utils;

use crate::utils::is_equal;
Expand Down
2 changes: 2 additions & 0 deletions serde_with/tests/rust.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Test Cases

extern crate alloc;

mod utils;
Expand Down
2 changes: 2 additions & 0 deletions serde_with/tests/schemars_0_8.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Test Cases

use crate::utils::{check_matches_schema, check_valid_json_schema};
use expect_test::expect_file;
use schemars::JsonSchema;
Expand Down
2 changes: 2 additions & 0 deletions serde_with/tests/serde_as/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Test Cases

extern crate alloc;

mod collections;
Expand Down
2 changes: 2 additions & 0 deletions serde_with/tests/time_0_3.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Test Cases

mod utils;

use crate::utils::{check_deserialization, check_error_deserialization, is_equal};
Expand Down
2 changes: 1 addition & 1 deletion serde_with/tests/utils.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(dead_code)]
#![allow(dead_code, missing_docs)]

use core::fmt::Debug;
use expect_test::Expect;
Expand Down
2 changes: 2 additions & 0 deletions serde_with/tests/version_numbers.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Test Cases

use version_sync::{assert_contains_regex, assert_html_root_url_updated};

#[test]
Expand Down
2 changes: 2 additions & 0 deletions serde_with/tests/with_prefix.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Test Cases

extern crate alloc;

mod utils;
Expand Down
2 changes: 2 additions & 0 deletions serde_with_macros/tests/apply.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Test Cases

#![allow(dead_code)]

use expect_test::expect;
Expand Down
2 changes: 2 additions & 0 deletions serde_with_macros/tests/compiler-messages.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Test Cases

#[cfg_attr(tarpaulin, ignore)]
// The error messages are different on beta and nightly, thus breaking the test.
#[rustversion::attr(beta, ignore)]
Expand Down
2 changes: 2 additions & 0 deletions serde_with_macros/tests/serde_as_issue_267.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(missing_docs)]

use serde::Serialize;
use serde_with_macros::serde_as;

Expand Down
2 changes: 2 additions & 0 deletions serde_with_macros/tests/skip_serializing_null.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Test Cases

use pretty_assertions::assert_eq;
use serde::{Deserialize, Serialize};
use serde_json::json;
Expand Down
2 changes: 2 additions & 0 deletions serde_with_macros/tests/version_numbers.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Test Cases

#[test]
fn test_html_root_url() {
version_sync::assert_html_root_url_updated!("src/lib.rs");
Expand Down

0 comments on commit fbc4532

Please sign in to comment.