mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-06 15:00:17 +02:00
FEXLinuxTests: Migrate FD test to Catch2
This commit is contained in:
1 parent
6610bb355c
commit
16be2792ab
1 file changed
+4
-3
@@ -1,7 +1,9 @@
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
#include <cstdint>
|
||||
#include <unistd.h>
|
||||
|
||||
int main() {
|
||||
TEST_CASE("Close Range") {
|
||||
int fd_base = dup(STDOUT_FILENO);
|
||||
for (size_t i = 0; i < 15; ++i) {
|
||||
dup(fd_base);
|
||||
@@ -12,6 +14,5 @@ int main() {
|
||||
::syscall(SYS_close_range, fd_base + 1, ~0U, 0);
|
||||
|
||||
// Ensure that fd_base itself wasn't closed in close_range
|
||||
int Result = close(fd_base);
|
||||
return Result;
|
||||
CHECK(close(fd_base) == 0);
|
||||
}
|
||||
Reference in new issue
Block a user