156 lines
2.6 KiB
C++
156 lines
2.6 KiB
C++
#include "pch.h"
|
|
|
|
#pragma once
|
|
#include <BWAPI.h>
|
|
|
|
#include "../Source/BWEM/src/bwem.h"
|
|
#include "../Source/CBase.h"
|
|
#include "../Source/Util.h"
|
|
|
|
using namespace BWAPI;
|
|
|
|
namespace UtilTest
|
|
{
|
|
TilePosition tp1 = TilePosition(0, 0);
|
|
TilePosition tp2 = TilePosition(3, 4);
|
|
|
|
Location l1 = Location(tp1, false);
|
|
Location l2 = Location(tp2, false);
|
|
|
|
BWAPI::UnitType drone = BWAPI::UnitTypes::Zerg_Drone;
|
|
BWAPI::UnitType zergling = BWAPI::UnitTypes::Zerg_Zergling;
|
|
|
|
TEST(UtilTest, DISABLED_buildWorkerIndex)
|
|
{
|
|
EXPECT_EQ(0, 0);
|
|
}
|
|
|
|
TEST(UtilTest, DISABLED_completedBuilding)
|
|
{
|
|
EXPECT_EQ(0, 0);
|
|
}
|
|
|
|
TEST(UtilTest, DISABLED_countUnits)
|
|
{
|
|
EXPECT_EQ(0, 0);
|
|
}
|
|
|
|
TEST(UtilTest, DISABLED_eggCount)
|
|
{
|
|
EXPECT_EQ(0, 0);
|
|
}
|
|
|
|
TEST(UtilTest, DISABLED_findUpgradeBuilding)
|
|
{
|
|
EXPECT_EQ(0, 0);
|
|
}
|
|
|
|
TEST(UtilTest, DISABLED_getAreaAverage)
|
|
{
|
|
EXPECT_EQ(0, 0);
|
|
}
|
|
|
|
TEST(UtilTest, DISABLED_getBaseIndex)
|
|
{
|
|
EXPECT_EQ(0, 0);
|
|
}
|
|
|
|
TEST(UtilTest, DISABLED_getClosestOwnedBase)
|
|
{
|
|
EXPECT_EQ(0, 0);
|
|
}
|
|
|
|
TEST(UtilTest, getDistance)
|
|
{
|
|
EXPECT_EQ(Util::getDistance(tp1, tp2), 5);
|
|
}
|
|
|
|
TEST(UtilTest, getLocation)
|
|
{
|
|
Macro::locations.clear();
|
|
Macro::locations.push_back(l1);
|
|
Macro::locations.push_back(l2);
|
|
EXPECT_EQ(Util::getLocation(tp2), 1);
|
|
}
|
|
|
|
TEST(UtilTest, DISABLED_getNeighborArea)
|
|
{
|
|
EXPECT_EQ(0, 0);
|
|
}
|
|
|
|
TEST(UtilTest, DISABLED_getNextExpand)
|
|
{
|
|
EXPECT_EQ(0, 0);
|
|
}
|
|
|
|
TEST(UtilTest, DISABLED_getPath)
|
|
{
|
|
EXPECT_EQ(0, 0);
|
|
}
|
|
|
|
TEST(UtilTest, getQueueIndex)
|
|
{
|
|
Macro::queue.clear();
|
|
QueueEntry q1 = QueueEntry(drone, false, 0);
|
|
QueueEntry q2 = QueueEntry(zergling, false, 0);
|
|
|
|
Macro::queue.push_back(q1);
|
|
Macro::queue.push_back(q2);
|
|
EXPECT_EQ(Util::getQueueIndex(zergling), 1);
|
|
}
|
|
|
|
TEST(UtilTest, DISABLED_getTargetArea)
|
|
{
|
|
EXPECT_EQ(0, 0);
|
|
}
|
|
|
|
TEST(UtilTest, DISABLED_getUnitIndex)
|
|
{
|
|
EXPECT_EQ(0, 0);
|
|
}
|
|
|
|
TEST(UtilTest, DISABLED_getWalkDistance)
|
|
{
|
|
EXPECT_EQ(0, 0);
|
|
}
|
|
|
|
TEST(UtilTest, DISABLED_isAttackingUnit)
|
|
{
|
|
EXPECT_EQ(0, 0);
|
|
}
|
|
|
|
TEST(UtilTest, DISABLED_isBasePosition)
|
|
{
|
|
Macro::bases.clear();
|
|
CBase base = CBase(tp1);
|
|
Macro::bases.push_back(base);
|
|
EXPECT_TRUE(Util::isBasePosition(tp1));
|
|
EXPECT_FALSE(Util::isBasePosition(tp2));
|
|
}
|
|
|
|
TEST(UtilTest, DISABLED_isOwned)
|
|
{
|
|
EXPECT_EQ(0, 0);
|
|
}
|
|
|
|
TEST(UtilTest, DISABLED_ownedBy)
|
|
{
|
|
EXPECT_EQ(0, 0);
|
|
}
|
|
|
|
TEST(UtilTest, DISABLED_reconstructPath)
|
|
{
|
|
EXPECT_EQ(0, 0);
|
|
}
|
|
|
|
TEST(UtilTest, DISABLED_unitCounted)
|
|
{
|
|
EXPECT_EQ(0, 0);
|
|
}
|
|
|
|
TEST(UtilTest, DISABLED_workerBuildingTargetCount)
|
|
{
|
|
EXPECT_EQ(0, 0);
|
|
}
|
|
}
|