From 7992f05fc494205e9822480cdf87fb7af34cf873 Mon Sep 17 00:00:00 2001 From: Thierry Moisan Date: Wed, 11 Jun 2008 12:09:54 -0400 Subject: [PATCH] Fixing a crash in the vector tests --- lib/Math/GSL/Vector/Test.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Math/GSL/Vector/Test.pm b/lib/Math/GSL/Vector/Test.pm index ec95f78..f0029f5 100644 --- a/lib/Math/GSL/Vector/Test.pm +++ b/lib/Math/GSL/Vector/Test.pm @@ -188,7 +188,6 @@ sub GSL_VECTOR_MIN_INDEX : Tests { sub GSL_VECTOR_MINMAX_INDEX : Tests { my $self = shift; my ($min,$max)=(0,0); - print Dumper [ $self->{vector} ]; map { gsl_vector_set($self->{vector}, $_, $_ ** 2 ) } (0..4); ; ($min, $max) = Math::GSL::Vector::gsl_vector_minmax_index($self->{vector}, $min, $max); @@ -215,7 +214,8 @@ sub GSL_VECTOR_MEMCPY : Tests { sub GSL_VECTOR_VIEW_ARRAY : Tests { my @array = [1,2,3,4,5,6]; - my $vec_view = gsl_vector_view_array(@array, 2); + my $vec_view->{vector} = gsl_vector_alloc(2); + $vec_view = gsl_vector_view_array(@array, 2); map { is(gsl_vector_get($vec_view->{vector}, $_), $_+1 ) } (0..1); ; } -- 2.11.4.GIT