Skip to content

Commit

Permalink
rename test functions to be clearer
Browse files Browse the repository at this point in the history
  • Loading branch information
jtmoon79 committed Sep 1, 2022
1 parent 7a4aeb2 commit 6e05e83
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/datetime/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ fn test_rfc3339_opts_nonexhaustive() {
}

#[test]
fn test_datetime_from_str() {
fn test_fixedoffset_parse_from_str() {
assert_eq!(
"2015-02-18T23:16:9.15Z".parse::<DateTime<FixedOffset>>(),
Ok(FixedOffset::east(0).ymd(2015, 2, 18).and_hms_milli(23, 16, 9, 150))
Expand Down
6 changes: 3 additions & 3 deletions src/format/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,7 @@ fn test_parse() {

#[cfg(test)]
#[test]
fn test_rfc2822() {
fn test_parse_rfc2822() {
use super::NOT_ENOUGH;
use super::*;
use crate::offset::FixedOffset;
Expand Down Expand Up @@ -890,7 +890,7 @@ fn test_rfc2822() {

#[cfg(test)]
#[test]
fn parse_rfc850() {
fn test_parse_rfc850() {
use crate::{TimeZone, Utc};

static RFC850_FMT: &str = "%A, %d-%b-%y %T GMT";
Expand Down Expand Up @@ -921,7 +921,7 @@ fn parse_rfc850() {

#[cfg(test)]
#[test]
fn test_rfc3339() {
fn test_parse_rfc3339() {
use super::*;
use crate::offset::FixedOffset;
use crate::DateTime;
Expand Down
2 changes: 1 addition & 1 deletion src/format/strftime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ fn test_strftime_items() {

#[cfg(test)]
#[test]
fn test_strftime_docs() {
fn test_strftime_format() {
use crate::{DateTime, FixedOffset, TimeZone, Timelike, Utc};

let dt = FixedOffset::east(34200).ymd(2001, 7, 8).and_hms_nano(0, 34, 59, 1_026_490_708);
Expand Down
2 changes: 1 addition & 1 deletion src/naive/datetime/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ fn test_datetime_from_str() {
}

#[test]
fn test_datetime_parse_from_str() {
fn test_naivedatetime_parse_from_str() {
let ymdhms = |y, m, d, h, n, s| NaiveDate::from_ymd(y, m, d).and_hms(h, n, s);
let ymdhmsn = |y, m, d, h, n, s, nano| NaiveDate::from_ymd(y, m, d).and_hms_nano(h, n, s, nano);
assert_eq!(
Expand Down
4 changes: 2 additions & 2 deletions src/naive/time/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ fn test_time_fmt() {
}

#[test]
fn test_date_from_str() {
fn test_time_parse_from_str() {
// valid cases
let valid = [
"0:0:0",
Expand Down Expand Up @@ -238,7 +238,7 @@ fn test_date_from_str() {
}

#[test]
fn test_time_parse_from_str() {
fn test_naivetime_parse_from_str() {
let hms = NaiveTime::from_hms;
assert_eq!(
NaiveTime::parse_from_str("2014-5-7T12:34:56+09:30", "%Y-%m-%dT%H:%M:%S%z"),
Expand Down

0 comments on commit 6e05e83

Please sign in to comment.