-
Notifications
You must be signed in to change notification settings - Fork 7
feat(wrapped_facade_headers): Expand sys/types.h
facade to cover all Linux Glibc typedefs that are also present in macOS.
#53
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
6300c50
Add ssize_t
Bill-hbrhbr 0d2ea1c
Change inlcude header
Bill-hbrhbr c06ece1
Redo syys types
Bill-hbrhbr 96c2ca8
Update src/ystdlib/wrapped_facade_headers/sys/types.h
Bill-hbrhbr 879b9f6
Fix fsid_t
Bill-hbrhbr 74a01a0
Add more types
Bill-hbrhbr 5334aee
Fix wrong include
Bill-hbrhbr a1819ff
Silence warning
Bill-hbrhbr a911d54
Fix comment
Bill-hbrhbr 3555c5b
Add time types
Bill-hbrhbr 2ff2d3a
Add missing exports
Bill-hbrhbr 920ef53
Make clearer distinctions between OS includes
Bill-hbrhbr 0919e3a
move clockid_t enums to facade header
Bill-hbrhbr a0202f2
Differentiate macos versions
Bill-hbrhbr 3265dbe
Add all machines to lint checks
Bill-hbrhbr 709f31b
Revert 1 commit
Bill-hbrhbr c5f8852
Remove clockid_t
Bill-hbrhbr 913e008
Add useconds type
Bill-hbrhbr 6e3b786
Remove time related types due to ctime resolving everything
Bill-hbrhbr ce384be
Add uints
Bill-hbrhbr e9ea397
Add remaining types
Bill-hbrhbr aea5fe8
Merge branch 'main' into add-ssize_t-header
Bill-hbrhbr 2cca40c
Remove NOLINT
Bill-hbrhbr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
---|---|---|
|
@@ -4,5 +4,5 @@ cpp_library( | |
PUBLIC_HEADERS | ||
sys/types.h | ||
TESTS_SOURCES | ||
test/test_off_t.cpp | ||
test/test_sys_types.cpp | ||
) |
This file contains hidden or 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 was deleted.
Oops, something went wrong.
48 changes: 48 additions & 0 deletions
48
src/ystdlib/wrapped_facade_headers/test/test_sys_types.cpp
This file contains hidden or 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,48 @@ | ||
#include <ystdlib/wrapped_facade_headers/sys/types.h> | ||
|
||
#include <catch2/catch_test_macros.hpp> | ||
|
||
namespace ystdlib::wrapped_facade_headers::test { | ||
TEST_CASE("test_sys_types_u_char", "[wrapped_facade_headers][sys_types][u_char]") { | ||
u_char const i{0}; | ||
REQUIRE(0 == i); | ||
} | ||
|
||
TEST_CASE("test_sys_types_u_short", "[wrapped_facade_headers][sys_types][u_short]") { | ||
u_short const i{0}; | ||
REQUIRE(0 == i); | ||
} | ||
|
||
TEST_CASE("test_sys_types_u_int", "[wrapped_facade_headers][sys_types][u_int]") { | ||
u_int const i{0}; | ||
REQUIRE(0 == i); | ||
} | ||
|
||
TEST_CASE("test_sys_types_u_long", "[wrapped_facade_headers][sys_types][u_long]") { | ||
u_long const i{0}; | ||
REQUIRE(0 == i); | ||
} | ||
|
||
TEST_CASE("test_sys_types_quad_t", "[wrapped_facade_headers][sys_types][quad_t]") { | ||
quad_t const i{0}; | ||
REQUIRE(0 == i); | ||
} | ||
|
||
TEST_CASE("test_sys_types_u_quad_t", "[wrapped_facade_headers][sys_types][u_quad_t]") { | ||
u_quad_t const i{0}; | ||
REQUIRE(0 == i); | ||
} | ||
|
||
TEST_CASE("test_sys_types_fsid_t", "[wrapped_facade_headers][sys_types][fsid_t]") { | ||
fsid_t const i{{0, 0}}; | ||
REQUIRE(0 == i.__val[0]); | ||
REQUIRE(0 == i.__val[1]); | ||
} | ||
|
||
#if defined(__linux__) | ||
TEST_CASE("test_sys_types_loff_t", "[wrapped_facade_headers][sys_types][loff_t]") { | ||
loff_t const i{0}; | ||
REQUIRE(0 == i); | ||
} | ||
#endif | ||
} // namespace ystdlib::wrapped_facade_headers::test |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.