Skip to content

Commit d45a326

Browse files
Merge pull request #11 from dolfandringa/feature/move_wstring_include_statements
Move #include statements from WString.cpp to WString.h
2 parents e5a2f99 + 33d3a8b commit d45a326

4 files changed

Lines changed: 23 additions & 2 deletions

File tree

src/arduino/WString.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020
*/
2121

2222
#include "WString.h"
23-
#include "pgmspace.h"
24-
#include "noniso.h"
2523

2624
/*********************************************/
2725
/* Constructors */

src/arduino/WString.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121

2222
#ifndef String_class_h
2323
#define String_class_h
24+
25+
#include "pgmspace.h"
26+
#include "noniso.h"
27+
2428
#ifdef __cplusplus
2529

2630

test/main.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ using namespace fakeit;
1111
#include "test_serial.h"
1212
#include "test_client.h"
1313
#include "test_arduino_string.h"
14+
#include "test_include.h"
1415

1516
#ifdef UNIT_TEST
1617

@@ -36,6 +37,7 @@ int main(int argc, char **argv)
3637
RUN_TEST_GROUP(StreamTest);
3738
RUN_TEST_GROUP(SerialTest);
3839
RUN_TEST_GROUP(ClientTest);
40+
RUN_TEST_GROUP(IncludeTest);
3941

4042
UNITY_END();
4143

test/test_include.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#ifdef UNIT_TEST
2+
3+
namespace IncludeTest
4+
{
5+
6+
void test_empty(void)
7+
{
8+
int PROGMEM a = 1;
9+
}
10+
11+
void run_tests(void)
12+
{
13+
RUN_TEST(IncludeTest::test_empty);
14+
}
15+
}
16+
17+
#endif

0 commit comments

Comments
 (0)