Skip to content

Commit 80ebf45

Browse files
authored
Guid key testing (#481)
1 parent 80de096 commit 80ebf45

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

test/test_win7/guid_key.cpp

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#include "pch.h"
2+
3+
using namespace winrt;
4+
using namespace Windows::Foundation;
5+
6+
TEST_CASE("guid_key")
7+
{
8+
auto uri = guid_of<Uri>();
9+
auto deferral = guid_of<Deferral>();
10+
11+
std::map<guid, std::string> ordered;
12+
ordered[uri] = "Uri";
13+
ordered[deferral] = "Deferral";
14+
REQUIRE(ordered[uri] == "Uri");
15+
REQUIRE(ordered[deferral] == "Deferral");
16+
17+
std::unordered_map<guid, std::string> unordered;
18+
unordered[uri] = "Uri";
19+
unordered[deferral] = "Deferral";
20+
REQUIRE(unordered[uri] == "Uri");
21+
REQUIRE(unordered[deferral] == "Deferral");
22+
}

test/test_win7/test_win7.vcxproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,7 @@
328328
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NotUsing</PrecompiledHeader>
329329
</ClCompile>
330330
<ClCompile Include="GetMany.cpp" />
331+
<ClCompile Include="guid_key.cpp" />
331332
<ClCompile Include="iid_ppv_args.cpp" />
332333
<ClCompile Include="inspectable_interop.cpp">
333334
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>

0 commit comments

Comments
 (0)