@@ -21,13 +21,13 @@ bool test_preferences(T value,
21
21
// .6 we compare the value with what we inserted at the beginning
22
22
// .7 we remove the value
23
23
24
- Serial.println (" Tesing isKey()" );
24
+ Serial.println (" Testing isKey()" );
25
25
if (preferences->isKey (KEY)) {
26
26
Serial.println (" [Error] kvstore already contains a key" );
27
27
return false ;
28
28
}
29
29
30
- Serial.println (" Tesing put()" );
30
+ Serial.println (" Testing put()" );
31
31
size_t s;
32
32
if ((s=putf (KEY, value)) != sizeof (value)) {
33
33
Serial.println (" [Error] kvstore put returned a size that is different from the expected one: " );
@@ -37,13 +37,13 @@ bool test_preferences(T value,
37
37
return false ;
38
38
}
39
39
40
- Serial.println (" Tesing isKey()" ); // FIXME always failing
40
+ Serial.println (" Testing isKey()" );
41
41
if (!preferences->isKey (KEY)) {
42
42
Serial.println (" [Error] The inserted key is not present in the KVStore" );
43
43
return false ;
44
44
}
45
45
46
- Serial.println (" Tesing getf()" );
46
+ Serial.println (" Testing getf()" );
47
47
T val;
48
48
if ((val = getf (KEY)) != value) {
49
49
Serial.print (" [Error] get of the previously value returned a wrong value: " );
@@ -53,7 +53,7 @@ bool test_preferences(T value,
53
53
return false ;
54
54
}
55
55
56
- Serial.println (" Tesing remove()" );
56
+ Serial.println (" Testing remove()" );
57
57
if (!preferences->remove (KEY)) {
58
58
Serial.println (" [Error] Failed removing the inserted key" );
59
59
return false ;
@@ -72,13 +72,13 @@ bool test_preferences(char* value, Preferences *preferences) {
72
72
// .6 we compare the value with what we inserted at the beginning
73
73
// .7 we remove the value
74
74
75
- Serial.println (" Tesing isKey()" );
75
+ Serial.println (" Testing isKey()" );
76
76
if (preferences->isKey (KEY)) {
77
77
Serial.println (" [Error] kvstore already contains a key" );
78
78
return false ;
79
79
}
80
80
81
- Serial.println (" Tesing put()" );
81
+ Serial.println (" Testing put()" );
82
82
size_t s;
83
83
if ((s=preferences->putString (KEY, value)) != strlen (value)) {
84
84
Serial.println (" [Error] kvstore put returned a size that is different from the expected one: " );
@@ -88,13 +88,13 @@ bool test_preferences(char* value, Preferences *preferences) {
88
88
return false ;
89
89
}
90
90
91
- Serial.println (" Tesing isKey()" );
91
+ Serial.println (" Testing isKey()" );
92
92
if (!preferences->isKey (KEY)) {
93
93
Serial.println (" [Error] The inserted key is not present in the KVStore" );
94
94
return false ;
95
95
}
96
96
97
- Serial.println (" Tesing getf()" );
97
+ Serial.println (" Testing getf()" );
98
98
char val[500 ];
99
99
preferences->getString (KEY, val, sizeof (val));
100
100
if (strcmp (val, value) != 0 ) {
@@ -116,7 +116,7 @@ bool test_preferences(char* value, Preferences *preferences) {
116
116
return false ;
117
117
}
118
118
119
- Serial.println (" Tesing remove()" );
119
+ Serial.println (" Testing remove()" );
120
120
if (!preferences->remove (KEY)) {
121
121
Serial.println (" [Error] Failed removing the inserted key" );
122
122
return false ;
@@ -134,14 +134,13 @@ bool test_preferences(uint8_t* value, size_t size, Preferences *preferences) {
134
134
// .5 we get the value contained
135
135
// .6 we compare the value with what we inserted at the beginning
136
136
// .7 we remove the value
137
-
138
- Serial.println (" Tesing isKey()" );
137
+ Serial.println (" Testing isKey()" );
139
138
if (preferences->isKey (KEY)) {
140
139
Serial.println (" [Error] kvstore already contains a key" );
141
140
return false ;
142
141
}
143
142
144
- Serial.println (" Tesing put()" );
143
+ Serial.println (" Testing put()" );
145
144
size_t s;
146
145
if ((s=preferences->putBytes (KEY, value, size)) != size) {
147
146
Serial.println (" [Error] kvstore put returned a size that is different from the expected one: " );
@@ -151,13 +150,13 @@ bool test_preferences(uint8_t* value, size_t size, Preferences *preferences) {
151
150
return false ;
152
151
}
153
152
154
- Serial.println (" Tesing isKey()" );
153
+ Serial.println (" Testing isKey()" );
155
154
if (!preferences->isKey (KEY)) {
156
155
Serial.println (" [Error] The inserted key is not present in the KVStore" );
157
156
return false ;
158
157
}
159
158
160
- Serial.println (" Tesing getBytesLength()" );
159
+ Serial.println (" Testing getBytesLength()" );
161
160
if ((s=preferences->getBytesLength (KEY)) != size) {
162
161
Serial.println (" [Error] The length of the value do not match with the expected one" );
163
162
Serial.print (s);
@@ -166,7 +165,7 @@ bool test_preferences(uint8_t* value, size_t size, Preferences *preferences) {
166
165
return false ;
167
166
}
168
167
169
- Serial.println (" Tesing getf()" );
168
+ Serial.println (" Testing getf()" );
170
169
uint8_t val[500 ];
171
170
s = preferences->getBytes (KEY, val, sizeof (val));
172
171
@@ -183,7 +182,7 @@ bool test_preferences(uint8_t* value, size_t size, Preferences *preferences) {
183
182
return false ;
184
183
}
185
184
186
- Serial.println (" Tesing remove()" );
185
+ Serial.println (" Testing remove()" );
187
186
if (!preferences->remove (KEY)) {
188
187
Serial.println (" [Error] Failed removing the inserted key" );
189
188
return false ;
0 commit comments