--- a/src/cyclpoly.cc
+++ b/src/cyclpoly.cc
@@ -132,9 +132,9 @@
   RowVector cyclic_polys;
   int l=0;
 
-  if ((nargin < 2) || (nargin > 4))
-    {
-      error ("cyclpoly: incorrect number of arguments");
+  if (nargin < 2 || nargin > 4)
+    {
+      print_usage ();
       return retval;
     }
 
@@ -270,6 +270,13 @@
 }
 
 /*
+%% Test input validation
+%!error cyclpoly ()
+%!error cyclpoly (1)
+%!error cyclpoly (1, 2, 3, 4, 5)
+*/
+
+/*
 ;;; Local Variables: ***
 ;;; mode: C++ ***
 ;;; End: ***