@@ -13,6 +13,7 @@ fn test_sites_invalid_order_1() {
1313 . unwrap ( ) ;
1414}
1515
16+
1617#[ test]
1718#[ should_panic( expected = "Data site values must satisfy the condition: x1 < x2 < ... < xN" ) ]
1819fn test_sites_invalid_order_2 ( ) {
@@ -24,6 +25,7 @@ fn test_sites_invalid_order_2() {
2425 . unwrap ( ) ;
2526}
2627
28+
2729#[ test]
2830#[ should_panic( expected = "`y` has zero dimensionality" ) ]
2931fn test_zero_ndim_y_error ( ) {
@@ -35,6 +37,7 @@ fn test_zero_ndim_y_error() {
3537 . unwrap ( ) ;
3638}
3739
40+
3841#[ test]
3942#[ should_panic( expected = "The shape[0] (5) of `y` data is not equal to `x` size (4)" ) ]
4043fn test_data_size_mismatch_error ( ) {
@@ -46,6 +49,7 @@ fn test_data_size_mismatch_error() {
4649 . unwrap ( ) ;
4750}
4851
52+
4953#[ test]
5054#[ should_panic( expected = "`axis` value (1) is out of bounds `y` dimensionality (1)" ) ]
5155fn test_axis_out_of_bounds_error ( ) {
@@ -58,6 +62,7 @@ fn test_axis_out_of_bounds_error() {
5862 . unwrap ( ) ;
5963}
6064
65+
6166#[ test]
6267#[ should_panic( expected = "`weights` size (5) is not equal to `x` size (4)" ) ]
6368fn test_weights_size_mismatch_error ( ) {
@@ -71,6 +76,7 @@ fn test_weights_size_mismatch_error() {
7176 . unwrap ( ) ;
7277}
7378
79+
7480#[ test]
7581#[ should_panic( expected = "`smooth` value must be in range 0..1, given -0.5" ) ]
7682fn test_smooth_less_than_error ( ) {
@@ -84,6 +90,7 @@ fn test_smooth_less_than_error() {
8490 . unwrap ( ) ;
8591}
8692
93+
8794#[ test]
8895#[ should_panic( expected = "`smooth` value must be in range 0..1, given 1.5" ) ]
8996fn test_smooth_greater_than_error ( ) {
@@ -97,17 +104,6 @@ fn test_smooth_greater_than_error() {
97104 . unwrap ( ) ;
98105}
99106
100- #[ test]
101- #[ should_panic( expected = "The size of `xi` must be greater or equal to 2" ) ]
102- fn test_evaluate_invalid_xi_error ( ) {
103- let x = array ! [ 1. , 2. , 3. , 4. ] ;
104- let y = array ! [ 1. , 2. , 3. , 4. ] ;
105- let xi = array ! [ 1. ] ;
106-
107- let spline = CubicSmoothingSpline :: new ( & x, & y) ;
108-
109- spline. evaluate ( & xi) . unwrap ( ) ;
110- }
111107
112108#[ test]
113109#[ should_panic( expected = "The spline has not been computed, use `make` method before" ) ]
0 commit comments