mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-04 18:26:39 +02:00
[FancyZones] Move FancyZones out of the runner process (#11818)
* rename dll -> FancyZonesModuleInterface (#11488) * [FancyZones] Rename "fancyzones/tests" -> "fancyzones/FancyZonesTests" (#11492) * [FancyZones] Rename "fancyzones/lib" -> "fancyzones/FancyZonesLib" (#11489) * [FancyZones] New FancyZones project. (#11544) * [FancyZones] Allow single instance of "PowerToys.FancyZones.exe" (#11558) * [FancyZones] Updated bug reports (#11571) * [FancyZones] Updated installer (#11572) * [FancyZones] Update string resources (#11596) * [FancyZones] Terminate FancyZones with runner (#11696) * [FancyZones] Drop support for the module interface API to save settings (#11661) * Settings telemetry for FancyZones (#11766) * commented out test * enable dpi awareness for the process
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
#include "pch.h"
|
||||
#include "FancyZonesLib\Zone.h"
|
||||
#include "FancyZonesLib\Settings.h"
|
||||
|
||||
#include "Util.h"
|
||||
|
||||
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
|
||||
|
||||
namespace FancyZonesUnitTests
|
||||
{
|
||||
TEST_CLASS(ZoneUnitTests)
|
||||
{
|
||||
private:
|
||||
RECT m_zoneRect{ 10, 10, 200, 200 };
|
||||
HINSTANCE m_hInst{};
|
||||
|
||||
TEST_METHOD_INITIALIZE(Init)
|
||||
{
|
||||
m_hInst = (HINSTANCE)GetModuleHandleW(nullptr);
|
||||
}
|
||||
|
||||
public:
|
||||
TEST_METHOD(TestCreateZone)
|
||||
{
|
||||
winrt::com_ptr<IZone> zone = MakeZone(m_zoneRect, 1);
|
||||
Assert::IsNotNull(&zone);
|
||||
CustomAssert::AreEqual(m_zoneRect, zone->GetZoneRect());
|
||||
}
|
||||
|
||||
TEST_METHOD(TestCreateZoneZeroRect)
|
||||
{
|
||||
RECT zoneRect{ 0, 0, 0, 0 };
|
||||
winrt::com_ptr<IZone> zone = MakeZone(zoneRect, 1);
|
||||
Assert::IsNotNull(&zone);
|
||||
CustomAssert::AreEqual(zoneRect, zone->GetZoneRect());
|
||||
}
|
||||
|
||||
TEST_METHOD(GetSetId)
|
||||
{
|
||||
constexpr size_t zoneId = 123;
|
||||
winrt::com_ptr<IZone> zone = MakeZone(m_zoneRect, zoneId);
|
||||
|
||||
Assert::AreEqual(zone->Id(), zoneId);
|
||||
}
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user