Skip to content

Commit

Permalink
Fixing nightly should_panic messages
Browse files Browse the repository at this point in the history
  • Loading branch information
coreylowman committed Aug 18, 2023
1 parent c72d2b7 commit 08aa4af
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/tensor_ops/axpy/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ mod tests {
use crate::{shapes::Axis, tensor::*, tensor_ops::BroadcastTo, tests::*};

#[test]
#[should_panic = "left: `(5,)`,\n right: `(3,)`"]
#[should_panic = "left: (5,),\n right: (3,)"]
fn test_axpy_wrong_shape() {
let dev: TestDevice = Default::default();
let mut a: Tensor<_, TestDtype, _> = dev.zeros_like(&(5,));
Expand Down
2 changes: 1 addition & 1 deletion src/tensor_ops/concat/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ mod tests {
}

#[test]
#[should_panic = "left: `10`,\n right: `7`"]
#[should_panic = "left: 10,\n right: 7"]
fn test_concat_shape_fails() {
(5, 10).concat_shape(&(3, 7));
}
Expand Down
2 changes: 1 addition & 1 deletion src/tensor_ops/concat_along/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ mod tests {
}

#[test]
#[should_panic = "left: `10`,\n right: `7`"]
#[should_panic = "left: 10,\n right: 7"]
fn test_concat_shape_fails() {
let a = (5, 10);
let b = (3, 7);
Expand Down
14 changes: 7 additions & 7 deletions src/tensor_ops/matmul/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ mod tests {
}

#[test]
#[should_panic = "left: `3`,\n right: `4`"]
#[should_panic = "left: 3,\n right: 4"]
fn test_dynamic_matmul_matmat_fail() {
let dev: TestDevice = Default::default();
let x: Tensor<(Const<3>, usize), f32, _> = dev.zeros_like(&(Const, 3));
Expand All @@ -708,7 +708,7 @@ mod tests {
}

#[test]
#[should_panic = "left: `3`,\n right: `4`"]
#[should_panic = "left: 3,\n right: 4"]
fn test_dynamic_matmul_matmatbr_fail() {
let dev: TestDevice = Default::default();
let x: Tensor<(Const<1>, Const<3>, usize), f32, _> = dev.zeros_like(&(Const, Const, 3));
Expand All @@ -717,7 +717,7 @@ mod tests {
}

#[test]
#[should_panic = "left: `3`,\n right: `4`"]
#[should_panic = "left: 3,\n right: 4"]
fn test_dynamic_matmul_matmat_batch_fail() {
let dev: TestDevice = Default::default();
let x: Tensor<(Const<1>, Const<3>, usize), f32, _> = dev.zeros_like(&(Const, Const, 3));
Expand All @@ -726,7 +726,7 @@ mod tests {
}

#[test]
#[should_panic = "left: `3`,\n right: `4`"]
#[should_panic = "left: 3,\n right: 4"]
fn test_dynamic_matmul_matmat_4d_fail() {
let dev: TestDevice = Default::default();
let x: Tensor<(Const<1>, Const<5>, Const<3>, usize), f32, _> =
Expand All @@ -737,7 +737,7 @@ mod tests {
}

#[test]
#[should_panic = "left: `1`,\n right: `2`"]
#[should_panic = "left: 1,\n right: 2"]
fn test_dynamic_batch_batch3_fail() {
let dev: TestDevice = Default::default();
let x: Tensor<_, TestDtype, _> = dev.zeros_like(&(1, 2, 3));
Expand All @@ -746,7 +746,7 @@ mod tests {
}

#[test]
#[should_panic = "left: `1`,\n right: `2`"]
#[should_panic = "left: 1,\n right: 2"]
fn test_dynamic_batch_batch4_fail() {
let dev: TestDevice = Default::default();
let x: Tensor<_, TestDtype, _> = dev.zeros_like(&(1, 1, 2, 3));
Expand All @@ -755,7 +755,7 @@ mod tests {
}

#[test]
#[should_panic = "left: `1`,\n right: `2`"]
#[should_panic = "left: 1,\n right: 2"]
fn test_dynamic_seq_batch4_fail() {
let dev: TestDevice = Default::default();
let x: Tensor<_, TestDtype, _> = dev.zeros_like(&(1, 1, 2, 3));
Expand Down

0 comments on commit 08aa4af

Please sign in to comment.