🚚 Move tests to a standard folder

This commit is contained in:
Anders Jenbo 2021-04-10 19:26:47 +02:00
commit 53a3657b29
24 changed files with 22 additions and 22 deletions

28
test/control_test.cpp Normal file
View file

@ -0,0 +1,28 @@
#include <gtest/gtest.h>
#include "all.h"
using namespace devilution;
TEST(Control, SetSpell)
{
pnumlines = 1;
pinfoflag = true;
pSpell = SPL_FIREBOLT;
pSplType = RSPLTYPE_CHARGES;
SetSpell();
EXPECT_EQ(spselflag, false);
EXPECT_EQ(plr[myplr]._pRSpell, SPL_FIREBOLT);
EXPECT_EQ(plr[myplr]._pRSplType, RSPLTYPE_CHARGES);
EXPECT_EQ(pnumlines, 0);
EXPECT_EQ(pinfoflag, false);
EXPECT_EQ(force_redraw, 255);
}
TEST(Control, ClearPanel)
{
pnumlines = 1;
pinfoflag = true;
ClearPanel();
EXPECT_EQ(pnumlines, 0);
EXPECT_EQ(pinfoflag, false);
}