forked from microsoft/cppwinrt
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuniform_in_params.cpp
More file actions
29 lines (26 loc) · 1.8 KB
/
Copy pathuniform_in_params.cpp
File metadata and controls
29 lines (26 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include "pch.h"
#include "winrt/test_component.h"
using namespace winrt;
using namespace Windows::Foundation;
using namespace Windows::Foundation::Collections;
using namespace test_component;
TEST_CASE("uniform_in_params")
{
Class{ single_threaded_vector<hstring>({ L"test" }).as<IIterable<hstring>>(), 0 };
Class{ single_threaded_map<hstring, hstring>(std::map<hstring, hstring>{ {L"test", L"test" } }).as<IIterable<IKeyValuePair<hstring, hstring>>>(), 0, 0 };
Class{ single_threaded_map<hstring, hstring>(std::map<hstring, hstring>{ {L"test", L"test" } }), 0, 0, 0 };
Class{ single_threaded_map<hstring, hstring>(std::map<hstring, hstring>{ {L"test", L"test" } }).GetView(), 0, 0, 0, 0 };
Class{ single_threaded_vector<hstring>({ L"test" }), 0, 0, 0, 0, 0 };
Class{ single_threaded_vector<hstring>({ L"test" }).GetView(), 0, 0, 0, 0, 0, 0 };
Class c;
REQUIRE(L"test" == c.InIterable({L"test"}));
REQUIRE(L"test" == c.InIterablePair(single_threaded_map<hstring, hstring>(std::map<hstring, hstring>{ {L"test", L"test" } })));
REQUIRE(L"test" == c.InAsyncIterable({ L"test" }).get());
REQUIRE(L"test" == c.InAsyncIterablePair(single_threaded_map<hstring, hstring>(std::map<hstring, hstring>{ {L"test", L"test" } })).get());
REQUIRE(L"test" == c.InMap(single_threaded_map<hstring, hstring>(std::map<hstring, hstring>{ {L"test", L"test" } })));
REQUIRE(L"test" == c.InMapView(single_threaded_map<hstring, hstring>(std::map<hstring, hstring>{ {L"test", L"test" } }).GetView()));
REQUIRE(L"test" == c.InAsyncMapView(single_threaded_map<hstring, hstring>(std::map<hstring, hstring>{ {L"test", L"test" } }).GetView()).get());
REQUIRE(L"test" == c.InVector({ L"test" }));
REQUIRE(L"test" == c.InVectorView({ L"test" }));
REQUIRE(L"test" == c.InAsyncVectorView({ L"test" }).get());
}