#![cfg(all( // require `--all-features` to be passed
feature = "default",
feature = "alloc",
feature = "formatting",
feature = "large-dates",
feature = "local-offset",
feature = "macros",
feature = "parsing",
feature = "quickcheck",
feature = "serde-human-readable",
feature = "serde-well-known",
feature = "std",
feature = "rand",
feature = "serde",
))] #![allow(
clippy::cognitive_complexity,
reason = "many tests in one function is okay"
)] #![allow(clippy::std_instead_of_core, reason = "irrelevant for tests")]
//! Tests for internal details. //! //! This module should only be used when it is not possible to test the implementation in a //! reasonable manner externally.
#[expect(
let_underscore_drop,
reason = "no need for the resulting value, which is #![must_use]"
)] #[test] fn debug() { let _ = format!("{:?}", duration::Padding::Optimize); let _ = format!("{:?}", parsing::ParsedItem(b"", 0)); let _ = format!("{:?}", format_description::Period::Am); let _ = format!("{:?}", iso8601::ExtendedKind::Basic);
}
#[expect(clippy::clone_on_copy, reason = "purpose of the test")] #[test] fn clone() {
assert_eq!(
format_description::Period::Am.clone(),
format_description::Period::Am
); // does not impl Debug
assert!(crate::time::Padding::Optimize.clone() == crate::time::Padding::Optimize); // does not impl PartialEq
assert!(matches!(
iso8601::ExtendedKind::Basic.clone(),
iso8601::ExtendedKind::Basic
));
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.