Skip to content

Commit

Permalink
Fix unit testing on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
ianfixes committed Apr 5, 2021
1 parent 2acef48 commit 1fe709a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions SampleProjects/TestSomething/test/godmode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,9 @@ unittest(shift_in) {
originalSize = state->digitalPin[clockPin].historySize();

input = shiftIn(dataPin, clockPin, MSBFIRST);
assertEqual(0x7C, (uint)input); // 0111 1100
assertEqual(0x7C, (unit8_t)input); // 0111 1100
assertEqual('|', input); // 0111 1100
assertEqual((uint)'|', (uint)input); // 0111 1100
assertEqual((unit8_t)'|', (unit8_t)input); // 0111 1100

// now verify clock
assertEqual(16, state->digitalPin[clockPin].historySize() - originalSize);
Expand All @@ -249,15 +249,15 @@ unittest(shift_in) {
state->reset();
state->digitalPin[dataPin].fromAscii("|", true); // 0111 1100
input = shiftIn(dataPin, clockPin, LSBFIRST); // <- note the LSB/MSB flip
assertEqual(0x3E, (uint)input); // 0011 1110
assertEqual(0x3E, (unit8_t)input); // 0011 1110
assertEqual('>', input); // 0011 1110
assertEqual((uint)'>', (uint)input); // 0011 1110
assertEqual((unit8_t)'>', (unit8_t)input); // 0011 1110

// test setting MSB
state->reset();
state->digitalPin[dataPin].fromAscii("U", true); // 0101 0101
input = shiftIn(dataPin, clockPin, LSBFIRST); // <- note the LSB/MSB flip
assertEqual(0xAA, (uint)input); // 1010 1010
assertEqual(0xAA, (unit8_t)input); // 1010 1010
}

unittest(shift_out) {
Expand Down

0 comments on commit 1fe709a

Please sign in to comment.