44 namespace Test {
namespace Int {
59 :
Test(
"GCC::Int::All::MinMax::"+
str(icl),4,-1,3,false,icl) {}
65 for (
int i=x.
size();
i--; )
76 using namespace Gecode;
80 for (
int i=0;
i<5;
i++) {
81 values[
i] =
i-1; cards[
i] = fixed;
93 :
Test(
"GCC::Int::All::MinMaxDef::"+
str(icl),4,0,3,false,icl) {}
99 for (
int i=x.
size();
i--; )
110 using namespace Gecode;
113 for (
int i=0;
i<4;
i++) {
126 :
Test(
"GCC::Int::All::Max::"+
str(icl), 4, 1,2, false, icl) {}
132 for (
int i=x.
size();
i--; )
134 if (n[0] != 2 || n[1] != 2)
152 :
Test(std::string(
"GCC::Int::Some::")+
153 (hole ?
"::Hole" :
"::Full")+
str(icl),4,1,4,false,icl) {}
159 for (
int i=x.
size();
i--; )
161 if ((n[0] < 2) || (n[1] < 2) || (n[2] > 0) || (n[3] > 0))
167 using namespace Gecode;
177 cards[0]=fixed; cards[1]=fixed;
186 static const int n = 4;
190 :
Test(
"GCC::Var::All::"+
str(icl),7,0,2,false,icl) {}
195 for (
int i=0;
i<n;
i++)
196 if ((x[
i] < 0) || (x[
i] > 2))
198 int*
card =
new int[
m];
199 for (
int i=0;
i<
m;
i++) {
201 if ((x[n+
i] < 0) || (x[n+
i] > 2)) {
206 for (
int i=0;
i<n;
i++)
208 for (
int i=0;
i<
m;
i++)
209 if (card[
i] != x[n+
i]) {
218 using namespace Gecode;
223 for (
int i=0;
i<n;
i++)
225 for (
int i=0;
i<
m;
i++)
237 static const int randomArity = 7;
242 :
Test(
"GCC::Var::Some::"+s+
"::"+
str(icl),
243 n0+(max-min)+1,min,max,false,icl)
247 if (
arity>randomArity)
254 int*
card =
new int[
m];
255 for (
int i=0;
i<
m;
i++) {
257 if ((x[n+
i] < 0) || (x[n+
i] > n)) {
262 for (
int i=0;
i<n;
i++)
264 for (
int i=0;
i<
m;
i++)
265 if (card[
i] != x[n+
i]) {
274 if (
arity > randomArity)
281 using namespace Gecode;
285 for (
int i=0;
i<n;
i++)
287 for (
int i=0;
i<
m;
i++)
307 (void)
new VarAll(icls.icl());
308 (void)
new VarSome(
"Small",2,-1,3,icls.icl());
309 (void)
new VarSome(
"Large",3,-1,4,icls.icl());