#pragma once
#include "public.h"
class CFanShuTest : public testing::Test
{
protected:
virtual void SetUp()
{
oCurRoomRule.set_ding_pai(LZMJ::SAN_YAO_FEI);
oCurRoomRule.set_hei_san_feng(1);
oCurRoomRule.set_zhong_fa_bai(1);
oCurRoomRule.set_jiang_pai(LZMJ::WU_JIANG_PAI);
oGameLogic.vSetDingPaiType(oCurRoomRule.ding_pai());
oGameLogic.m_vInitRoomRule(&oCurRoomRule);
oGameLogic.m_vInitIdentifier("");
oGameLogic.m_vInitLeftCards(&m_oLeftCards);
oGameLogic.vSetDingPaiType(oCurRoomRule.ding_pai());
memset(&stHandCards, 0, sizeof(stHandCards));
}
virtual void TearDown()
{
}
LZMJ::LZMJM_TableRule oCurRoomRule;
CGameLogic oGameLogic;
SHandCards stHandCards;
CLeftCards m_oLeftCards;
};
TEST_F(CFanShuTest, FanShu1)
{
Card aucHandCards[] = {
0x11, 0x11, 0x11,
0x12, 0x13, 0x14,
0x15, 0x15, 0x15,
0x16, 0x17, 0x18,
0x19, 0x19
};
uint8_t ucHandCardsNum = sizeof(aucHandCards) / sizeof(aucHandCards[0]);
vGenHandCards(stHandCards, aucHandCards, ucHandCardsNum);
bool bRet = oGameLogic.m_bHu(stHandCards);
EXPECT_EQ(true, bRet);
EXPECT_EQ(2, oGameLogic.GetFanShu());
}