Cleaned up integer type usage in wpilibc (#92)

Replaced all unsigned types to signed and int32_t with int in wpilibc
This commit is contained in:
Tyler Veness
2016-09-06 00:01:45 -07:00
committed by Peter Johnson
parent ff93050b31
commit 0cd05d1a42
169 changed files with 914 additions and 943 deletions

View File

@@ -128,7 +128,7 @@ TEST_F(DIOLoopTest, FakeCounter) {
EXPECT_EQ(0, counter.Get()) << "Counter did not initialize to 0.";
/* Count 100 ticks. The counter value should be 100 after this loop. */
for (int i = 0; i < 100; i++) {
for (int32_t i = 0; i < 100; i++) {
m_output->Set(true);
Wait(kCounterTime);
m_output->Set(false);
@@ -139,13 +139,13 @@ TEST_F(DIOLoopTest, FakeCounter) {
}
static void InterruptHandler(uint32_t interruptAssertedMask, void* param) {
*reinterpret_cast<int*>(param) = 12345;
*reinterpret_cast<int32_t*>(param) = 12345;
}
TEST_F(DIOLoopTest, AsynchronousInterruptWorks) {
int param = 0;
int32_t param = 0;
// Given an interrupt handler that sets an int to 12345
// Given an interrupt handler that sets an int32_t to 12345
m_input->RequestInterrupts(InterruptHandler, &param);
m_input->EnableInterrupts();
@@ -154,7 +154,7 @@ TEST_F(DIOLoopTest, AsynchronousInterruptWorks) {
m_output->Set(true);
m_input->CancelInterrupts();
// Then the int should be 12345
// Then the int32_t should be 12345
Wait(kDelayTime);
EXPECT_EQ(12345, param) << "The interrupt did not run.";
}