MCPcopy Create free account
hub / github.com/OSVR/OSVR-Core / TEST

Function TEST

tests/cplusplus/JointClientKit/JointClientKitWithInterface.cpp:45–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45TEST(BasicJointClientKitWithInterface, ConstructDestruct) {
46 auto options = osvrJointClientCreateOptions();
47 ASSERT_NE(nullptr, options);
48
49 ASSERT_EQ(OSVR_RETURN_SUCCESS,
50 osvrJointClientOptionsLoadPlugin(options, "com_osvr_example_AnalogSync"));
51
52 ASSERT_EQ(OSVR_RETURN_SUCCESS,
53 osvrJointClientOptionsTriggerHardwareDetect(options));
54
55 auto ctx = osvrJointClientInit("org.osvr.test.jointclientkit", options);
56 ASSERT_NE(nullptr, ctx);
57 ASSERT_EQ(OSVR_RETURN_SUCCESS,
58 osvrClientUpdate(ctx));
59
60 OSVR_ClientInterface eye = nullptr;
61 ASSERT_EQ(OSVR_RETURN_SUCCESS,
62 osvrClientGetInterface(ctx, "/com_osvr_example_AnalogSync/MySyncDevice/analog/0", &eye));
63
64 ASSERT_EQ(OSVR_RETURN_SUCCESS,
65 osvrRegisterAnalogCallback(eye, &myAnalogCallback, nullptr));
66
67 ASSERT_EQ(OSVR_RETURN_SUCCESS,
68 osvrClientUpdate(ctx));
69
70 ASSERT_EQ(true, reportReceived);
71
72 ASSERT_EQ(OSVR_RETURN_SUCCESS,
73 osvrClientShutdown(ctx));
74}

Callers

nothing calls this directly

Calls 7

osvrJointClientInitFunction · 0.85
osvrClientUpdateFunction · 0.85
osvrClientGetInterfaceFunction · 0.85
osvrClientShutdownFunction · 0.85

Tested by

no test coverage detected