Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions 6 api/IPAddress.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,20 +96,26 @@ IPAddress::IPAddress(const char *address)

String IPAddress::toString4() const
{
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
char szRet[16];
sprintf(szRet,"%u.%u.%u.%u", _address.bytes[IPADDRESS_V4_BYTES_INDEX], _address.bytes[IPADDRESS_V4_BYTES_INDEX + 1], _address.bytes[IPADDRESS_V4_BYTES_INDEX + 2], _address.bytes[IPADDRESS_V4_BYTES_INDEX + 3]);
return String(szRet);
#pragma GCC diagnostic pop
}

String IPAddress::toString6() const
{
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
char szRet[40];
sprintf(szRet,"%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x",
_address.bytes[0], _address.bytes[1], _address.bytes[2], _address.bytes[3],
_address.bytes[4], _address.bytes[5], _address.bytes[6], _address.bytes[7],
_address.bytes[8], _address.bytes[9], _address.bytes[10], _address.bytes[11],
_address.bytes[12], _address.bytes[13], _address.bytes[14], _address.bytes[15]);
return String(szRet);
#pragma GCC diagnostic pop
}

String IPAddress::toString() const
Expand Down
3 changes: 3 additions & 0 deletions 3 api/deprecated-avr-comp/avr/dtostrf.c.impl
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,12 @@
char *dtostrf (double val, signed char width, unsigned char prec, char *sout) {
asm(".global _printf_float");

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
char fmt[20];
sprintf(fmt, "%%%d.%df", width, prec);
sprintf(sout, fmt, val);
return sout;
#pragma GCC diagnostic pop
}

2 changes: 1 addition & 1 deletion 2 test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ project(test-ArduinoCore-API)

##########################################################################

include_directories(../api)
include_directories(..)
include_directories(include)
include_directories(external/catch/v2.13.9/include)

Expand Down
2 changes: 1 addition & 1 deletion 2 test/include/MillisFake.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* INCLUDE
**************************************************************************************/

#include <Common.h>
#include <api/Common.h>

/**************************************************************************************
* FUNCTION DECLARATION
Expand Down
2 changes: 1 addition & 1 deletion 2 test/include/PrintMock.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#include <string>

#include <Print.h>
#include <api/Print.h>

/**************************************************************************************
* CLASS DECLARATION
Expand Down
2 changes: 1 addition & 1 deletion 2 test/include/PrintableMock.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#include <string>

#include <Printable.h>
#include <api/Printable.h>

/**************************************************************************************
* CLASS DECLARATION
Expand Down
2 changes: 1 addition & 1 deletion 2 test/include/StreamMock.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#include <deque>

#include <Stream.h>
#include <api/Stream.h>

/**************************************************************************************
* CLASS DECLARATION
Expand Down
2 changes: 1 addition & 1 deletion 2 test/src/CanMsg/test_CanExtendedId.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <catch.hpp>

#include <CanMsg.h>
#include <api/CanMsg.h>

/**************************************************************************************
* NAMESPACE
Expand Down
2 changes: 1 addition & 1 deletion 2 test/src/CanMsg/test_CanMsg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <catch.hpp>

#include <CanMsg.h>
#include <api/CanMsg.h>

/**************************************************************************************
* NAMESPACE
Expand Down
2 changes: 1 addition & 1 deletion 2 test/src/CanMsg/test_CanMsg_CopyCtor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <catch.hpp>

#include <CanMsg.h>
#include <api/CanMsg.h>

/**************************************************************************************
* NAMESPACE
Expand Down
2 changes: 1 addition & 1 deletion 2 test/src/CanMsg/test_CanStandardId.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <catch.hpp>

#include <CanMsg.h>
#include <api/CanMsg.h>

/**************************************************************************************
* NAMESPACE
Expand Down
2 changes: 1 addition & 1 deletion 2 test/src/CanMsg/test_isExtendedId.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <catch.hpp>

#include <CanMsg.h>
#include <api/CanMsg.h>

/**************************************************************************************
* NAMESPACE
Expand Down
2 changes: 1 addition & 1 deletion 2 test/src/CanMsg/test_isStandardId.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <catch.hpp>

#include <CanMsg.h>
#include <api/CanMsg.h>

/**************************************************************************************
* NAMESPACE
Expand Down
2 changes: 1 addition & 1 deletion 2 test/src/CanMsg/test_operator_assignment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <catch.hpp>

#include <CanMsg.h>
#include <api/CanMsg.h>

/**************************************************************************************
* NAMESPACE
Expand Down
2 changes: 1 addition & 1 deletion 2 test/src/CanMsg/test_printTo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <catch.hpp>

#include <CanMsg.h>
#include <api/CanMsg.h>
#include <PrintMock.h>

/**************************************************************************************
Expand Down
2 changes: 1 addition & 1 deletion 2 test/src/CanMsgRingbuffer/test_available.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <catch.hpp>

#include <CanMsgRingbuffer.h>
#include <api/CanMsgRingbuffer.h>

/**************************************************************************************
* TEST CODE
Expand Down
2 changes: 1 addition & 1 deletion 2 test/src/Common/test_makeWord.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <catch.hpp>

#include <Common.h>
#include <api/Common.h>

/**************************************************************************************
* TEST CODE
Expand Down
2 changes: 1 addition & 1 deletion 2 test/src/Common/test_map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <catch.hpp>

#include <Common.h>
#include <api/Common.h>

/**************************************************************************************
* TEST CODE
Expand Down
6 changes: 3 additions & 3 deletions 6 test/src/Common/test_max.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <catch.hpp>

#include <Common.h>
#include <api/Common.h>

/**************************************************************************************
* TEST CODE
Expand Down Expand Up @@ -53,7 +53,7 @@ TEST_CASE ("Calling 'max(a,b)' with type(a) != type(b)", "[max-04]")
{
uint32_t const a = 32;
uint64_t const b = 10;
REQUIRE(typeid(max(a,b)) == typeid(unsigned long));
REQUIRE(typeid(max(a,b)) == typeid(uint64_t));
}
WHEN("type(A) = int8_t, type(b) = int16_t")
{
Expand All @@ -71,6 +71,6 @@ TEST_CASE ("Calling 'max(a,b)' with type(a) != type(b)", "[max-04]")
{
int32_t const a = -32;
int64_t const b = -10;
REQUIRE(typeid(max(a,b)) == typeid(long));
REQUIRE(typeid(max(a,b)) == typeid(int64_t));
}
}
6 changes: 3 additions & 3 deletions 6 test/src/Common/test_min.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <catch.hpp>

#include <Common.h>
#include <api/Common.h>

/**************************************************************************************
* TEST CODE
Expand Down Expand Up @@ -53,7 +53,7 @@ TEST_CASE ("Calling 'min(a,b)' with type(a) != type(b)", "[min-04]")
{
uint32_t const a = 32;
uint64_t const b = 10;
REQUIRE(typeid(min(a,b)) == typeid(unsigned long));
REQUIRE(typeid(min(a,b)) == typeid(uint64_t));
}
WHEN("type(A) = int8_t, type(b) = int16_t")
{
Expand All @@ -71,6 +71,6 @@ TEST_CASE ("Calling 'min(a,b)' with type(a) != type(b)", "[min-04]")
{
int32_t const a = -32;
int64_t const b = -10;
REQUIRE(typeid(min(a,b)) == typeid(long));
REQUIRE(typeid(min(a,b)) == typeid(int64_t));
}
}
2 changes: 1 addition & 1 deletion 2 test/src/IPAddress/test_IPAddress.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <catch.hpp>

#include <IPAddress.h>
#include <api/IPAddress.h>

/**************************************************************************************
* TEST CODE
Expand Down
2 changes: 1 addition & 1 deletion 2 test/src/IPAddress/test_IPAddress6.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <catch.hpp>

#include <IPAddress.h>
#include <api/IPAddress.h>

/**************************************************************************************
* TEST CODE
Expand Down
4 changes: 2 additions & 2 deletions 4 test/src/IPAddress/test_fromString.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

#include <catch.hpp>

#include <String.h>
#include <IPAddress.h>
#include <api/String.h>
#include <api/IPAddress.h>

/**************************************************************************************
* TEST CODE
Expand Down
4 changes: 2 additions & 2 deletions 4 test/src/IPAddress/test_fromString6.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

#include <catch.hpp>

#include <String.h>
#include <IPAddress.h>
#include <api/String.h>
#include <api/IPAddress.h>

/**************************************************************************************
* TEST CODE
Expand Down
2 changes: 1 addition & 1 deletion 2 test/src/IPAddress/test_operator_assignment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <catch.hpp>

#include <IPAddress.h>
#include <api/IPAddress.h>

/**************************************************************************************
* TEST CODE
Expand Down
2 changes: 1 addition & 1 deletion 2 test/src/IPAddress/test_operator_comparison.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <catch.hpp>

#include <IPAddress.h>
#include <api/IPAddress.h>

/**************************************************************************************
* TEST CODE
Expand Down
2 changes: 1 addition & 1 deletion 2 test/src/IPAddress/test_operator_comparison6.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <catch.hpp>

#include <IPAddress.h>
#include <api/IPAddress.h>

/**************************************************************************************
* TEST CODE
Expand Down
2 changes: 1 addition & 1 deletion 2 test/src/IPAddress/test_operator_parentheses.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <catch.hpp>

#include <IPAddress.h>
#include <api/IPAddress.h>

/**************************************************************************************
* TEST CODE
Expand Down
2 changes: 1 addition & 1 deletion 2 test/src/IPAddress/test_operator_parentheses6.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <catch.hpp>

#include <IPAddress.h>
#include <api/IPAddress.h>

/**************************************************************************************
* TEST CODE
Expand Down
2 changes: 1 addition & 1 deletion 2 test/src/IPAddress/test_printTo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <catch.hpp>

#include <IPAddress.h>
#include <api/IPAddress.h>
#include <PrintMock.h>

/**************************************************************************************
Expand Down
2 changes: 1 addition & 1 deletion 2 test/src/IPAddress/test_printTo6.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <catch.hpp>

#include <IPAddress.h>
#include <api/IPAddress.h>
#include <PrintMock.h>

/**************************************************************************************
Expand Down
4 changes: 2 additions & 2 deletions 4 test/src/IPAddress/test_toString.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

#include <catch.hpp>

#include <String.h>
#include <IPAddress.h>
#include <api/String.h>
#include <api/IPAddress.h>

/**************************************************************************************
* TEST CODE
Expand Down
2 changes: 1 addition & 1 deletion 2 test/src/Print/test_availableForWrite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <catch.hpp>

#include <Print.h>
#include <api/Print.h>

#include <PrintMock.h>

Expand Down
2 changes: 1 addition & 1 deletion 2 test/src/Print/test_clearWriteError.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <catch.hpp>

#include <Print.h>
#include <api/Print.h>

#include <PrintMock.h>

Expand Down
2 changes: 1 addition & 1 deletion 2 test/src/Print/test_getWriteError.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <catch.hpp>

#include <Print.h>
#include <api/Print.h>

#include <PrintMock.h>

Expand Down
2 changes: 1 addition & 1 deletion 2 test/src/Print/test_print.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <catch.hpp>

#include <Print.h>
#include <api/Print.h>

#include <PrintMock.h>
#include <PrintableMock.h>
Expand Down
2 changes: 1 addition & 1 deletion 2 test/src/Print/test_println.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <catch.hpp>

#include <Print.h>
#include <api/Print.h>

#include <PrintMock.h>
#include <PrintableMock.h>
Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.