Fixed an invalid read when sorting the search results and adapted regression scenarii

This commit is contained in:
Olivier Teulière 2008-07-04 19:03:12 +00:00
parent cc70ccabef
commit 597673e8e5
10 changed files with 619 additions and 617 deletions

View file

@ -55,10 +55,12 @@ struct less_points : public binary_function<const Round&, const Round&, bool>
{
// If the scores are equal, sort alphabetically, ignoring
// the case
return std::lexicographical_compare(r1.getWord().begin(),
r1.getWord().end(),
r2.getWord().begin(),
r2.getWord().end(),
const wstring &s1 = r1.getWord();
const wstring &s2 = r2.getWord();
return std::lexicographical_compare(s1.begin(),
s1.end(),
s2.begin(),
s2.end(),
wcharCompare);
}
}

View file

@ -10,7 +10,7 @@ a S
j DESTINAI 7E
a S
a t
j BERYl 5E
j FRaYE 5E
j hYPER 5G
a S
a t

View file

@ -29,27 +29,27 @@ Joueur 1: 75
Joueur 2: 93
commande> a t
P?RBFEG
commande> j BERYl 5E
commande> j FRaYE 5E
commande> j hYPER 5G
commande> a S
Joueur 0: 122
Joueur 1: 116
Joueur 2: 136
Joueur 0: 124
Joueur 1: 106
Joueur 2: 138
commande> a t
FGPBEET
BGPBEET
commande> a g
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
A - - - - - - - - - - - - - - -
B - - - - - - - - - - - - - - -
C - - - - - - - - - - - - - - -
D - - - - - D - - - - - - - - -
E - - - - B E - - - - - - - - -
F - - - - E N - - - - - - - - -
G - - - - R I - - - - - - - - -
A - - - - - D - - - - - - - - -
B - - - - - E - - - - - - - - -
C - - - - - N - - - - - - - - -
D - - - - - I - - - - - - - - -
E - - - - F A - - - - - - - - -
F - - - - R I - - - - - - - - -
G - - - - a S - - - - - - - - -
H - - - O Y A T S - - - - - - -
I - - - - l I - - - - - - - - -
J - - - - - S - - - - - - - - -
K - - - - - A - - - - - - - - -
I - - - - E - - - - - - - - - -
J - - - - - - - - - - - - - - -
K - - - - - - - - - - - - - - -
L - - - - - - - - - - - - - - -
M - - - - - - - - - - - - - - -
N - - - - - - - - - - - - - - -
@ -65,14 +65,14 @@ Player 2: Computer
N | RACK | SOLUTION | REF | PTS | P | BONUS
===|==========|=================|=====|=====|===|======
1 | ATOYDSI | OYATS | H4 | 30 | 2 |
2 | DI+AEINS | DENIAISA | 6D | 63 | 2 | *
3 | P?RBFEG | BERYl | 5E | 43 | 0 |
2 | DI+AEINS | DENIAISA | 6A | 63 | 2 | *
3 | P?RBFEG | FRaYE | 5E | 45 | 0 |
Total: 136
Total: 138
Rack 0: FGP+BEET
Rack 1: FGP+BEET
Rack 2: FGP+BEET
Rack 0: BGP+BEET
Rack 1: BGP+BEET
Rack 2: BGP+BEET
commande> q
fin du mode duplicate
commande> q

View file

@ -35,7 +35,7 @@ commande> p
commande> p
commande> a S
Joueur 0: -11
Joueur 1: 788
Joueur 1: 826
commande> a T
Joueur 0: AGSSTUV
Joueur 1:
@ -49,51 +49,51 @@ Player 1: Computer
N | RACK | SOLUTION | REF | PTS | P | BONUS
===|==========|=================|=====|=====|===|======
1 | SEUTISG | (PASS) | - | 0 | 0 |
2 | LXCORNU | ROUX | H5 | 26 | 1 |
2 | LXCORNU | ROUX | H8 | 26 | 1 |
3 | EGISSTU | (PASS) | - | 0 | 0 |
4 | CLN+?BEC | CiNECLUB | 7B | 67 | 1 | *
4 | CLN+?BEC | CiNECLUB | 10B | 75 | 1 | *
5 | EGISSTU | (-UIET) | - | 0 | 0 |
6 | LLESYEO | LYSEE | J5 | 48 | 1 |
6 | LLESYEO | YOLES | J6 | 52 | 1 |
7 | GSS+TAUV | (PASS) | - | 0 | 0 |
8 | LO+AAOGT | GALA | 8A | 26 | 1 |
8 | EL+AAOGT | GALATE | 11A | 29 | 1 |
9 | AGSSTUV | (PASS) | - | 0 | 0 |
10 | OOT+EMTU | EMOTTE | 8J | 24 | 1 |
10 | O+RTEUMI | MORUTIER | 8A | 80 | 1 | *
11 | AGSSTUV | (PASS) | - | 0 | 0 |
12 | OU+AOILU | AUX | 8F | 18 | 1 |
12 | EUNPFUP | NAPPE | D10 | 18 | 1 |
13 | AGSSTUV | (PASS) | - | 0 | 0 |
14 | ILOOU+NF | FOULONNAI | D1 | 82 | 1 | *
14 | FNUU+FTE | FUNE | 15A | 35 | 1 |
15 | AGSSTUV | (PASS) | - | 0 | 0 |
16 | UTEISEE | FETEES | 1D | 27 | 1 |
16 | FTU+NSIM | MIENS | 14B | 24 | 1 |
17 | AGSSTUV | (PASS) | - | 0 | 0 |
18 | IU+IURIO | MURI | K8 | 12 | 1 |
18 | FTU+UIOE | BIEF | I10 | 24 | 1 |
19 | AGSSTUV | (PASS) | - | 0 | 0 |
20 | IIOU+VDS | VISOU | 10B | 31 | 1 |
20 | OTUU+HNT | HOTU | 7B | 20 | 1 |
21 | AGSSTUV | (PASS) | - | 0 | 0 |
22 | DI+IERNE | DENIER | 12J | 22 | 1 |
22 | NTU+EDRI | DENUTRIE | G1 | 61 | 1 | *
23 | AGSSTUV | (PASS) | - | 0 | 0 |
24 | I+TBIADK | BATIK | N6 | 42 | 1 |
24 | AAVJIRB | JAB | F2 | 59 | 1 |
25 | AGSSTUV | (PASS) | - | 0 | 0 |
26 | DIT+EHEQ | EQUIDE | 3B | 30 | 1 |
26 | AIRV+MEE | LEVERA | 8J | 39 | 1 |
27 | AGSSTUV | (PASS) | - | 0 | 0 |
28 | HT+EPARR | TEPHRA | O1 | 49 | 1 |
28 | IM+DQASR | MEDIRAS | M7 | 26 | 1 |
29 | AGSSTUV | (PASS) | - | 0 | 0 |
30 | R+OE?NSF | FiERONS | 13H | 86 | 1 | *
30 | Q+OE?NSE | BUQuEES | 4F | 46 | 1 |
31 | AGSSTUV | (PASS) | - | 0 | 0 |
32 | TMEAALP | APETALE | 2I | 32 | 1 |
32 | NO+IEATA | DENOTAI | 1G | 27 | 1 |
33 | AGSSTUV | (PASS) | - | 0 | 0 |
34 | M+EAZWRD | FEZ | H13 | 45 | 1 |
34 | A+EWZARD | DEWAR | N4 | 38 | 1 |
35 | AGSSTUV | (PASS) | - | 0 | 0 |
36 | ADMRW+NI | DAW | M1 | 26 | 1 |
36 | ARZ+IKHO | HAIK | L12 | 64 | 1 |
37 | AGSSTUV | (PASS) | - | 0 | 0 |
38 | AIMNR+JI | JAM | I9 | 37 | 1 |
38 | ORZ+INEL | ONZE | O1 | 46 | 1 |
39 | AGSSTUV | (PASS) | - | 0 | 0 |
40 | IINR+NMH | HIE | E5 | 24 | 1 |
40 | ILR+L | KIL | 15L | 12 | 1 |
41 | AGSSTUV | (PASS) | - | 0 | 0 |
42 | IMNNR | MINON | L5 | 17 | 1 |
42 | LR | RHO | B6 | 8 | 1 |
43 | AGSSTUV | (PASS) | - | 0 | 0 |
44 | R | DER | J12 | 6 | 1 |
44 | L | LA | O7 | 6 | 1 |
Total: 777
Total: 815
Rack 0: AGSSTUV
Rack 1:

View file

@ -14,8 +14,8 @@ commande> a r
4: MAYE 36 I3
5: AMYLE 35 10D
6: BAYE 35 6H
7: ELYME 35 10H
8: ELYME 35 10D
7: ELYME 35 10D
8: ELYME 35 10H
9: BEY 34 6H
10: LAYE 34 I3
commande> n 2
@ -125,7 +125,7 @@ Player 0: Human
N | RACK | SOLUTION | REF | PTS | P | BONUS
===|==========|=================|=====|=====|===|======
1 | IEIEIEF | FIEE | H6 | 14 | 0 |
1 | IEIEIEF | FIEE | H8 | 14 | 0 |
Total: 14

View file

@ -14,8 +14,8 @@ commande> a r
6: MEFIE 20 H8
7: FOUEE 18 H8
8: FOUIE 18 H8
9: FUMEE 18 H7
10: FUMEE 18 H6
9: FUMEE 18 H5
10: FUMEE 18 H7
commande> n 1
commande> a g
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
@ -124,8 +124,8 @@ commande> a r
3: LAVASSE * 78 10G
4: VASSALE * 75 K9
5: LAVASSE * 73 9C
6: LAVASSE * 72 9D
7: LAVASSE * 72 K9
6: LAVASSE * 72 K9
7: LAVASSE * 72 9D
8: VASSALE * 67 G8
9: LAVASSE * 64 G8
10: EVASAS 35 10I

View file

@ -45,8 +45,8 @@ commande> a r
6: MEFIE 20 H8
7: FOUEE 18 H8
8: FOUIE 18 H8
9: FUMEE 18 H7
10: FUMEE 18 H6
9: FUMEE 18 H5
10: FUMEE 18 H7
commande> n 1
commande> a g
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
@ -164,8 +164,8 @@ commande> a r
6: MEFIE 20 H8
7: FOUEE 18 H8
8: FOUIE 18 H8
9: FUMEE 18 H7
10: FUMEE 18 H6
9: FUMEE 18 H5
10: FUMEE 18 H7
commande> q
fin du mode entraînement
commande> q

View file

@ -8,7 +8,7 @@ j JEUDI A6
r
a r
n 0
n 8
n 6
a t
t DEEIPEG
j PIEGEE H4

View file

@ -17,16 +17,16 @@ commande> r
commande> a r
1: JEUDI 42 H4
2: JEUDI 28 H8
3: JEUDI 26 H7
3: JEUDI 26 H5
4: JEUDI 26 H6
5: JEUDI 26 H5
6: JEU 20 H8
5: JEUDI 26 H7
6: JEU 20 H6
7: JEU 20 H7
8: JEU 20 H6
8: JEU 20 H8
9: JE 18 H7
10: JE 18 H8
commande> n 0
commande> n 8
commande> n 6
commande> a t
DEEI
commande> t DEEIPEG

File diff suppressed because it is too large Load diff