Skip to content

Commit

Permalink
covering error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
egri-nagy committed Mar 18, 2019
1 parent 45b4930 commit 856397b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/cascade.gi
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,17 @@ function(list, numofdeps)
local isgroup, type, comps, depdoms, vals, len, x, j, k, val, depfuncs, i;

if not IsDenseList(list) then
Error("usage: <doms> should be a dense list of transformation semigroup\n",
" or permutation groups,");
Error("first argument should be a list of transformation semigroups\n",
" or permutation groups.");
return;
else
isgroup:=true;
for x in list do
if not IsPermGroup(x) then
isgroup:=false;
if not IsTransformationSemigroup(x) then
Error("usage: <doms> should be a dense list of transformation",
" semigroup or permutation groups,");
Error("first argument should be a list of transformation\n",
"semigroups or permutation groups.");
return;
fi;
fi;
Expand Down
8 changes: 8 additions & 0 deletions tst/cascade.tst
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,14 @@ gap> for i in [1..333] do
> fi;
> od;

# RandomCascade error messages
gap> RandomCascade(2,2);
Error, first argument should be a list of transformation semigroups
or permutation groups.
gap> RandomCascade([2],2);
Error, first argument should be a list of transformation
semigroups or permutation groups.

#
gap> c:=
> Cascade( [ [ 1 .. 3 ], [ 1 .. 8 ], [ 1 .. 5 ] ],
Expand Down

0 comments on commit 856397b

Please sign in to comment.