19 lines
372 B
C++
19 lines
372 B
C++
#include <gtest/gtest.h>
|
|
|
|
#include "dead.h"
|
|
#include "engine.h"
|
|
#include "gendung.h"
|
|
|
|
using namespace devilution;
|
|
|
|
TEST(Corpses, AddCorpse)
|
|
{
|
|
AddCorpse({ 21, 48 }, 8, DIR_W);
|
|
EXPECT_EQ(dCorpse[21][48], 8 + (DIR_W << 5));
|
|
}
|
|
|
|
TEST(Corpses, AddCorpse_OOB)
|
|
{
|
|
AddCorpse({ 21, 48 }, MaxCorpses + 1, DIR_W);
|
|
EXPECT_EQ(dCorpse[21][48], 0 + (DIR_W << 5));
|
|
}
|