forked from microsoft/cppwinrt
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSimple.cpp
More file actions
27 lines (21 loc) · 780 Bytes
/
Copy pathSimple.cpp
File metadata and controls
27 lines (21 loc) · 780 Bytes
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
#include "pch.h"
#include "winrt/test_component_fast.h"
using namespace winrt;
using namespace test_component_fast;
TEST_CASE("Simple")
{
impl::get_diagnostics_info().detach();
Simple c;
REQUIRE(c.Method1() == L"Method1");
REQUIRE(c.Method2() == L"Method2");
REQUIRE(c.Method3() == L"Method3");
auto info = impl::get_diagnostics_info().get();
REQUIRE(info.factories.size() == 1);
REQUIRE(info.factories[name_of<Simple>()].is_agile);
REQUIRE(info.factories[name_of<Simple>()].requests == 1);
REQUIRE(info.queries.size() == 4);
REQUIRE(info.queries[L"IAgileObject"] == 1);
REQUIRE(info.queries[name_of<Simple>()] == 1);
REQUIRE(info.queries[name_of<ISimple2>()] == 1);
REQUIRE(info.queries[name_of<ISimple3>()] == 1);
}