mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 19:26:39 +02:00
FancyZones and Shortcut Guide initial commit
Co-authored-by: Alexis Campailla <alexis@janeasystems.com> Co-authored-by: Bret Anderson <bretan@microsoft.com> Co-authored-by: Enrico Giordani <enrico.giordani@gmail.com> Co-authored-by: Jaime Bernardo <jaime@janeasystems.com> Co-authored-by: Jeff Bogdan <jeffbog@microsoft.com> Co-authored-by: March Rogers <marchr@microsoft.com> Co-authored-by: Mike Harsh <mharsh@microsoft.com> Co-authored-by: Nachum Bundak <Nachum.Bundak@microsoft.com> Co-authored-by: Oliver Jones <ojones@microsoft.com> Co-authored-by: Patrick Little <plittle@microsoft.com>
This commit is contained in:
committed by
Bartosz Sosnowski
parent
10c5396099
commit
8431b80e48
42
src/modules/fancyzones/tests/UnitTests/Util.h
Normal file
42
src/modules/fancyzones/tests/UnitTests/Util.h
Normal file
@@ -0,0 +1,42 @@
|
||||
#pragma once
|
||||
|
||||
namespace CustomAssert
|
||||
{
|
||||
static void AreEqual(const RECT& r1, const RECT& r2)
|
||||
{
|
||||
const bool equal = ((r1.left == r2.left) && (r1.right == r2.right) && (r1.top == r2.top) && (r1.bottom == r2.bottom));
|
||||
Microsoft::VisualStudio::CppUnitTestFramework::Assert::IsTrue(equal);
|
||||
}
|
||||
|
||||
static void AreEqual(GUID g1, GUID g2)
|
||||
{
|
||||
Microsoft::VisualStudio::CppUnitTestFramework::Assert::IsTrue(g1 == g2);
|
||||
}
|
||||
|
||||
static void AreEqual(WORD w1, WORD w2)
|
||||
{
|
||||
Microsoft::VisualStudio::CppUnitTestFramework::Assert::IsTrue(w1 == w2);
|
||||
}
|
||||
}
|
||||
|
||||
namespace Mocks
|
||||
{
|
||||
static HWND Window()
|
||||
{
|
||||
static UINT_PTR s_nextWindow = 0;
|
||||
return reinterpret_cast<HWND>(++s_nextWindow);
|
||||
}
|
||||
|
||||
static HMONITOR Monitor()
|
||||
{
|
||||
static UINT_PTR s_nextMonitor = 0;
|
||||
return reinterpret_cast<HMONITOR>(++s_nextMonitor);
|
||||
}
|
||||
|
||||
static HINSTANCE Instance()
|
||||
{
|
||||
static UINT_PTR s_nextInstance = 0;
|
||||
return reinterpret_cast<HINSTANCE>(++s_nextInstance);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user