Skip to content

Commit fb719ba

Browse files
committed
Fixed narrowing conversion.
1 parent cf4edb0 commit fb719ba

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/test_rpcCall.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ TEST_CASE("RPC call class member functions", "[call][class]") {
427427

428428
TEST_CASE("Executing a function", "[call]") {
429429
struct S {
430-
static short int f1(int i, char c) {
430+
static int f1(short int i, char c) {
431431
return i + c + 1;
432432
}
433433
static String f2(Object<String, char*, char const*>& o) {
@@ -436,11 +436,11 @@ TEST_CASE("Executing a function", "[call]") {
436436
};
437437

438438
Serial.reset();
439-
Serial.prepare(1234, '\3');
439+
Serial.prepare(static_cast<short int>(1234), '\3');
440440
rpcCall(Serial, S::f1);
441-
REQUIRE(Serial.rx == sizeof(int) + sizeof(char));
442-
REQUIRE(Serial.tx == sizeof(short int));
443-
REQUIRE(Serial.inspect<short int>() == 1238);
441+
REQUIRE(Serial.rx == sizeof(short int) + sizeof(char));
442+
REQUIRE(Serial.tx == sizeof(int));
443+
REQUIRE(Serial.inspect<int>() == 1238);
444444

445445
Serial.reset();
446446
Serial.prepare("a", "bc", "def");

0 commit comments

Comments
 (0)