Skip to content

Commit

Permalink
rustfmt nightly
Browse files Browse the repository at this point in the history
  • Loading branch information
johann-cm committed Sep 25, 2024
1 parent be7d0be commit 6ec035a
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions tests/numeric.rs
Original file line number Diff line number Diff line change
Expand Up @@ -339,15 +339,17 @@ fn std_axis_empty_axis()

#[test]
#[cfg(feature = "std")]
fn diff_1d_order1() {
fn diff_1d_order1()
{
let data = array![1.0, 2.0, 4.0, 7.0];
let expected = array![1.0, 2.0, 3.0];
assert_eq!(data.diff(1, Axis(0)), expected);
}

#[test]
#[cfg(feature = "std")]
fn diff_1d_order2() {
fn diff_1d_order2()
{
let data = array![1.0, 2.0, 4.0, 7.0];
assert_eq!(
data.diff(2, Axis(0)),
Expand All @@ -357,7 +359,8 @@ fn diff_1d_order2() {

#[test]
#[cfg(feature = "std")]
fn diff_1d_order3() {
fn diff_1d_order3()
{
let data = array![1.0, 2.0, 4.0, 7.0];
assert_eq!(
data.diff(3, Axis(0)),
Expand All @@ -367,7 +370,8 @@ fn diff_1d_order3() {

#[test]
#[cfg(feature = "std")]
fn diff_2d_order1_ax0() {
fn diff_2d_order1_ax0()
{
let data = array![
[1.0, 2.0, 4.0, 7.0],
[1.0, 3.0, 6.0, 6.0],
Expand All @@ -379,7 +383,8 @@ fn diff_2d_order1_ax0() {

#[test]
#[cfg(feature = "std")]
fn diff_2d_order1_ax1() {
fn diff_2d_order1_ax1()
{
let data = array![
[1.0, 2.0, 4.0, 7.0],
[1.0, 3.0, 6.0, 6.0],
Expand All @@ -392,15 +397,17 @@ fn diff_2d_order1_ax1() {
#[test]
#[should_panic]
#[cfg(feature = "std")]
fn diff_panic_n_too_big() {
fn diff_panic_n_too_big()
{
let data = array![1.0, 2.0, 4.0, 7.0];
data.diff(10, Axis(0));
}

#[test]
#[should_panic]
#[cfg(feature = "std")]
fn diff_panic_axis_out_of_bounds() {
fn diff_panic_axis_out_of_bounds()
{
let data = array![1, 2, 4, 7];
data.diff(1, Axis(2));
}

0 comments on commit 6ec035a

Please sign in to comment.