Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Allow tests to run on systems with case-insensitive filesystems and newer compilers.#208

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
aentinger merged 4 commits intoarduino:masterfromjboynes:native_tests
Sep 8, 2023
Merged
Show file tree
Hide file tree
Changes fromall 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 deletionsapi/IPAddress.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff 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 deletionsapi/deprecated-avr-comp/avr/dtostrf.c.impl
View file
Open in desktop
Original file line numberDiff line numberDiff 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 deletiontest/CMakeLists.txt
View file
Open in desktop
Original file line numberDiff line numberDiff 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 deletiontest/include/MillisFake.h
View file
Open in desktop
Original file line numberDiff line numberDiff 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 deletiontest/include/PrintMock.h
View file
Open in desktop
Original file line numberDiff line numberDiff 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 deletiontest/include/PrintableMock.h
View file
Open in desktop
Original file line numberDiff line numberDiff 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 deletiontest/include/StreamMock.h
View file
Open in desktop
Original file line numberDiff line numberDiff 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 deletiontest/src/CanMsg/test_CanExtendedId.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff 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 deletiontest/src/CanMsg/test_CanMsg.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff 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 deletiontest/src/CanMsg/test_CanMsg_CopyCtor.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff 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 deletiontest/src/CanMsg/test_CanStandardId.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff 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 deletiontest/src/CanMsg/test_isExtendedId.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff 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 deletiontest/src/CanMsg/test_isStandardId.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff 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 deletiontest/src/CanMsg/test_operator_assignment.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff 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 deletiontest/src/CanMsg/test_printTo.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff 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 deletiontest/src/CanMsgRingbuffer/test_available.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff 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 deletiontest/src/Common/test_makeWord.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff 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 deletiontest/src/Common/test_map.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff 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 deletionstest/src/Common/test_max.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,7 +8,7 @@

#include <catch.hpp>

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

/**************************************************************************************
* TEST CODE
Expand DownExpand 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 deletionstest/src/Common/test_min.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,7 +8,7 @@

#include <catch.hpp>

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

/**************************************************************************************
* TEST CODE
Expand DownExpand 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 deletiontest/src/IPAddress/test_IPAddress.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff 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 deletiontest/src/IPAddress/test_IPAddress6.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff 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 deletionstest/src/IPAddress/test_fromString.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff 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 deletionstest/src/IPAddress/test_fromString6.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff 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 deletiontest/src/IPAddress/test_operator_assignment.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff 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 deletiontest/src/IPAddress/test_operator_comparison.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff 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 deletiontest/src/IPAddress/test_operator_comparison6.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff 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 deletiontest/src/IPAddress/test_operator_parentheses.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff 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 deletiontest/src/IPAddress/test_operator_parentheses6.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff 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 deletiontest/src/IPAddress/test_printTo.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff 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 deletiontest/src/IPAddress/test_printTo6.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff 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 deletionstest/src/IPAddress/test_toString.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff 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 deletiontest/src/Print/test_availableForWrite.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff 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 deletiontest/src/Print/test_clearWriteError.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff 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 deletiontest/src/Print/test_getWriteError.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff 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 deletiontest/src/Print/test_print.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff 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 deletiontest/src/Print/test_println.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff 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

[8]ページ先頭

©2009-2025 Movatter.jp