Skip to content

Commit 359e0f6

Browse files
author
James Foster
authored
Switch Windows tests back to Windows (#314)
Switch Windows tests back to Windows
1 parent d0e37b0 commit 359e0f6

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

.gitattributes

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# https://docs.github.com/en/github/using-git/configuring-git-to-handle-line-endings
22
# https://git-scm.com/docs/gitattributes
3-
# https://git-scm.com/docs/git-config
4-
# https://adaptivepatchwork.com/2012/03/01/mind-the-end-of-your-line/
3+
# https://git-scm.com/docs/git-config
4+
# https://adaptivepatchwork.com/2012/03/01/mind-the-end-of-your-line/
55

6-
# Configure this repository to use Git's type detection algorithm to guess
7-
# whether a file is text or binary. Text files will have line endings converted
8-
# as if you had set
6+
# Configure this repository to use Git's type detection algorithm to guess
7+
# whether a file is text or binary. Text files will have line endings converted
8+
# as if you had set
99
# eol=native
1010
# That is, on Windows text files will have CRLF line endings in your working
1111
# directory while on Linux and macOS your text files will have LF line endings

.github/workflows/windows.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on: [push, pull_request]
55

66
jobs:
77
"unittest_lint_sampleproject":
8-
runs-on: ubuntu-latest
8+
runs-on: windows-latest
99
steps:
1010
- uses: actions/checkout@v2
1111
- uses: ruby/setup-ruby@v1
@@ -23,7 +23,7 @@ jobs:
2323
bundle exec arduino_ci.rb
2424
2525
NetworkLib:
26-
runs-on: ubuntu-latest
26+
runs-on: windows-latest
2727
steps:
2828
- uses: actions/checkout@v2
2929
- uses: ruby/setup-ruby@v1

SampleProjects/TestSomething/test/godmode.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,9 @@ unittest(shift_in) {
236236
originalSize = state->digitalPin[clockPin].historySize();
237237

238238
input = shiftIn(dataPin, clockPin, MSBFIRST);
239-
assertEqual(0x7C, (uint)input); // 0111 1100
239+
assertEqual(0x7C, (uint16_t)input); // 0111 1100
240240
assertEqual('|', input); // 0111 1100
241-
assertEqual((uint)'|', (uint)input); // 0111 1100
241+
assertEqual((uint16_t)'|', (uint16_t)input); // 0111 1100
242242

243243
// now verify clock
244244
assertEqual(16, state->digitalPin[clockPin].historySize() - originalSize);
@@ -249,15 +249,15 @@ unittest(shift_in) {
249249
state->reset();
250250
state->digitalPin[dataPin].fromAscii("|", true); // 0111 1100
251251
input = shiftIn(dataPin, clockPin, LSBFIRST); // <- note the LSB/MSB flip
252-
assertEqual(0x3E, (uint)input); // 0011 1110
252+
assertEqual(0x3E, (uint16_t)input); // 0011 1110
253253
assertEqual('>', input); // 0011 1110
254-
assertEqual((uint)'>', (uint)input); // 0011 1110
254+
assertEqual((uint16_t)'>', (uint16_t)input); // 0011 1110
255255

256256
// test setting MSB
257257
state->reset();
258258
state->digitalPin[dataPin].fromAscii("U", true); // 0101 0101
259259
input = shiftIn(dataPin, clockPin, LSBFIRST); // <- note the LSB/MSB flip
260-
assertEqual(0xAA, (uint)input); // 1010 1010
260+
assertEqual(0xAA, (uint16_t)input); // 1010 1010
261261
}
262262

263263
unittest(shift_out) {

0 commit comments

Comments
 (0)