Skip to content

Commit 1ccae14

Browse files
committed
Upshift itoa() result so that Windows result matches expected values.
1 parent caa990a commit 1ccae14

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

SampleProjects/TestSomething/test/stdlib.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#include <ArduinoUnitTests.h>
22
#include <Arduino.h>
3+
#include <ctype.h>
4+
#include <string.h>
35

46
#define ARRAY_SIZEOF(a) ( sizeof(a) / sizeof((a)[0]) )
57

@@ -26,6 +28,9 @@ unittest(library_tests_itoa)
2628
};
2729

2830
for (int i = 0; i < ARRAY_SIZEOF(table); i++) {
31+
for (int j = 0; j < strlen(buf); ++j) {
32+
buf[j] = toupper(buf[j]);
33+
}
2934
result = itoa(table[i].value, buf, table[i].base);
3035
assertEqual(table[i].expected, result);
3136
}

0 commit comments

Comments
 (0)