[gnumeric] Tests: add test for gamma
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Tests: add test for gamma
- Date: Mon, 23 Dec 2013 17:03:08 +0000 (UTC)
commit 058862053c753f6b38d6bb5e876e03314fa4b6df
Author: Morten Welinder <terra gnome org>
Date: Mon Dec 23 12:00:32 2013 -0500
Tests: add test for gamma
plugins/fn-complex/functions.c | 4 ++--
plugins/fn-math/functions.c | 4 ++--
samples/gamma.gnumeric | Bin 0 -> 904165 bytes
test/t1105-gamma.pl | 10 ++++++++++
4 files changed, 14 insertions(+), 4 deletions(-)
---
diff --git a/plugins/fn-complex/functions.c b/plugins/fn-complex/functions.c
index 5057b77..655308f 100644
--- a/plugins/fn-complex/functions.c
+++ b/plugins/fn-complex/functions.c
@@ -1442,10 +1442,10 @@ GnmFuncDescriptor const complex_functions[] = {
{ "imfact", "S", help_imfact,
gnumeric_imfact, NULL, NULL, NULL,
- GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE },
+ GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_EXHAUSTIVE },
{ "imgamma", "S", help_imgamma,
gnumeric_imgamma, NULL, NULL, NULL,
- GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE },
+ GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_EXHAUSTIVE },
{ "imigamma", "SS|bb", help_imigamma,
gnumeric_imigamma, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE },
diff --git a/plugins/fn-math/functions.c b/plugins/fn-math/functions.c
index 5019c87..14ecd8b 100644
--- a/plugins/fn-math/functions.c
+++ b/plugins/fn-math/functions.c
@@ -3320,7 +3320,7 @@ GnmFuncDescriptor const math_functions[] = {
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE },
{ "fact", "f", help_fact,
gnumeric_fact, NULL, NULL, NULL,
- GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_SUPERSET, GNM_FUNC_TEST_STATUS_BASIC },
+ GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_SUPERSET, GNM_FUNC_TEST_STATUS_EXHAUSTIVE },
/* MS Excel puts this in the engineering functions */
{ "factdouble", "f", help_factdouble,
@@ -3348,7 +3348,7 @@ GnmFuncDescriptor const math_functions[] = {
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
{ "gamma", "f", help_gamma,
gnumeric_gamma, NULL, NULL, NULL,
- GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE },
+ GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_EXHAUSTIVE },
{ "gammaln", "f",
help_gammaln, gnumeric_gammaln, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
diff --git a/samples/gamma.gnumeric b/samples/gamma.gnumeric
new file mode 100644
index 0000000..04391cb
Binary files /dev/null and b/samples/gamma.gnumeric differ
diff --git a/test/t1105-gamma.pl b/test/t1105-gamma.pl
new file mode 100755
index 0000000..99a035c
--- /dev/null
+++ b/test/t1105-gamma.pl
@@ -0,0 +1,10 @@
+#!/usr/bin/perl -w
+# -----------------------------------------------------------------------------
+
+use strict;
+use lib ($0 =~ m|^(.*/)| ? $1 : ".");
+use GnumericTest;
+
+my $file = "gamma.gnumeric";
+&message ("Check that $file evaluates correctly.");
+&test_sheet_calc ("$samples/$file", "B1", sub { /^[0-9.]+$/ && $_ > 11.5; });
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]