mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-10 21:41:51 +02:00
[FancyZones] Fix blank layout error (#26828)
This commit is contained in:
@@ -382,7 +382,7 @@ namespace FancyZonesUnitTests
|
||||
|
||||
TEST_METHOD (ZeroZoneCount)
|
||||
{
|
||||
for (int type = static_cast<int>(ZoneSetLayoutType::Focus); type < static_cast<int>(ZoneSetLayoutType::Custom); type++)
|
||||
for (int type = static_cast<int>(ZoneSetLayoutType::Columns); type < static_cast<int>(ZoneSetLayoutType::Custom); type++)
|
||||
{
|
||||
LayoutData data = m_data;
|
||||
data.type = static_cast<ZoneSetLayoutType>(type);
|
||||
@@ -395,6 +395,32 @@ namespace FancyZonesUnitTests
|
||||
Assert::IsFalse(result);
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
LayoutData data = m_data;
|
||||
data.type = static_cast<ZoneSetLayoutType>(ZoneSetLayoutType::Blank);
|
||||
data.zoneCount = 0;
|
||||
auto layout = std::make_unique<Layout>(data);
|
||||
|
||||
for (const auto& rect : m_workAreaRects)
|
||||
{
|
||||
auto result = layout->Init(rect, Mocks::Monitor());
|
||||
Assert::IsTrue(result);
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
LayoutData data = m_data;
|
||||
data.type = static_cast<ZoneSetLayoutType>(ZoneSetLayoutType::Focus);
|
||||
data.zoneCount = 0;
|
||||
auto layout = std::make_unique<Layout>(data);
|
||||
|
||||
for (const auto& rect : m_workAreaRects)
|
||||
{
|
||||
auto result = layout->Init(rect, Mocks::Monitor());
|
||||
Assert::IsTrue(result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
TEST_METHOD (BigZoneCount)
|
||||
|
||||
Reference in New Issue
Block a user