1gap> START_TEST("method.tst");
2gap> InstallMethod(Integers, [IsInt], function(n) return n; end);
3Error, <opr> is not an operation
4gap> InstallMethod(Size, [IsInt], function(n) return n; end);
5Error, required filters [ "IsInt", "IsRat", "IsCyc", "IsExtAElement",
6  "IsNearAdditiveElement", "IsNearAdditiveElementWithZero",
7  "IsNearAdditiveElementWithInverse", "IsAdditiveElement", "IsExtLElement",
8  "IsExtRElement", "IsMultiplicativeElement", "IsMultiplicativeElementWithOne"
9    , "IsMultiplicativeElementWithInverse", "IsZDFRE", "IsAssociativeElement",
10  "IsAdditivelyCommutativeElement", "IsCommutativeElement", "IsCyclotomic" ]
11for 1st argument do not match a declaration of Size
12
13# Check names are set correctly
14gap> cheese := NewOperation("cheese", [IsObject]);
15<Operation "cheese">
16
17# These are in lists as assignments of the form 'f := x -> x' set the name
18# of the function to 'f'
19gap> funcs := [x -> x, x -> x, x -> x];;;
20gap> ranks := [{} -> 10, {} -> 10, {} -> 10];;
21gap> SetNameFunction(funcs[3], "func3");
22gap> SetNameFunction(ranks[3], "rank3");
23gap> InstallMethod(cheese, [IsInt], ranks[1], funcs[1]);
24gap> InstallMethod(cheese, "for a list", [IsList], ranks[2], funcs[2]);
25gap> InstallMethod(cheese, "for a string", [IsString], ranks[3], funcs[3]);
26gap> List(Concatenation(funcs, ranks), NameFunction);
27[ "cheese method", "cheese for a list", "func3",
28  "Priority calculation for cheese",
29  "Priority calculation for cheese for a list", "rank3" ]
30gap> STOP_TEST("method.tst", 1);
31