Skip to content

Commit

Permalink
removed weird tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Amarcolina committed Mar 28, 2018
1 parent 0a24599 commit 13494f6
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 392 deletions.
Expand Up @@ -30,55 +30,6 @@ public class DeviceTests {
"A Leap device must be connected to successfully test LeapCSharp.");
}

// ಠ_ಠ
//[Test ()]
//public void Device_horizontalViewAngle ()
//{
// // !!!Device_horizontalViewAngle
// float angleOnLongDimension = device.HorizontalViewAngle;
// // !!!END
// Assert.AreEqual(132f, angleOnLongDimension * 180f/(float)Math.PI);
//}

// ಠ_ಠ ಠ_ಠ
//[Test ()]
//public void Device_range ()
//{
// // !!!Device_range
// float range = device.Range;
// // !!!END
// Assert.AreEqual(470f, range);
//}

//[Test ()]
//public void Device_verticalViewAngle ()
//{
// // !!!Device_verticalViewAngle
// float angleOnShortDimension = device.VerticalViewAngle;
// // !!!END
// Assert.AreEqual(115f, angleOnShortDimension * 180f/(float)Math.PI);
//}

[Test()]
public void Device_isSmudged() {
// !!!Device_isSmudged
if (device.IsSmudged) {
//Display message to user
}
// !!!END
Assert.False(device.IsSmudged);
}

[Test()]
public void Device_isLightingBad() {
// !!!Device_isLightingBad
if (device.IsLightingBad) {
//Display message to user
}
// !!!END
Assert.False(device.IsLightingBad);
}

[Test()]
public void Device_operator_equals() {
Device thisDevice = new Device();
Expand Down
Expand Up @@ -414,43 +414,6 @@ public class LeapCTests {
Assert.AreEqual(eLeapRS.eLeapRS_Success, result, "SetDevicePolicyFlags Call");
}

// [Test]
// public void TestSetImagePolicyFlag ()
// {
// IntPtr connHandle = IntPtr.Zero;
// eLeapRS result = LeapC.CreateConnection(out connHandle);
// Assert.AreEqual(eLeapRS.eLeapRS_Success, result);
//
// result = LeapC.OpenConnection(connHandle);
// Assert.AreEqual(eLeapRS.eLeapRS_Success, result);
//
// //Wait for device event
// LEAP_CONNECTION_MESSAGE msg = new LEAP_CONNECTION_MESSAGE();
// uint timeout = 100;
// int attempts = 100;
// for(int t = 0; t < attempts; t++){
// result = LeapC.PollConnection(connHandle, timeout, ref msg);
// if(msg.type == eLeapEventType.eLeapEventType_Device)
// break;
// }
//
// eLeapPolicyFlag policyToCheck = eLeapPolicyFlag.eLeapPolicyFlag_Images;
// UInt64 setFlags = (UInt64)policyToCheck;
// UInt64 clearFlags = 0;
// result = LeapC.SetPolicyFlags(connHandle, setFlags, clearFlags);
// Assert.AreEqual(eLeapRS.eLeapRS_Success, result, "SetDevicePolicyFlags Call successful");
//
// int tries = 100;
// for(int t = 0; t < tries; t++){
// result = LeapC.PollConnection(connHandle, timeout, ref msg);
// if (msg.type == eLeapEventType.eLeapEventType_PolicyChange) {
// LEAP_POLICY_EVENT policyEvent = LeapC.PtrToStruct<LEAP_POLICY_EVENT>(msg.eventStructPtr);
// Assert.IsTrue ((policyEvent.current_policy & setFlags) == setFlags);
// break;
// }
// }
// }

//public static extern eLeapRS LeapSetDeviceFlags (LEAP_DEVICE hDevice, UInt64 set, UInt64 clear, out UInt64* prior);
[Test]
public void TestSetDeviceFlags() {
Expand Down Expand Up @@ -493,13 +456,6 @@ public class LeapCTests {
UInt64 priorFlags = 0;
result = LeapC.SetDeviceFlags(device, setFlags, clearFlags, out priorFlags);
Assert.AreEqual(eLeapRS.eLeapRS_Success, result, "SetDeviceFlags Call successful");

// TODO: This assert assumes that an open device is necessarily streaming (that is,
// it has its stream flag set). It's not clear why this must be the case.
//Assert.AreEqual(
// (uint)eLeapDeviceFlag.eLeapDeviceFlag_Stream,
// (uint)eLeapDeviceFlag.eLeapDeviceFlag_Stream & priorFlags,
// "Device must be streaming after setting the Stream device flag.");
}
}

Expand Down

0 comments on commit 13494f6

Please sign in to comment.