We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
itoa()
1 parent caa990a commit 1ccae14Copy full SHA for 1ccae14
SampleProjects/TestSomething/test/stdlib.cpp
@@ -1,5 +1,7 @@
1
#include <ArduinoUnitTests.h>
2
#include <Arduino.h>
3
+#include <ctype.h>
4
+#include <string.h>
5
6
#define ARRAY_SIZEOF(a) ( sizeof(a) / sizeof((a)[0]) )
7
@@ -26,6 +28,9 @@ unittest(library_tests_itoa)
26
28
};
27
29
30
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
+ }
34
result = itoa(table[i].value, buf, table[i].base);
35
assertEqual(table[i].expected, result);
36
}
0 commit comments