Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
ronny-antoon committed Apr 7, 2024
1 parent c9f90a8 commit da67a19
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
8 changes: 8 additions & 0 deletions test/loggme.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#ifndef ANAN
#define ANAN

#include <MultiPrinterLogger.hpp>

static MultiPrinterLogger* logger12;

#endif
7 changes: 6 additions & 1 deletion test/main.cpp
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@

#include <Arduino.h>
#include <gtest/gtest.h>

#include "loggme.hpp"
#include "test_UpdateOTA.hpp"

void setup()
{
// Initialize Serial
Serial.begin(115200);

logger12 = new MultiPrinterLogger();
logger12->addPrinter(&Serial);
logger12->setLogLevel(MultiPrinterLoggerInterface::VERBOSE);

::testing::InitGoogleTest();
}

Expand Down
11 changes: 4 additions & 7 deletions test/test_UpdateOTA.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
#define TEST_UPDATE_OTA_HPP

#include <gtest/gtest.h>

#include "UpdateOTA.hpp"
#include "MultiPrinterLogger.hpp"
#include "loggme.hpp"



class UpdateOTATest : public ::testing::Test
{
Expand All @@ -16,15 +17,11 @@ class UpdateOTATest : public ::testing::Test
const char *WIFI_SSID = "Wokwi-GUEST";
const char *WIFI_PASSWORD = "";
const int WIFI_CHANNEL = 6;
MultiPrinterLogger *logger = new MultiPrinterLogger();
logger->addPrinter(Serial);
logger->setLogLevel(MultiPrinterLoggerInterface::LogLevel::VERBOSE);


void SetUp() override
{
// Initialize UpdateOTA
_updateOTA = new UpdateOTA(logger);
_updateOTA = new UpdateOTA(logger12);
}

void TearDown() override
Expand Down

0 comments on commit da67a19

Please sign in to comment.