kora-bot/KoraBotTest/CUnitTest.cpp

47 lines
930 B
C++
Raw Normal View History

2023-04-10 23:31:02 +00:00
#include "pch.h"
#include <stdlib.h>
#pragma once
#include <BWAPI.h>
#include "../Source/BWEM/src/bwem.h"
#include "../Source/CUnit.h"
2023-04-10 23:31:02 +00:00
using namespace BWAPI;
namespace CUnitTest
{
TEST(CUnitTest, initializeBlank)
{
CUnit unit = CUnit();
EXPECT_EQ(unit.action, "");
EXPECT_EQ(unit.lastSeen, TilePosition(0,0));
EXPECT_EQ(unit.miningBase, -1);
EXPECT_EQ(unit.target, TilePosition(-1, -1));
}
TEST(CUnitTest, DISABLED_initializeExistingUnit)
{
//MockBWAPIUnit BWAPIUnit;
//CUnit unit = CUnit(BWAPIUnit);
}
TEST(CUnitTest, DISABLED_isIdle)
{
EXPECT_EQ(0, 0);
}
TEST(CUnitTest, DISABLED_isInSquad)
{
EXPECT_EQ(0, 0);
}
}
class MockBWAPIUnit : public UnitInterface
{
public:
// in the same order they are in the BWAPI::UnitInterface definition
MOCK_METHOD(int, getID, (), (const, override));
MOCK_METHOD(bool, exists, (), (const, override));
};