Permalink
Browse files

add feature tests for SinusoidFunction and PolynomialFunction

  • Loading branch information...
1 parent 39ad396 commit 0ed624a308490456b617a24782f07a05a95e1615 rmagick committed Oct 10, 2009
Showing with 8 additions and 2 deletions.
  1. +3 −1 ext/RMagick/extconf.rb
  2. +5 −1 ext/RMagick/rmimage.c
View
4 ext/RMagick/extconf.rb
@@ -321,7 +321,9 @@ def check_multiple_imagemagick_versions()
"AddModulusEvaluateOperator"], # 6.4.8-5
headers)
have_enum_values("MagickFunction", ["ArcsinFunction", # 6.5.2-8
- "ArctanFunction"], headers) # 6.5.2-8
+ "ArctanFunction", # 6.5.2-8
+ "PolynomialFunction", # 6.4.8-8
+ "SinusoidFunction"], headers) # 6.4.8-8
have_enum_values("ImageLayerMethod", ["FlattenLayer", # 6.3.6-2
"MergeLayer", # 6.3.6
"MosaicLayer", # 6.3.6-2
View
6 ext/RMagick/rmimage.c
@@ -1,4 +1,4 @@
-/* $Id: rmimage.c,v 1.357 2009/10/05 21:52:56 rmagick Exp $ */
+/* $Id: rmimage.c,v 1.358 2009/10/10 21:48:49 rmagick Exp $ */
/*============================================================================\
| Copyright (C) 2009 by Timothy P. Hunter
| Name: rmimage.c
@@ -5158,13 +5158,17 @@ Image_function_channel(int argc, VALUE *argv, VALUE self)
switch (function)
{
+#if defined(HAVE_ENUM_POLYNOMIALFUNCTION)
case PolynomialFunction:
if (argc == 0)
{
rb_raise(rb_eArgError, "PolynomialFunction requires at least one argument.");
}
break;
+#endif
+#if defined(HAVE_ENUM_SINUSOIDFUNCTION)
case SinusoidFunction:
+#endif
#if defined(HAVE_ENUM_ARCSINFUNCTION)
case ArcsinFunction:
#endif

0 comments on commit 0ed624a

Please sign in to comment.