-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: split out _Bool/bool tests to C only
Split out the _Bool/bool tests and run them in C only. They're problematic in C++ because they depend on stdbool.h, and specifically on GCC version of it which defines _Bool bool for C++. This is problematic on Alpine Linux which uses musl, as well as on macOS. Annoyingly the anonymous struct names also change.
- Loading branch information
Showing
13 changed files
with
78 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#include <stdbool.h> | ||
|
||
/** | ||
* Retain bool instead of using _Bool. | ||
*/ | ||
static bool convert_bool; | ||
|
||
/** | ||
* Also convert _Bool to bool. | ||
*/ | ||
static _Bool convert_Bool; | ||
|
||
/** | ||
* Bool function. | ||
*/ | ||
bool boolean(bool bar, _Bool baz); | ||
|
||
/** | ||
* This is a sample struct | ||
* | ||
* Woohoo. | ||
*/ | ||
struct sample_struct { | ||
/** | ||
* bool member | ||
*/ | ||
bool bool_member; | ||
/** | ||
* _Bool member | ||
*/ | ||
_Bool _Bool_member; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
|
||
.. c:var:: static bool convert_bool | ||
Retain bool instead of using _Bool. | ||
|
||
|
||
.. c:var:: static bool convert_Bool | ||
Also convert _Bool to bool. | ||
|
||
|
||
.. c:function:: bool boolean(bool bar, bool baz) | ||
Bool function. | ||
.. c:struct:: sample_struct | ||
This is a sample struct | ||
Woohoo. | ||
.. c:member:: bool bool_member | ||
bool member | ||
.. c:member:: bool _Bool_member | ||
_Bool member | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
directives: | ||
- domain: c | ||
directive: autodoc | ||
arguments: | ||
- bool.c | ||
expected: bool.rst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters