You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
524 B
26 lines
524 B
#include <gtest/gtest.h> |
|
|
|
#include "control.h" |
|
|
|
using namespace devilution; |
|
|
|
TEST(Control, SetSpell) |
|
{ |
|
pnumlines = 1; |
|
pSpell = SPL_FIREBOLT; |
|
pSplType = RSPLTYPE_CHARGES; |
|
auto &myPlayer = Players[MyPlayerId]; |
|
SetSpell(); |
|
EXPECT_EQ(spselflag, false); |
|
EXPECT_EQ(myPlayer._pRSpell, SPL_FIREBOLT); |
|
EXPECT_EQ(myPlayer._pRSplType, RSPLTYPE_CHARGES); |
|
EXPECT_EQ(pnumlines, 0); |
|
EXPECT_EQ(force_redraw, 255); |
|
} |
|
|
|
TEST(Control, ClearPanel) |
|
{ |
|
pnumlines = 1; |
|
ClearPanel(); |
|
EXPECT_EQ(pnumlines, 0); |
|
}
|
|
|