diff --git a/tests/classbind-tests/classbind-tests.ino b/tests/classbind-tests/classbind-tests.ino index bd00c2d..13de492 100644 --- a/tests/classbind-tests/classbind-tests.ino +++ b/tests/classbind-tests/classbind-tests.ino @@ -17,7 +17,7 @@ class TestReceiver : public MqttClassBinder public: TestReceiver(const char* name) : MqttClassBinder(), name_(name) {} - void onPublish(const MqttClient* /* source */, const Topic& topic, const char* payload, size_t /* length */) + void onPublish(const MqttClient* /* source */, const Topic& topic, const char* /* payload */, size_t /* length */) { (void) topic; // Serial << "--> routed message received by " << name_ << ':' << topic.c_str() << " = " << payload << endl; diff --git a/tests/local-tests/local-tests.ino b/tests/local-tests/local-tests.ino index 6e5139d..f102055 100644 --- a/tests/local-tests/local-tests.ino +++ b/tests/local-tests/local-tests.ino @@ -12,8 +12,6 @@ * Also, this will allow to mock and thus run Action on github **/ -using namespace std; - MqttBroker broker(1883); std::map> published; // map[client_id] => map[topic] = count diff --git a/tests/nowifi-tests/nowifi-tests.ino b/tests/nowifi-tests/nowifi-tests.ino index bfd2084..813d2ea 100644 --- a/tests/nowifi-tests/nowifi-tests.ino +++ b/tests/nowifi-tests/nowifi-tests.ino @@ -11,8 +11,6 @@ * Checks with a local broker. Clients must connect to the local broker **/ -using namespace std; - MqttBroker broker(1883); std::map> published; // map[client_id] => map[topic] = count diff --git a/tests/string-indexer-tests/string-indexer-tests.ino b/tests/string-indexer-tests/string-indexer-tests.ino index 7ae54ec..b1f856b 100644 --- a/tests/string-indexer-tests/string-indexer-tests.ino +++ b/tests/string-indexer-tests/string-indexer-tests.ino @@ -9,8 +9,6 @@ * **/ -using namespace std; - test(indexer_empty) { assertEqual(StringIndexer::count(), 0); diff --git a/tests/topic-tests/topic-tests.ino b/tests/topic-tests/topic-tests.ino index 8b3179b..6090d9a 100644 --- a/tests/topic-tests/topic-tests.ino +++ b/tests/topic-tests/topic-tests.ino @@ -5,26 +5,22 @@ #include #include -#define endl "\n" - /** * TinyMqtt / StringIndexer unit tests. * **/ -using namespace std; - bool testTopicMatch(const char* a, const char* b, bool expected) { Topic ta(a); Topic tb(b); bool match(ta.matches(tb)); - cout << " " << ta.c_str() << ' '; + std::cout << " " << ta.c_str() << ' '; if (match != expected) - cout << (expected ? " should match " : " should not match "); + std::cout << (expected ? " should match " : " should not match "); else - cout << (expected ? " matches " : " unmatches "); - cout << tb.c_str() << endl; + std::cout << (expected ? " matches " : " unmatches "); + std::cout << tb.c_str() << std::endl; return expected == match; }