[gnumeric] tests: test one more solver sample.



commit caf7b779c5b71013852248eb7c1e37491b722c69
Author: Morten Welinder <terra gnome org>
Date:   Thu Dec 3 09:46:27 2009 -0500

    tests: test one more solver sample.

 test/t7101-solver-afiro.pl |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/test/t7101-solver-afiro.pl b/test/t7101-solver-afiro.pl
new file mode 100755
index 0000000..ced8b4e
--- /dev/null
+++ b/test/t7101-solver-afiro.pl
@@ -0,0 +1,18 @@
+#!/usr/bin/perl -w
+# -----------------------------------------------------------------------------
+
+use strict;
+use lib ($0 =~ m|^(.*/)| ? $1 : ".");
+use GnumericTest;
+
+my $file = "afiro.mps";
+my $answer = -464.753216;
+# lp_solve:  -464.753216;
+my $tol = 1e-4;
+&message ("Check solver on $file problem.");
+&test_sheet_calc ("$samples/solver/$file", ['--solve'], "B5",
+		  sub {
+		      chomp;
+		      return (/^[-+]?(\d|\.\d)/ &&
+			      abs ($answer - $_) < $tol);
+		  });



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]