41 lines
1,013 B
C++
41 lines
1,013 B
C++
#include "pch.h"
|
|
|
|
#pragma once
|
|
#include <BWAPI.h>
|
|
|
|
#include "../Source/BWEM/src/bwem.h";
|
|
#include "../Source/QueueEntry.h";
|
|
|
|
using namespace BWAPI;
|
|
|
|
namespace QueueEntryTest
|
|
{
|
|
BWAPI::TechType tech = BWAPI::TechTypes::Burrowing;
|
|
BWAPI::UnitType unit = BWAPI::UnitTypes::Zerg_Drone;
|
|
BWAPI::UpgradeType upgrade = BWAPI::UpgradeTypes::Zerg_Missile_Attacks;
|
|
|
|
QueueEntry techEntry = QueueEntry(tech, false, 0);
|
|
QueueEntry unitEntry = QueueEntry(unit, false, 0);
|
|
QueueEntry upgradeEntry = QueueEntry(upgrade, false, 0);
|
|
|
|
TEST(QueueEntryTest, isTech)
|
|
{
|
|
EXPECT_TRUE(techEntry.isTech());
|
|
EXPECT_FALSE(techEntry.isUnit());
|
|
EXPECT_FALSE(techEntry.isUpgrade());
|
|
}
|
|
|
|
TEST(QueueEntryTest, isUnit)
|
|
{
|
|
EXPECT_FALSE(unitEntry.isTech());
|
|
EXPECT_TRUE(unitEntry.isUnit());
|
|
EXPECT_FALSE(unitEntry.isUpgrade());
|
|
}
|
|
|
|
TEST(QueueEntryTest, isUpgrade)
|
|
{
|
|
EXPECT_FALSE(upgradeEntry.isTech());
|
|
EXPECT_FALSE(upgradeEntry.isUnit());
|
|
EXPECT_TRUE(upgradeEntry.isUpgrade());
|
|
}
|
|
} |