1 /********************************************************************
3 * Copyright (C) 2008 Daniele Battaglia
5 * This file is part of GoMoku3D.
7 * GoMoku3D is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
12 * GoMoku3D is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with GoMoku3D. If not, see <http://www.gnu.org/licenses/>.
20 *******************************************************************/
24 void MoveTest::initTestCase()
26 GameMatrix::create(5, 1, 2);
29 void MoveTest::cleanupTestCase()
31 GameMatrix::destroy();
36 _m1
= Move(2, Point(0, 0, 0));
37 _m2
= Move(0, Point(5, 3, 0));
38 _m3
= Move(0, Point(4, 3, 0));
44 QCOMPARE(_m1
._playerId
, 2);
45 QCOMPARE(_m2
._playerId
, 0);
46 QCOMPARE(_m3
._playerId
, 0);
47 QCOMPARE(_m1
._coord
, Point(0, 0, 0));
48 QCOMPARE(_m2
._coord
, Point(5, 3, 0));
49 QCOMPARE(_m3
._coord
, Point(4, 3, 0));
52 void MoveTest::isValid()
54 QVERIFY(_m1
.isValid() == false);
55 QVERIFY(_m2
.isValid() == false);
56 QVERIFY(_m3
.isValid() == true);