added (maybe) missed header
This commit is contained in:
parent
7c854c8c3e
commit
2838f6e239
@ -1,9 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <ciso646>
|
||||
#endif
|
||||
|
||||
#include <new>
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
@ -12,6 +8,10 @@
|
||||
#include <uv.h>
|
||||
#include "emitter.hpp"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <ciso646>
|
||||
#endif
|
||||
|
||||
|
||||
namespace uvw {
|
||||
|
||||
|
||||
@ -1,6 +1,10 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include <uvw.hpp>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
|
||||
|
||||
TEST(FileReq, OpenAndClose) {
|
||||
const std::string filename = std::string{TARGET_FS_DIR} + std::string{"/test.fs"};
|
||||
@ -22,13 +26,11 @@ TEST(FileReq, OpenAndClose) {
|
||||
});
|
||||
|
||||
#ifdef _WIN32
|
||||
auto flags = _O_RDWR | _O_CREAT;
|
||||
request->open(filename, _O_RDWR | _O_CREAT, 0644);
|
||||
#else
|
||||
auto flags = O_RDWR | O_CREAT;
|
||||
request->open(filename, O_RDWR | O_CREAT, 0644);
|
||||
#endif
|
||||
|
||||
request->open(filename, flags, 0644);
|
||||
|
||||
loop->run();
|
||||
|
||||
ASSERT_FALSE(checkErrorEvent);
|
||||
@ -43,12 +45,11 @@ TEST(FileReq, OpenAndCloseSync) {
|
||||
auto request = loop->resource<uvw::FileReq>();
|
||||
|
||||
#ifdef _WIN32
|
||||
auto flags = _O_RDWR | _O_CREAT;
|
||||
ASSERT_TRUE(request->openSync(filename, _O_RDWR | _O_CREAT, 0644));
|
||||
#else
|
||||
auto flags = O_RDWR | O_CREAT;
|
||||
ASSERT_TRUE(request->openSync(filename, O_RDWR | O_CREAT, 0644));
|
||||
#endif
|
||||
|
||||
ASSERT_TRUE(request->openSync(filename, flags, 0644));
|
||||
ASSERT_TRUE(request->closeSync());
|
||||
|
||||
loop->run();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user