1#
2# Tests for functions defined in src/set.c
3#
4gap> START_TEST("kernel/set.tst");
5
6#
7gap> IsSet(1);
8false
9gap> LIST_SORTED_LIST(1);
10Error, Set: <list> must be a small list (not the integer 1)
11
12#
13gap> IS_EQUAL_SET;
14function( list1, list2 ) ... end
15gap> IS_EQUAL_SET(1,1);
16Error, IsEqualSet: <list1> must be a small list (not the integer 1)
17gap> IS_EQUAL_SET([],1);
18Error, IsEqualSet: <list2> must be a small list (not the integer 1)
19gap> IS_EQUAL_SET([],[]);
20true
21
22#
23gap> IS_SUBSET_SET;
24function( set1, set2 ) ... end
25gap> IS_SUBSET_SET(1,1);
26Error, IsSubsetSet: <set1> must be a small list (not the integer 1)
27gap> IS_SUBSET_SET([],1);
28Error, IsSubsetSet: <set2> must be a small list (not the integer 1)
29gap> IS_SUBSET_SET([],[]);
30true
31gap> IS_SUBSET_SET([1,2,3],[1,2]);
32true
33gap> IS_SUBSET_SET([1,2,3],[2,1]);
34true
35gap> IS_SUBSET_SET([1,2,3],[,1]);
36true
37gap> IS_SUBSET_SET([1,2,3],[1,2,4]);
38false
39gap> IS_SUBSET_SET([1,2,3],[2,1,4]);
40false
41gap> IS_SUBSET_SET([1,2,3],[,1,4]);
42false
43
44#
45gap> ADD_SET;
46function( set, val ) ... end
47gap> ADD_SET(1,1);
48Error, AddSet: <set> must be a mutable proper set (not the integer 1)
49
50#
51gap> REM_SET;
52function( set, val ) ... end
53gap> REM_SET(1,1);
54Error, RemoveSet: <set> must be a mutable proper set (not the integer 1)
55
56#
57gap> UNITE_SET;
58function( set1, set2 ) ... end
59gap> UNITE_SET(1,1);
60Error, UniteSet: <set1> must be a mutable proper set (not the integer 1)
61gap> UNITE_SET([],1);
62Error, UniteSet: <set2> must be a small list (not the integer 1)
63gap> UNITE_SET([],[]);
64
65#
66gap> INTER_SET;
67function( set1, set2 ) ... end
68gap> INTER_SET(1,1);
69Error, IntersectSet: <set1> must be a mutable proper set (not the integer 1)
70gap> INTER_SET([],1);
71Error, IntersectSet: <set2> must be a small list (not the integer 1)
72gap> INTER_SET([],[]);
73
74#
75gap> SUBTR_SET;
76function( set1, set2 ) ... end
77gap> SUBTR_SET(1,1);
78Error, SubtractSet: <set1> must be a mutable proper set (not the integer 1)
79gap> SUBTR_SET([],1);
80Error, SubtractSet: <set2> must be a small list (not the integer 1)
81gap> SUBTR_SET([],[]);
82
83#
84gap> STOP_TEST("kernel/set.tst", 1);
85