kora-bot/KoraBotTest/QueueEntryTest.cpp

41 lines
1,013 B
C++
Raw Normal View History

2023-04-10 23:31:02 +00:00
#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());
}
}