--- a/src/cyclgen.cc
+++ b/src/cyclgen.cc
@@ -129,9 +129,9 @@
   bool system = true;
   Array<int> pp;
 
-  if ((nargin < 2) || (nargin > 3))
-    {
-      error ("cyclgen: incorrect number of arguments");
+  if (nargin < 2 || nargin > 3)
+    {
+      print_usage ();
       return retval;
     }
 
@@ -265,6 +265,13 @@
 }
 
 /*
+%% Test input validation
+%!error cyclgen ()
+%!error cyclgen (1)
+%!error cyclgen (1, 2, 3, 4)
+*/
+
+/*
 ;;; Local Variables: ***
 ;;; mode: C++ ***
 ;;; End: ***