Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Davichet-e committed Oct 18, 2024
1 parent 6520028 commit 218826d
Show file tree
Hide file tree
Showing 13 changed files with 221 additions and 221 deletions.
14 changes: 7 additions & 7 deletions src/boxes/stbox.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ impl MeosBox for STBox {
///
/// ## Example
/// ```
/// # use meos::boxes::stbox::STBox;
/// use meos::boxes::r#box::Box;
/// # use meos::STBox;
/// use meos::Box;
/// use chrono::{Utc, TimeZone};
/// let datetime = Utc.with_ymd_and_hms(2020, 5, 15, 12, 0, 0).unwrap();
/// let stbox = STBox::from_time(datetime);
Expand Down Expand Up @@ -291,7 +291,7 @@ impl cmp::PartialEq for STBox {
///
/// ## Example
/// ```
/// # use meos::boxes::stbox::STBox;
/// # use meos::STBox;
/// # use meos::meos_initialize;
/// use std::str::FromStr;
/// # meos_initialize();
Expand Down Expand Up @@ -338,10 +338,10 @@ impl std::str::FromStr for STBox {
///
/// ## Example
/// ```
/// # use meos::boxes::stbox::STBox;
/// # use meos::collections::base::span::Span;
/// # use meos::collections::datetime::tstz_span::TsTzSpan;
/// use meos::boxes::r#box::Box;
/// # use meos::STBox;
/// # use meos::Span;
/// # use meos::TsTzSpan;
/// use meos::Box;
/// use std::str::FromStr;
/// # use meos::meos_initialize;
/// # meos_initialize();
Expand Down
115 changes: 57 additions & 58 deletions src/boxes/tbox.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ impl MeosBox for TBox {
///
/// ## Example
/// ```
/// # use meos::boxes::tbox::TBox;
/// use meos::boxes::r#box::Box;
/// # use meos::TBox;
/// use meos::Box;
/// use chrono::{Utc, TimeZone};
/// let datetime = Utc.with_ymd_and_hms(2020, 5, 15, 12, 0, 0).unwrap();
/// let tbox = TBox::from_time(datetime);
Expand All @@ -76,8 +76,8 @@ impl MeosBox for TBox {
///
/// ## Example
/// ```
/// # use meos::boxes::tbox::TBox;
/// use meos::boxes::r#box::Box;
/// # use meos::TBox;
/// use meos::Box;
/// # use meos::meos_initialize;
/// use chrono::{Utc, TimeZone, TimeDelta};
/// # meos_initialize();
Expand Down Expand Up @@ -113,8 +113,8 @@ impl MeosBox for TBox {
///
/// ## Example
/// ```
/// # use meos::boxes::tbox::TBox;
/// use meos::boxes::r#box::Box;
/// # use meos::TBox;
/// use meos::Box;
/// let tbox = TBox::from_int(5);
/// assert!(tbox.has_x());
/// ```
Expand All @@ -129,8 +129,8 @@ impl MeosBox for TBox {
///
/// ## Example
/// ```
/// # use meos::boxes::tbox::TBox;
/// use meos::boxes::r#box::Box;
/// # use meos::TBox;
/// use meos::Box;
/// use chrono::{Utc, TimeZone};
/// let datetime = Utc.with_ymd_and_hms(2020, 1, 1, 0, 0, 0).unwrap();
/// let tbox = TBox::from_time(datetime);
Expand All @@ -147,8 +147,8 @@ impl MeosBox for TBox {
///
/// ## Example
/// ```
/// # use meos::boxes::tbox::TBox;
/// use meos::boxes::r#box::Box;
/// # use meos::TBox;
/// use meos::Box;
/// let tbox = TBox::from_float(3.14);
/// assert_eq!(tbox.xmin(), Some(3.14));
/// ```
Expand All @@ -171,8 +171,8 @@ impl MeosBox for TBox {
///
/// ## Example
/// ```
/// # use meos::boxes::tbox::TBox;
/// use meos::boxes::r#box::Box;
/// # use meos::TBox;
/// use meos::Box;
/// let tbox = TBox::from_float(3.14);
/// assert_eq!(tbox.xmax(), Some(3.14));
/// ```
Expand All @@ -195,8 +195,8 @@ impl MeosBox for TBox {
///
/// ## Example
/// ```
/// # use meos::boxes::tbox::TBox;
/// use meos::boxes::r#box::Box;
/// # use meos::TBox;
/// use meos::Box;
/// use chrono::{Utc, TimeZone};
/// let datetime = Utc.with_ymd_and_hms(2020, 1, 1, 0, 0, 0).unwrap();
/// let tbox = TBox::from_time(datetime);
Expand All @@ -221,8 +221,8 @@ impl MeosBox for TBox {
///
/// ## Example
/// ```
/// # use meos::boxes::tbox::TBox;
/// use meos::boxes::r#box::Box;
/// # use meos::TBox;
/// use meos::Box;
/// use chrono::{Utc, TimeZone};
/// let datetime = Utc.with_ymd_and_hms(2020, 1, 1, 0, 0, 0).unwrap();
/// let tbox = TBox::from_time(datetime);
Expand All @@ -246,8 +246,8 @@ impl MeosBox for TBox {
///
/// ## Example
/// ```
/// # use meos::boxes::tbox::TBox;
/// use meos::boxes::r#box::Box;
/// # use meos::TBox;
/// use meos::Box;
/// let tbox = TBox::from_int(5);
/// assert_eq!(tbox.is_tmin_inclusive(), None); // No temporal dimension
/// ```
Expand All @@ -270,8 +270,8 @@ impl MeosBox for TBox {
///
/// ## Example
/// ```
/// # use meos::boxes::tbox::TBox;
/// use meos::boxes::r#box::Box;
/// # use meos::TBox;
/// use meos::Box;
/// use chrono::{Utc, TimeZone};
/// let datetime = Utc.with_ymd_and_hms(2020, 1, 1, 0, 0, 0).unwrap();
/// let tbox = TBox::from_time(datetime);
Expand Down Expand Up @@ -299,8 +299,8 @@ impl MeosBox for TBox {
///
/// ## Example
/// ```
/// # use meos::boxes::tbox::TBox;
/// use meos::boxes::r#box::Box;
/// # use meos::TBox;
/// use meos::Box;
/// use chrono::{Utc, TimeZone, TimeDelta};
/// let datetime = Utc.with_ymd_and_hms(2020, 1, 1, 0, 0, 0).unwrap();
/// let tbox = TBox::from_time(datetime);
Expand Down Expand Up @@ -329,8 +329,8 @@ impl MeosBox for TBox {
///
/// ## Example
/// ```
/// # use meos::boxes::tbox::TBox;
/// use meos::boxes::r#box::Box;
/// # use meos::TBox;
/// use meos::Box;
/// let tbox = TBox::from_float(3.141592);
/// let rounded_tbox = tbox.round(2);
/// assert_eq!(rounded_tbox.xmin(), Some(3.14));
Expand All @@ -351,8 +351,8 @@ impl MeosBox for TBox {
///
/// ## Example
/// ```
/// # use meos::boxes::tbox::TBox;
/// use meos::boxes::r#box::Box;
/// # use meos::TBox;
/// use meos::Box;
/// let tbox1 = TBox::from_float(1.0);
/// let tbox2 = TBox::from_float(5.0);
/// let distance = tbox1.nearest_approach_distance(&tbox2);
Expand All @@ -373,9 +373,9 @@ impl MeosBox for TBox {
///
/// ## Example
/// ```
/// # use meos::boxes::tbox::TBox;
/// use meos::boxes::r#box::Box;
/// # use meos::collections::datetime::tstz_span::TsTzSpan;
/// # use meos::TBox;
/// use meos::Box;
/// # use meos::TsTzSpan;
/// use chrono::{Utc, TimeZone, TimeDelta};
/// let datetime1 = Utc.with_ymd_and_hms(2020, 1, 1, 0, 0, 0).unwrap();
/// let datetime2 = Utc.with_ymd_and_hms(2020, 2, 1, 0, 0, 0).unwrap();
Expand Down Expand Up @@ -448,8 +448,8 @@ impl TBox {
///
/// ## Example
/// ```
/// # use meos::boxes::tbox::TBox;
/// use meos::boxes::r#box::Box;
/// # use meos::TBox;
/// use meos::Box;
/// let tbox = TBox::from_int(42);
/// assert_eq!(tbox.xmin().unwrap(), 42.0);
/// ```
Expand All @@ -468,8 +468,8 @@ impl TBox {
///
/// ## Example
/// ```
/// # use meos::boxes::tbox::TBox;
/// use meos::boxes::r#box::Box;
/// # use meos::TBox;
/// use meos::Box;
/// let tbox = TBox::from_float(42.0);
/// assert_eq!(tbox.xmin().unwrap(), 42.0);
/// ```
Expand All @@ -488,10 +488,10 @@ impl TBox {
///
/// ## Example
/// ```
/// # use meos::boxes::tbox::TBox;
/// use meos::boxes::r#box::Box;
/// # use meos::collections::base::span::Span;
/// # use meos::collections::number::float_span::FloatSpan;
/// # use meos::TBox;
/// use meos::Box;
/// # use meos::Span;
/// # use meos::FloatSpan;
///
/// let span: FloatSpan = (42.0..50.0).into();
/// let tbox = TBox::from_numeric_span(span);
Expand All @@ -516,9 +516,9 @@ impl TBox {
///
/// ## Example
/// ```
/// # use meos::boxes::tbox::TBox;
/// use meos::boxes::r#box::Box;
/// # use meos::collections::number::int_span::IntSpan;
/// # use meos::TBox;
/// use meos::Box;
/// # use meos::IntSpan;
///
/// let tbox = TBox::from_int(5);
/// let intspan = tbox.intspan();
Expand All @@ -535,9 +535,9 @@ impl TBox {
///
/// ## Example
/// ```
/// # use meos::boxes::tbox::TBox;
/// use meos::boxes::r#box::Box;
/// # use meos::collections::number::float_span::FloatSpan;
/// # use meos::TBox;
/// use meos::Box;
/// # use meos::FloatSpan;
///
/// let tbox = TBox::from_float(5.0);
/// let floatspan = tbox.floatspan();
Expand All @@ -556,8 +556,7 @@ impl TBox {
///
/// ## Example
/// ```
/// # use meos::boxes::tbox::TBox;
/// use meos::boxes::r#box::Box;
/// # use meos::TBox;
/// let tbox = TBox::from_float(3.14);
/// assert_eq!(tbox.xmin_is_inclusive(), Some(true));
/// ```
Expand All @@ -580,8 +579,8 @@ impl TBox {
///
/// ## Example
/// ```
/// # use meos::boxes::tbox::TBox;
/// use meos::boxes::r#box::Box;
/// # use meos::TBox;
/// use meos::Box;
/// let tbox = TBox::from_float(3.14);
/// assert_eq!(tbox.xmax_is_inclusive(), Some(true)); // Assuming inclusivity is true by default
/// ```
Expand All @@ -608,8 +607,8 @@ impl TBox {
///
/// ## Example
/// ```
/// # use meos::boxes::tbox::TBox;
/// use meos::boxes::r#box::Box;
/// # use meos::TBox;
/// use meos::Box;
/// let tbox = TBox::from_float(3.0);
/// let expanded_tbox = tbox.expand_value(2.0);
/// assert_eq!(expanded_tbox.xmin(), Some(1.0));
Expand All @@ -630,8 +629,8 @@ impl TBox {
///
/// ## Example
/// ```
/// # use meos::boxes::tbox::TBox;
/// use meos::boxes::r#box::Box;
/// # use meos::TBox;
/// use meos::Box;
/// # use std::str::FromStr;
/// # use meos::meos_initialize;
/// # meos_initialize();
Expand Down Expand Up @@ -670,8 +669,8 @@ impl cmp::PartialEq for TBox {
///
/// ## Example
/// ```
/// # use meos::boxes::tbox::TBox;
/// use meos::boxes::r#box::Box;
/// # use meos::TBox;
/// use meos::Box;
/// # use meos::meos_initialize;
/// use std::str::FromStr;
/// # meos_initialize();
Expand Down Expand Up @@ -718,11 +717,11 @@ impl std::str::FromStr for TBox {
///
/// ## Example
/// ```
/// # use meos::boxes::tbox::TBox;
/// use meos::boxes::r#box::Box;
/// # use meos::collections::base::span::Span;
/// # use meos::collections::number::int_span::IntSpan;
/// # use meos::collections::datetime::tstz_span::TsTzSpan;
/// # use meos::TBox;
/// use meos::Box;
/// # use meos::Span;
/// # use meos::IntSpan;
/// # use meos::TsTzSpan;
/// use std::str::FromStr;
/// # use meos::meos_initialize;
/// # meos_initialize();
Expand Down
8 changes: 4 additions & 4 deletions src/collections/base/span.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ pub trait Span: Collection {
///
/// ## Example
/// ```
/// # use meos::collections::number::float_span::FloatSpan;
/// # use meos::collections::base::span::Span;
/// # use meos::FloatSpan;
/// # use meos::Span;
/// # use std::str::FromStr;
///
/// let span: FloatSpan = FloatSpan::from_str("[23.9, 78.8]").unwrap();
Expand All @@ -86,8 +86,8 @@ pub trait Span: Collection {
///
/// ## Example
/// ```
/// # use meos::collections::number::float_span::FloatSpan;
/// # use meos::collections::base::span::Span;
/// # use meos::FloatSpan;
/// # use meos::Span;
/// # use std::str::FromStr;
///
/// let span: FloatSpan = (23.9..=78.8).into();
Expand Down
Loading

0 comments on commit 218826d

Please sign in to comment.