Skip to content

Commit 66aa7db

Browse files
authored
Merge pull request #208 from jboynes/native_tests
Allow tests to run on systems with case-insensitive filesystems and newer compilers.
2 parents f77c4b5 + da415e6 commit 66aa7db

File tree

76 files changed

+110
-82
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+110
-82
lines changed

Diff for: api/IPAddress.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -96,20 +96,26 @@ IPAddress::IPAddress(const char *address)
9696

9797
String IPAddress::toString4() const
9898
{
99+
#pragma GCC diagnostic push
100+
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
99101
char szRet[16];
100102
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]);
101103
return String(szRet);
104+
#pragma GCC diagnostic pop
102105
}
103106

104107
String IPAddress::toString6() const
105108
{
109+
#pragma GCC diagnostic push
110+
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
106111
char szRet[40];
107112
sprintf(szRet,"%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x",
108113
_address.bytes[0], _address.bytes[1], _address.bytes[2], _address.bytes[3],
109114
_address.bytes[4], _address.bytes[5], _address.bytes[6], _address.bytes[7],
110115
_address.bytes[8], _address.bytes[9], _address.bytes[10], _address.bytes[11],
111116
_address.bytes[12], _address.bytes[13], _address.bytes[14], _address.bytes[15]);
112117
return String(szRet);
118+
#pragma GCC diagnostic pop
113119
}
114120

115121
String IPAddress::toString() const

Diff for: api/deprecated-avr-comp/avr/dtostrf.c.impl

+3
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,12 @@
2929
char *dtostrf (double val, signed char width, unsigned char prec, char *sout) {
3030
asm(".global _printf_float");
3131

32+
#pragma GCC diagnostic push
33+
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3234
char fmt[20];
3335
sprintf(fmt, "%%%d.%df", width, prec);
3436
sprintf(sout, fmt, val);
3537
return sout;
38+
#pragma GCC diagnostic pop
3639
}
3740

Diff for: test/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ project(test-ArduinoCore-API)
88

99
##########################################################################
1010

11-
include_directories(../api)
11+
include_directories(..)
1212
include_directories(include)
1313
include_directories(external/catch/v2.13.9/include)
1414

Diff for: test/include/MillisFake.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* INCLUDE
1010
**************************************************************************************/
1111

12-
#include <Common.h>
12+
#include <api/Common.h>
1313

1414
/**************************************************************************************
1515
* FUNCTION DECLARATION

Diff for: test/include/PrintMock.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
#include <string>
1313

14-
#include <Print.h>
14+
#include <api/Print.h>
1515

1616
/**************************************************************************************
1717
* CLASS DECLARATION

Diff for: test/include/PrintableMock.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
#include <string>
1313

14-
#include <Printable.h>
14+
#include <api/Printable.h>
1515

1616
/**************************************************************************************
1717
* CLASS DECLARATION

Diff for: test/include/StreamMock.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
#include <deque>
1313

14-
#include <Stream.h>
14+
#include <api/Stream.h>
1515

1616
/**************************************************************************************
1717
* CLASS DECLARATION

Diff for: test/src/CanMsg/test_CanExtendedId.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include <catch.hpp>
1010

11-
#include <CanMsg.h>
11+
#include <api/CanMsg.h>
1212

1313
/**************************************************************************************
1414
* NAMESPACE

Diff for: test/src/CanMsg/test_CanMsg.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include <catch.hpp>
1010

11-
#include <CanMsg.h>
11+
#include <api/CanMsg.h>
1212

1313
/**************************************************************************************
1414
* NAMESPACE

Diff for: test/src/CanMsg/test_CanMsg_CopyCtor.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include <catch.hpp>
1010

11-
#include <CanMsg.h>
11+
#include <api/CanMsg.h>
1212

1313
/**************************************************************************************
1414
* NAMESPACE

Diff for: test/src/CanMsg/test_CanStandardId.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include <catch.hpp>
1010

11-
#include <CanMsg.h>
11+
#include <api/CanMsg.h>
1212

1313
/**************************************************************************************
1414
* NAMESPACE

Diff for: test/src/CanMsg/test_isExtendedId.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include <catch.hpp>
1010

11-
#include <CanMsg.h>
11+
#include <api/CanMsg.h>
1212

1313
/**************************************************************************************
1414
* NAMESPACE

Diff for: test/src/CanMsg/test_isStandardId.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include <catch.hpp>
1010

11-
#include <CanMsg.h>
11+
#include <api/CanMsg.h>
1212

1313
/**************************************************************************************
1414
* NAMESPACE

Diff for: test/src/CanMsg/test_operator_assignment.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include <catch.hpp>
1010

11-
#include <CanMsg.h>
11+
#include <api/CanMsg.h>
1212

1313
/**************************************************************************************
1414
* NAMESPACE

Diff for: test/src/CanMsg/test_printTo.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include <catch.hpp>
1010

11-
#include <CanMsg.h>
11+
#include <api/CanMsg.h>
1212
#include <PrintMock.h>
1313

1414
/**************************************************************************************

Diff for: test/src/CanMsgRingbuffer/test_available.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include <catch.hpp>
1010

11-
#include <CanMsgRingbuffer.h>
11+
#include <api/CanMsgRingbuffer.h>
1212

1313
/**************************************************************************************
1414
* TEST CODE

Diff for: test/src/Common/test_makeWord.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include <catch.hpp>
1010

11-
#include <Common.h>
11+
#include <api/Common.h>
1212

1313
/**************************************************************************************
1414
* TEST CODE

Diff for: test/src/Common/test_map.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include <catch.hpp>
1010

11-
#include <Common.h>
11+
#include <api/Common.h>
1212

1313
/**************************************************************************************
1414
* TEST CODE

Diff for: test/src/Common/test_max.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include <catch.hpp>
1010

11-
#include <Common.h>
11+
#include <api/Common.h>
1212

1313
/**************************************************************************************
1414
* TEST CODE
@@ -53,7 +53,7 @@ TEST_CASE ("Calling 'max(a,b)' with type(a) != type(b)", "[max-04]")
5353
{
5454
uint32_t const a = 32;
5555
uint64_t const b = 10;
56-
REQUIRE(typeid(max(a,b)) == typeid(unsigned long));
56+
REQUIRE(typeid(max(a,b)) == typeid(uint64_t));
5757
}
5858
WHEN("type(A) = int8_t, type(b) = int16_t")
5959
{
@@ -71,6 +71,6 @@ TEST_CASE ("Calling 'max(a,b)' with type(a) != type(b)", "[max-04]")
7171
{
7272
int32_t const a = -32;
7373
int64_t const b = -10;
74-
REQUIRE(typeid(max(a,b)) == typeid(long));
74+
REQUIRE(typeid(max(a,b)) == typeid(int64_t));
7575
}
7676
}

Diff for: test/src/Common/test_min.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include <catch.hpp>
1010

11-
#include <Common.h>
11+
#include <api/Common.h>
1212

1313
/**************************************************************************************
1414
* TEST CODE
@@ -53,7 +53,7 @@ TEST_CASE ("Calling 'min(a,b)' with type(a) != type(b)", "[min-04]")
5353
{
5454
uint32_t const a = 32;
5555
uint64_t const b = 10;
56-
REQUIRE(typeid(min(a,b)) == typeid(unsigned long));
56+
REQUIRE(typeid(min(a,b)) == typeid(uint64_t));
5757
}
5858
WHEN("type(A) = int8_t, type(b) = int16_t")
5959
{
@@ -71,6 +71,6 @@ TEST_CASE ("Calling 'min(a,b)' with type(a) != type(b)", "[min-04]")
7171
{
7272
int32_t const a = -32;
7373
int64_t const b = -10;
74-
REQUIRE(typeid(min(a,b)) == typeid(long));
74+
REQUIRE(typeid(min(a,b)) == typeid(int64_t));
7575
}
7676
}

Diff for: test/src/IPAddress/test_IPAddress.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include <catch.hpp>
1010

11-
#include <IPAddress.h>
11+
#include <api/IPAddress.h>
1212

1313
/**************************************************************************************
1414
* TEST CODE

Diff for: test/src/IPAddress/test_IPAddress6.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include <catch.hpp>
1010

11-
#include <IPAddress.h>
11+
#include <api/IPAddress.h>
1212

1313
/**************************************************************************************
1414
* TEST CODE

Diff for: test/src/IPAddress/test_fromString.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
#include <catch.hpp>
1010

11-
#include <String.h>
12-
#include <IPAddress.h>
11+
#include <api/String.h>
12+
#include <api/IPAddress.h>
1313

1414
/**************************************************************************************
1515
* TEST CODE

Diff for: test/src/IPAddress/test_fromString6.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
#include <catch.hpp>
1010

11-
#include <String.h>
12-
#include <IPAddress.h>
11+
#include <api/String.h>
12+
#include <api/IPAddress.h>
1313

1414
/**************************************************************************************
1515
* TEST CODE

Diff for: test/src/IPAddress/test_operator_assignment.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include <catch.hpp>
1010

11-
#include <IPAddress.h>
11+
#include <api/IPAddress.h>
1212

1313
/**************************************************************************************
1414
* TEST CODE

Diff for: test/src/IPAddress/test_operator_comparison.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include <catch.hpp>
1010

11-
#include <IPAddress.h>
11+
#include <api/IPAddress.h>
1212

1313
/**************************************************************************************
1414
* TEST CODE

Diff for: test/src/IPAddress/test_operator_comparison6.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include <catch.hpp>
1010

11-
#include <IPAddress.h>
11+
#include <api/IPAddress.h>
1212

1313
/**************************************************************************************
1414
* TEST CODE

Diff for: test/src/IPAddress/test_operator_parentheses.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include <catch.hpp>
1010

11-
#include <IPAddress.h>
11+
#include <api/IPAddress.h>
1212

1313
/**************************************************************************************
1414
* TEST CODE

Diff for: test/src/IPAddress/test_operator_parentheses6.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include <catch.hpp>
1010

11-
#include <IPAddress.h>
11+
#include <api/IPAddress.h>
1212

1313
/**************************************************************************************
1414
* TEST CODE

Diff for: test/src/IPAddress/test_printTo.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include <catch.hpp>
1010

11-
#include <IPAddress.h>
11+
#include <api/IPAddress.h>
1212
#include <PrintMock.h>
1313

1414
/**************************************************************************************

Diff for: test/src/IPAddress/test_printTo6.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include <catch.hpp>
1010

11-
#include <IPAddress.h>
11+
#include <api/IPAddress.h>
1212
#include <PrintMock.h>
1313

1414
/**************************************************************************************

Diff for: test/src/IPAddress/test_toString.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
#include <catch.hpp>
1010

11-
#include <String.h>
12-
#include <IPAddress.h>
11+
#include <api/String.h>
12+
#include <api/IPAddress.h>
1313

1414
/**************************************************************************************
1515
* TEST CODE

Diff for: test/src/Print/test_availableForWrite.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include <catch.hpp>
1010

11-
#include <Print.h>
11+
#include <api/Print.h>
1212

1313
#include <PrintMock.h>
1414

Diff for: test/src/Print/test_clearWriteError.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include <catch.hpp>
1010

11-
#include <Print.h>
11+
#include <api/Print.h>
1212

1313
#include <PrintMock.h>
1414

Diff for: test/src/Print/test_getWriteError.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include <catch.hpp>
1010

11-
#include <Print.h>
11+
#include <api/Print.h>
1212

1313
#include <PrintMock.h>
1414

Diff for: test/src/Print/test_print.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include <catch.hpp>
1010

11-
#include <Print.h>
11+
#include <api/Print.h>
1212

1313
#include <PrintMock.h>
1414
#include <PrintableMock.h>

Diff for: test/src/Print/test_println.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include <catch.hpp>
1010

11-
#include <Print.h>
11+
#include <api/Print.h>
1212

1313
#include <PrintMock.h>
1414
#include <PrintableMock.h>

0 commit comments

Comments
 (0)