[DRE-commits] [SCM] ruby-integration.git branch, master, updated. upstream/0.1.0-9-g8ff3867

Cédric Boutillier boutil at debian.org
Mon Dec 10 04:45:53 UTC 2012


The following commit has been merged in the master branch:
commit d3588cc416df08e9d61a1533b436a2734f1dd9a6
Author: Cédric Boutillier <boutil at debian.org>
Date:   Thu Oct 18 17:23:05 2012 +0200

    add patch to run a test only if ruby-gsl present

diff --git a/debian/patches/add_has_gsl_condition_to_complex_integration_spec.patch b/debian/patches/add_has_gsl_condition_to_complex_integration_spec.patch
new file mode 100644
index 0000000..9e4257e
--- /dev/null
+++ b/debian/patches/add_has_gsl_condition_to_complex_integration_spec.patch
@@ -0,0 +1,26 @@
+Description: add test on has_gsl? before using GSL integration method
+ This one was missing from the spec for complex intergration with GSL methods
+Author: Cédric Boutillier <boutil at debian.org>
+Bug: https://github.com/clbustos/integration/pull/1
+Last-Update: 2012-10-17
+
+
+--- a/spec/integration_spec.rb
++++ b/spec/integration_spec.rb
+@@ -17,9 +17,13 @@
+     Integration.integrate(0,1,{:tolerance=>1e-12,:method=>:adaptive_quadrature},&normal_pdf).should be_within(1e-11).of(0.341344746068)
+   end
+   it "should return a correct value for a complex integration with gsl methods" do
+-    normal_pdf=lambda {|x| (1/Math.sqrt(2*Math::PI))*Math.exp(-(x**2/2))}
+-    Integration.integrate(0,1,{:tolerance=>1e-12,:method=>:qng},&normal_pdf).should be_within(1e-11).of(0.341344746068)
+-    Integration.integrate(0,1,{:tolerance=>1e-12,:method=>:qag},&normal_pdf).should be_within(1e-11).of(0.341344746068)
++    if Integration.has_gsl?
++      normal_pdf=lambda {|x| (1/Math.sqrt(2*Math::PI))*Math.exp(-(x**2/2))}
++      Integration.integrate(0,1,{:tolerance=>1e-12,:method=>:qng},&normal_pdf).should be_within(1e-11).of(0.341344746068)
++      Integration.integrate(0,1,{:tolerance=>1e-12,:method=>:qag},&normal_pdf).should be_within(1e-11).of(0.341344746068)
++    else
++      pending("GSL not available")
++    end
+   end
+ 
+       
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..5b8ca44
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+add_has_gsl_condition_to_complex_integration_spec.patch
diff --git a/debian/source/local-options b/debian/source/local-options
new file mode 100644
index 0000000..4aceb10
--- /dev/null
+++ b/debian/source/local-options
@@ -0,0 +1 @@
+unapply-patches

-- 
ruby-integration.git



More information about the Pkg-ruby-extras-commits mailing list