Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lihuiba committed Apr 19, 2024
1 parent 42e7920 commit 36b9ff4
Show file tree
Hide file tree
Showing 26 changed files with 37 additions and 25 deletions.
2 changes: 1 addition & 1 deletion common/checksum/test/test_checksum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <iostream>
#include <sstream>
#include <string>
#include "../../test/gtest.h"
#include "../../../test/gtest.h"

#ifndef DATA_DIR
#define DATA_DIR ""
Expand Down
2 changes: 1 addition & 1 deletion common/executor/test/test_async.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ limitations under the License.
#include <immintrin.h>
#include <chrono>
#include <thread>
#include "../../test/gtest.h"
#include "../../../test/gtest.h"

using namespace photon;

Expand Down
2 changes: 1 addition & 1 deletion common/executor/test/test_easyexport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ limitations under the License.
#include <photon/thread/thread.h>
#include <photon/common/executor/executor.h>
#include <photon/common/executor/easyawaiter.h>
#include "../../test/gtest.h"
#include "../../../test/gtest.h"

using namespace photon;

Expand Down
2 changes: 1 addition & 1 deletion common/executor/test/test_std.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ limitations under the License.
#include <photon/fs/localfs.h>
#include <photon/common/utility.h>
#include <photon/common/executor/executor.h>
#include "../../test/gtest.h"
#include "../../../test/gtest.h"

using namespace photon;

Expand Down
2 changes: 1 addition & 1 deletion common/memory-stream/test/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ limitations under the License.
#include <photon/common/utility.h>
#include <photon/common/alog.h>
#include <photon/common/alog-stdstring.h>
#include "../../test/gtest.h"
#include "../../../test/gtest.h"

using namespace std;
using namespace photon;
Expand Down
2 changes: 1 addition & 1 deletion common/stream-messenger/test/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ limitations under the License.
#include <photon/common/memory-stream/memory-stream.h>
#include <photon/common/utility.h>
#include <photon/common/alog.h>
#include "../../test/gtest.h"
#include "../../../test/gtest.h"
using namespace std;
using namespace photon;
using namespace StreamMessenger;
Expand Down
2 changes: 1 addition & 1 deletion fs/extfs/test/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ limitations under the License.
#include <photon/common/alog.h>
#include <photon/common/alog-stdstring.h>
#include <photon/common/enumerable.h>
#include "../../test/gtest.h"
#include "../../../test/gtest.h"

#define FILE_SIZE (2 * 1024 * 1024)

Expand Down
2 changes: 1 addition & 1 deletion net/http/test/client_function_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ limitations under the License.
#include <photon/thread/thread11.h>
#include <photon/common/stream.h>
#include <photon/fs/localfs.h>
#include "../../test/gtest.h"
#include "../../../test/gtest.h"
#include "to_url.h"

using namespace photon::net;
Expand Down
2 changes: 1 addition & 1 deletion net/http/test/client_tls_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ limitations under the License.
*/

#include <openssl/ssl.h>
#include <gtest/gtest.h>

#include <photon/photon.h>
#include <photon/common/alog.h>
Expand All @@ -26,6 +25,7 @@ limitations under the License.
#include <photon/net/http/message.h>
#include <photon/net/http/server.h>
#include <photon/net/http/client.h>
#include "../../../test/gtest.h"
#include "to_url.h"

#include "../../test/cert-key.cpp"
Expand Down
2 changes: 1 addition & 1 deletion net/http/test/cookie_jar_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ limitations under the License.
#undef private

#include <fcntl.h>
#include <gtest/gtest.h>
#include <time.h>

#include <chrono>
Expand All @@ -34,6 +33,7 @@ limitations under the License.
#include <iostream>
#include <photon/common/alog.h>
#include <photon/common/alog-stdstring.h>
#include "../../../test/gtest.h"

using namespace photon;
using namespace photon::net;
Expand Down
2 changes: 1 addition & 1 deletion net/http/test/headers_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ limitations under the License.
#undef private

#include <fcntl.h>
#include <gtest/gtest.h>
#include "../../../test/gtest.h"

#include <chrono>
#include <cstddef>
Expand Down
2 changes: 1 addition & 1 deletion net/http/test/server_function_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ limitations under the License.
#include <photon/thread/thread11.h>
#include <photon/common/alog-stdstring.h>
#include <photon/fs/localfs.h>
#include "../../test/gtest.h"
#include "../../../test/gtest.h"
#include "../server.h"
#include "to_url.h"

Expand Down
2 changes: 1 addition & 1 deletion net/security-context/test/test-sasl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

#include <gtest/gtest.h>
#include "../../../test/gtest.h"

#include <photon/common/alog-stdstring.h>
#include <photon/net/socket.h>
Expand Down
2 changes: 1 addition & 1 deletion net/security-context/test/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

#include <gtest/gtest.h>
#include "../../../test/gtest.h"

#include <photon/net/socket.h>
#include <photon/io/fd-events.h>
Expand Down
2 changes: 1 addition & 1 deletion net/test/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ void tcp_client() {
LOG_DEBUG(VALUE(sock), VALUE(errno));
EndPoint epget = sock->getpeername();
LOG_DEBUG("Connected `", epget);
EXPECT_TRUE(ep.port = epget.port);
EXPECT_EQ(ep.port, epget.port);
char buff[] = "Hello";
char recv[256];
sock->send("Hello", 5);
Expand Down
4 changes: 3 additions & 1 deletion rpc/test/test-ooo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@ limitations under the License.
#include <queue>
#include <thread>
#include <algorithm>
#include "../../test/gtest.h"
#include <gflags/gflags.h>
#include <photon/common/alog.h>
#define private public
#define protected public
#include "../out-of-order-execution.cpp"
#include "../../thread/thread.cpp"
#include <photon/thread/thread11.h>
#include "../../tools/gtest.h"

using namespace std;
using namespace photon;
Expand Down
2 changes: 1 addition & 1 deletion rpc/test/test-rpc-message.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ limitations under the License.
#include <photon/common/utility.h>
#include <photon/common/alog.h>
#include <photon/net/socket.h>
#include "../../tools/gtest.h"
#include "../../test/gtest.h"


struct map_value : photon::rpc::Message {
Expand Down
10 changes: 10 additions & 0 deletions test/gtest.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#pragma once

#pragma GCC diagnostic push
#ifdef __clang__
#pragma GCC diagnostic ignored "-sign-compare"
#endif
#include <gtest/gtest.h>
#include <gtest/gtest-spi.h>
#pragma GCC diagnostic pop

2 changes: 1 addition & 1 deletion thread/test/perf_usleepdefer_semaphore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
#include "../thread.h"
#include "../thread11.h"
#include <photon/io/fd-events.h>
#include <gtest/gtest.h>
#include "../../test/gtest.h"
#include <thread>
#include <photon/common/metric-meter/metrics.h>
#include <photon/common/alog.h>
Expand Down
2 changes: 1 addition & 1 deletion thread/test/test-lib-data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

#include <gtest/gtest.h>
#include "../../test/gtest.h"
#include <libgen.h>
#include <photon/common/utility.h>
#include <photon/photon.h>
Expand Down
2 changes: 1 addition & 1 deletion thread/test/test-multi-vcpu-locking.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
#include <atomic>
#include <chrono>
#include <vector>
#include <gtest/gtest.h>
#include "../../test/gtest.h"
#include <photon/photon.h>
#include <photon/thread/std-compat.h>
#include <photon/common/alog.h>
Expand Down
2 changes: 1 addition & 1 deletion thread/test/test-pooled-stack-allocator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

#include <gtest/gtest.h>
#include "../../test/gtest.h"
#include <photon/common/alog.h>
#include <photon/photon.h>
#include <photon/thread/stack-allocator.h>
Expand Down
2 changes: 1 addition & 1 deletion thread/test/test-specific-key.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

#include <gtest/gtest.h>
#include "../../test/gtest.h"

#include <photon/thread/thread11.h>
#include <photon/thread/thread-key.h>
Expand Down
2 changes: 1 addition & 1 deletion thread/test/test-std-compat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

#include <gtest/gtest.h>
#include "../../test/gtest.h"

#include <numeric>
#include <photon/thread/workerpool.h>
Expand Down
2 changes: 1 addition & 1 deletion thread/test/test-thread-local.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

#include <gtest/gtest.h>
#include "../../test/gtest.h"

#include <photon/thread/thread11.h>
#include <photon/thread/thread-local.h>
Expand Down
2 changes: 1 addition & 1 deletion thread/test/test-tls-order-photon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

#include <gtest/gtest.h>
#include "../../test/gtest.h"
#include <photon/thread/std-compat.h>
#include <photon/common/alog.h>

Expand Down

0 comments on commit 36b9ff4

Please sign in to comment.