Skip to content
This repository was archived by the owner on Mar 17, 2025. It is now read-only.

Commit 721a3c4

Browse files
committed
fix error empty checks, header files and makefile for modem test
1 parent 905c4bc commit 721a3c4

13 files changed

+14
-14
lines changed

contrib/src/modem/db/get-command.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ bool GetCommand::execute(const String& command,
1616
String path = in->readLine();
1717
String value = fbase().getString(path);
1818

19-
if (fbase().error() != "") {
19+
if (fbase().error().length() == 0) {
2020
out->print("-FAIL ");
2121
out->println(fbase().error().c_str());
2222
return false;

contrib/src/modem/db/push-command.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ bool PushCommand::execute(const String& command,
1919

2020
fbase().pushString(path, data);
2121

22-
if (fbase().error() != "") {
22+
if (fbase().error().length() == 0) {
2323
out->print("-FAIL ");
2424
out->println(fbase().error().c_str());
2525
return false;

contrib/src/modem/db/remove-command.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ bool RemoveCommand::execute(const String& command,
1616
String path = in->readLine();
1717
fbase().remove(path);
1818

19-
if (fbase().error() != "") {
19+
if (fbase().error().length() == 0) {
2020
out->print("-FAIL ");
2121
out->println(fbase().error().c_str());
2222
return false;

contrib/src/modem/db/set-command.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ bool SetCommand::execute(const String& command,
1919

2020
fbase().setString(path, data);
2121

22-
if (fbase().error() != "") {
22+
if (fbase().error().length() == 0) {
2323
out->print("-FAIL ");
2424
out->println(fbase().error().c_str());
2525
return false;

contrib/src/modem/db/stream-command.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ bool StreamCommand::execute(const String& command,
1616
String path = in->readLine().c_str();
1717
fbase().stream(path);
1818

19-
if (fbase().error() != "") {
19+
if (fbase().error().length() == 0) {
2020
out->print("-FAIL ");
2121
out->println(fbase().error().c_str());
2222
return false;

contrib/test/modem/Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ arduino_mock_all.a : ArduinoMockAll.o
130130

131131
# Builds shared objects.
132132

133-
Firebase.o : $(FIREBASE_SRC_ROOT)/Firebase.cpp
134-
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(FIREBASE_SRC_ROOT)/Firebase.cpp
133+
Firebase.o : $(FIREBASE_SRC_ROOT)/FirebaseArduino.cpp
134+
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(FIREBASE_SRC_ROOT)/FirebaseArduino.cpp
135135

136136
FirebaseHttpClient_dummy.o : $(PROJECT_ROOT)/test/dummies/FirebaseHttpClient_dummy.cpp
137137
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(PROJECT_ROOT)/test/dummies/FirebaseHttpClient_dummy.cpp

contrib/test/modem/begin-command_test.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "Firebase.h"
1+
#include "FirebaseArduino.h"
22
#include "gtest/gtest.h"
33
#include "modem/db/commands.h"
44
#include "test/modem/mock-input-stream.h"

contrib/test/modem/get-command_test.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "Firebase.h"
1+
#include "FirebaseArduino.h"
22
#include "gtest/gtest.h"
33
#include "modem/db/commands.h"
44
#include "test/modem/mock-input-stream.h"

contrib/test/modem/push-command_test.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "Firebase.h"
1+
#include "FirebaseArduino.h"
22
#include "gtest/gtest.h"
33
#include "modem/db/commands.h"
44
#include "modem/json_util.h"

contrib/test/modem/remove-command_test.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#include "test/modem/mock-output-stream.h"
33
#include "test/modem/mock-input-stream.h"
44
#include "test/mock-firebase.h"
5-
#include "Firebase.h"
5+
#include "FirebaseArduino.h"
66
#include "modem/db/commands.h"
77

88
namespace firebase {

contrib/test/modem/serial-transceiver_test.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include <vector>
22

3-
#include "Firebase.h"
3+
#include "FirebaseArduino.h"
44
#include "gtest/gtest.h"
55
#include "modem/SerialTransceiver.h"
66

contrib/test/modem/set-command_test.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "Firebase.h"
1+
#include "FirebaseArduino.h"
22
#include "gtest/gtest.h"
33
#include "modem/db/commands.h"
44
#include "modem/json_util.h"

contrib/test/modem/stream-command_test.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "Firebase.h"
1+
#include "FirebaseArduino.h"
22
#include "gtest/gtest.h"
33
#include "modem/db/commands.h"
44
#include "test/modem/mock-input-stream.h"

0 commit comments

Comments
 (0)