~ubuntu-branches/ubuntu/natty/freecell-solver/natty

« back to all changes in this revision

Viewing changes to t/t/intermediate-iterations-are-in-order.t

  • Committer: Bazaar Package Importer
  • Author(s): RISKO Gergely
  • Date: 2009-07-15 17:42:19 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20090715174219-2rlyyvse0kezacly
Tags: 2.34.0-1
New upstream version

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
        or Carp::confess "Error! Could not open the fc-solve pipeline";
52
52
 
53
53
    my $verdict = 1;
54
 
    my $diag;
 
54
    my $diag = "";
55
55
    {
56
56
        my $last_iter;
57
57
        LINE_LOOP:
66
66
                    if ($new_iter ne "0")
67
67
                    {
68
68
                        $verdict = 0;
69
 
                        $diag = "The iterations do not start at 0.";
 
69
                        $diag .= "The iterations do not start at 0.";
70
70
                    }
71
71
                }
72
72
                else
74
74
                    if ($new_iter != $last_iter+1)
75
75
                    {
76
76
                        $verdict = 0;
77
 
                        $diag = "Iteration $new_iter does not directly follow $last_iter";
 
77
                        $diag .= "Iteration $new_iter does not directly follow $last_iter";
78
78
                    }
79
79
                }
80
80
                $last_iter = $new_iter;
86
86
        }
87
87
    }
88
88
 
 
89
    if (! close($fc_solve_output))
 
90
    {
 
91
        $verdict = 0;
 
92
        $diag .= "Process failed";
 
93
    }
 
94
 
89
95
    my $test_verdict = ok($verdict, $msg);
90
 
    if (defined($diag))
 
96
    if (length($diag))
91
97
    {
92
98
        diag($diag);
93
99
    }
94
100
 
95
 
    close($fc_solve_output);
96
 
 
97
101
    return $test_verdict;
98
102
}
99
103
 
136
140
    {deal => 11982, theme => [qw(-l fools-gold)],},
137
141
    "Verifying unsolvable deal No. 11982 with an atomic moves preset (fools-gold)"
138
142
);
 
143
 
 
144
=head1 COPYRIGHT AND LICENSE
 
145
 
 
146
Copyright (c) 2009 Shlomi Fish
 
147
 
 
148
Permission is hereby granted, free of charge, to any person
 
149
obtaining a copy of this software and associated documentation
 
150
files (the "Software"), to deal in the Software without
 
151
restriction, including without limitation the rights to use,
 
152
copy, modify, merge, publish, distribute, sublicense, and/or sell
 
153
copies of the Software, and to permit persons to whom the
 
154
Software is furnished to do so, subject to the following
 
155
conditions:
 
156
 
 
157
The above copyright notice and this permission notice shall be
 
158
included in all copies or substantial portions of the Software.
 
159
 
 
160
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 
161
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
 
162
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 
163
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 
164
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 
165
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 
166
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 
167
OTHER DEALINGS IN THE SOFTWARE.
 
168
 
 
169
=cut
 
170