Skip to content

Commit a69bc82

Browse files
committed
Add a few more smoke tests
1 parent c574811 commit a69bc82

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

org.mixedrealitytoolkit.input/Tests/Runtime/BasicInputTests.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,17 +169,23 @@ public IEnumerator StatefulInteractableSmokeTest()
169169
firstCubeInteractable.TriggerOnRelease = (i % 2) == 0;
170170

171171
Assert.IsFalse(firstCubeInteractable.IsGrabHovered,
172+
"StatefulInteractable was already GrabHovered.");
173+
Assert.IsFalse(firstCubeInteractable.isHovered,
172174
"StatefulInteractable was already hovered.");
173175

174176
yield return rightHand.MoveTo(cube.transform.position);
175177
yield return RuntimeTestUtilities.WaitForUpdates();
176178
Assert.IsTrue(firstCubeInteractable.IsGrabHovered,
179+
"StatefulInteractable did not get GrabHovered.");
180+
Assert.IsTrue(firstCubeInteractable.isHovered,
177181
"StatefulInteractable did not get hovered.");
178182

179183
yield return rightHand.SetHandshape(HandshapeId.Pinch);
180184
yield return RuntimeTestUtilities.WaitForUpdates();
181185
Assert.IsTrue(firstCubeInteractable.IsGrabSelected,
182186
"StatefulInteractable did not get GrabSelected.");
187+
Assert.IsTrue(firstCubeInteractable.isSelected,
188+
"StatefulInteractable did not get selected.");
183189

184190
if (shouldTestToggle)
185191
{
@@ -218,17 +224,23 @@ public IEnumerator StatefulInteractableSmokeTest()
218224
yield return RuntimeTestUtilities.WaitForUpdates();
219225

220226
Assert.IsFalse(secondCubeInteractable.IsGrabHovered,
227+
"StatefulInteractable was already GrabHovered.");
228+
Assert.IsFalse(secondCubeInteractable.isHovered,
221229
"StatefulInteractable was already hovered.");
222230

223231
yield return rightHand.MoveTo(secondCubeInteractable.transform.position);
224232
yield return RuntimeTestUtilities.WaitForUpdates();
225233
Assert.IsTrue(secondCubeInteractable.IsGrabHovered,
234+
"StatefulInteractable did not get GrabHovered.");
235+
Assert.IsTrue(secondCubeInteractable.isHovered,
226236
"StatefulInteractable did not get hovered.");
227237

228238
yield return rightHand.SetHandshape(HandshapeId.Pinch);
229239
yield return RuntimeTestUtilities.WaitForUpdates();
230240
Assert.IsTrue(secondCubeInteractable.IsGrabSelected,
231241
"StatefulInteractable did not get GrabSelected.");
242+
Assert.IsTrue(secondCubeInteractable.isSelected,
243+
"StatefulInteractable did not get selected.");
232244

233245
if (shouldTestToggle)
234246
{

0 commit comments

Comments
 (0)