From 08aa4afd4ddfa447ada0a2b7b1c23a803b9fefb9 Mon Sep 17 00:00:00 2001 From: Corey Lowman Date: Fri, 18 Aug 2023 08:57:16 -0400 Subject: [PATCH] Fixing nightly should_panic messages --- src/tensor_ops/axpy/mod.rs | 2 +- src/tensor_ops/concat/mod.rs | 2 +- src/tensor_ops/concat_along/mod.rs | 2 +- src/tensor_ops/matmul/mod.rs | 14 +++++++------- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/tensor_ops/axpy/mod.rs b/src/tensor_ops/axpy/mod.rs index ac0fee25f..778f7c3c9 100644 --- a/src/tensor_ops/axpy/mod.rs +++ b/src/tensor_ops/axpy/mod.rs @@ -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,)); diff --git a/src/tensor_ops/concat/mod.rs b/src/tensor_ops/concat/mod.rs index b4c6d32dc..70d38edba 100644 --- a/src/tensor_ops/concat/mod.rs +++ b/src/tensor_ops/concat/mod.rs @@ -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)); } diff --git a/src/tensor_ops/concat_along/mod.rs b/src/tensor_ops/concat_along/mod.rs index 187d43c30..738b6f291 100644 --- a/src/tensor_ops/concat_along/mod.rs +++ b/src/tensor_ops/concat_along/mod.rs @@ -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); diff --git a/src/tensor_ops/matmul/mod.rs b/src/tensor_ops/matmul/mod.rs index 40257a81d..3f6f84cba 100644 --- a/src/tensor_ops/matmul/mod.rs +++ b/src/tensor_ops/matmul/mod.rs @@ -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)); @@ -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)); @@ -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)); @@ -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, _> = @@ -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)); @@ -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)); @@ -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));