Skip to content

Commit

Permalink
Simplify setup; change test of board size from CHECK to REQUIRE
Browse files Browse the repository at this point in the history
git-svn-id: svn://svn.code.sf.net/p/fuego/code/trunk@2002 2e953b5c-c64d-0410-be54-f773e93e544c
  • Loading branch information
mmueller65 committed Aug 16, 2015
1 parent f0c0d1d commit 2535474
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions go/test/GoEyeUtilTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,17 +86,14 @@ BOOST_AUTO_TEST_CASE(GoEyeUtilTest_IsSimpleEye_2)

BOOST_AUTO_TEST_CASE(GoEyeUtilTest_IsSimpleEye_3)
{
// . . . .
// X X . .
// X . X .
// . X X .
GoSetup setup;
setup.AddBlack(Pt(1, 2));
setup.AddBlack(Pt(1, 3));
setup.AddBlack(Pt(2, 3));
setup.AddBlack(Pt(2, 1));
setup.AddBlack(Pt(3, 1));
GoBoard bd(4, setup);
std::string s(". . . .\n"
"X X . .\n"
"X . . .\n"
". X X .\n");
int boardSize;
GoSetup setup = GoSetupUtil::CreateSetupFromString(s, boardSize);
BOOST_REQUIRE_EQUAL(boardSize, 4);
GoBoard bd(boardSize, setup);
BOOST_CHECK(! IsSimpleEye(bd, Pt(1, 1), SG_BLACK));
BOOST_CHECK(! IsSimpleEye(bd, Pt(2, 2), SG_BLACK));
bd.Play(Pt(3, 2), SG_BLACK);
Expand Down Expand Up @@ -187,7 +184,7 @@ BOOST_AUTO_TEST_CASE(GoEyeUtilTest_SekiWithBulkyFiveNakade)
int boardSize;
GoSetup setup = GoSetupUtil::CreateSetupFromString(s, boardSize);
GoBoard bd(boardSize, setup);
BOOST_CHECK_EQUAL(boardSize, 5);
BOOST_REQUIRE_EQUAL(boardSize, 5);

SgPoint p = Pt(2, 5); // (col, row) - rows start at bottom
GoRegionBoard r(bd);
Expand Down

0 comments on commit 2535474

Please sign in to comment.