forked from platformio/platformio-core
Refactored Unit Testing engine to resolve compiler warnings with "-Wpedantic" option // Resolve #4671
This commit is contained in:
@@ -20,6 +20,7 @@ PlatformIO Core 6
|
|||||||
|
|
||||||
* Enhanced the parsing of the |PIOCONF| to provide comprehensive diagnostic information
|
* Enhanced the parsing of the |PIOCONF| to provide comprehensive diagnostic information
|
||||||
* Optimized project integration templates to address the issue of long paths on Windows (`issue #4652 <https://github.com/platformio/platformio-core/issues/4652>`_)
|
* Optimized project integration templates to address the issue of long paths on Windows (`issue #4652 <https://github.com/platformio/platformio-core/issues/4652>`_)
|
||||||
|
* Refactored |UNITTESTING| engine to resolve compiler warnings with "-Wpedantic" option (`pull #4671 <https://github.com/platformio/platformio-core/pull/4671>`_)
|
||||||
|
|
||||||
6.1.7 (2023-05-08)
|
6.1.7 (2023-05-08)
|
||||||
~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~
|
||||||
|
@@ -55,8 +55,8 @@ extern "C"
|
|||||||
|
|
||||||
void unityOutputStart(unsigned long);
|
void unityOutputStart(unsigned long);
|
||||||
void unityOutputChar(unsigned int);
|
void unityOutputChar(unsigned int);
|
||||||
void unityOutputFlush();
|
void unityOutputFlush(void);
|
||||||
void unityOutputComplete();
|
void unityOutputComplete(void);
|
||||||
|
|
||||||
#define UNITY_OUTPUT_START() unityOutputStart((unsigned long) $baudrate)
|
#define UNITY_OUTPUT_START() unityOutputStart((unsigned long) $baudrate)
|
||||||
#define UNITY_OUTPUT_CHAR(c) unityOutputChar(c)
|
#define UNITY_OUTPUT_CHAR(c) unityOutputChar(c)
|
||||||
@@ -246,18 +246,20 @@ void unityOutputComplete(void) { unittest_uart_end(); }
|
|||||||
unity_h = dst_dir / "unity_config.h"
|
unity_h = dst_dir / "unity_config.h"
|
||||||
if not unity_h.is_file():
|
if not unity_h.is_file():
|
||||||
unity_h.write_text(
|
unity_h.write_text(
|
||||||
string.Template(self.UNITY_CONFIG_H).substitute(
|
string.Template(self.UNITY_CONFIG_H)
|
||||||
baudrate=self.get_test_speed()
|
.substitute(baudrate=self.get_test_speed())
|
||||||
),
|
.strip()
|
||||||
|
+ "\n",
|
||||||
encoding="utf8",
|
encoding="utf8",
|
||||||
)
|
)
|
||||||
framework_config = self.get_unity_framework_config()
|
framework_config = self.get_unity_framework_config()
|
||||||
unity_c = dst_dir / ("unity_config.%s" % framework_config.get("language", "c"))
|
unity_c = dst_dir / ("unity_config.%s" % framework_config.get("language", "c"))
|
||||||
if not unity_c.is_file():
|
if not unity_c.is_file():
|
||||||
unity_c.write_text(
|
unity_c.write_text(
|
||||||
string.Template(self.UNITY_CONFIG_C).substitute(
|
string.Template(self.UNITY_CONFIG_C)
|
||||||
framework_config_code=framework_config["code"]
|
.substitute(framework_config_code=framework_config["code"])
|
||||||
),
|
.strip()
|
||||||
|
+ "\n",
|
||||||
encoding="utf8",
|
encoding="utf8",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user