Skip to content
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

THRIFT-5776: Cpp cross test fail test #2968

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/c_glib/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ add_custom_command(OUTPUT
gen-cpp/ThriftTest.h
gen-cpp/ThriftTest_constants.h
gen-cpp/ThriftTest_types.h
COMMAND ${THRIFT_COMPILER} --gen cpp ${PROJECT_SOURCE_DIR}/test/v0.16/ThriftTest.thrift
COMMAND ${THRIFT_COMPILER} --gen cpp ${PROJECT_SOURCE_DIR}/test/ThriftTest.thrift
)

# TODO: Add memory checks using ctest_memcheck or similar
2 changes: 1 addition & 1 deletion lib/c_glib/test/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ gen-c_glib/t_test_optional_required_test_types.c gen-c_glib/t_test_optional_requ
gen-c_glib/t_test_second_service.c gen-c_glib/t_test_thrift_test.c gen-c_glib/t_test_thrift_test_types.c gen-c_glib/t_test_second_service.h gen-c_glib/t_test_thrift_test.h gen-c_glib/t_test_thrift_test_types.h: ../../../test/v0.16/ThriftTest.thrift $(THRIFT)
$(THRIFT) --gen c_glib $<

gen-cpp/ThriftTest.cpp gen-cpp/ThriftTest_constants.cpp gen-cpp/ThriftTest_types.cpp: ../../../test/v0.16/ThriftTest.thrift $(THRIFT)
gen-cpp/ThriftTest.cpp gen-cpp/ThriftTest_constants.cpp gen-cpp/ThriftTest_types.cpp: ../../../test/ThriftTest.thrift $(THRIFT)
$(THRIFT) --gen cpp $<

TESTS = \
Expand Down
5 changes: 5 additions & 0 deletions lib/c_glib/test/testthrifttestclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ class TestHandler : public ThriftTestIf {
out = thing;
}

std::string testUuid(const std::string thing) override {
cout << "[C -> C++] testUuid(\"" << std::hex << thing << "\")" << '\n';
return thing;
}

void testStruct(Xtruct& out, const Xtruct &thing) override {
cout << "[C -> C++] testStruct({\"" << thing.string_thing << "\", " << (int)thing.byte_thing << ", " << thing.i32_thing << ", " << thing.i64_thing << "})" << '\n';
out = thing;
Expand Down
8 changes: 7 additions & 1 deletion lib/c_glib/test/testthrifttestzlibclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,11 @@ class TestHandler : public ThriftTestIf {
out = thing;
}

std::string testUuid(const std::string thing) override {
cout << "[C -> C++] testUuid(\"" << std::hex << thing << "\")" << '\n';
return thing;
}

void testStruct(Xtruct& out, const Xtruct &thing) override {
cout << "[C -> C++] testStruct({\"" << thing.string_thing << "\", " << (int)thing.byte_thing << ", " << thing.i32_thing << ", " << thing.i64_thing << "})" << '\n';
out = thing;
Expand Down Expand Up @@ -190,7 +195,8 @@ class TestHandler : public ThriftTestIf {

UserId testTypedef(const UserId thing) override {
cout << "[C -> C++] testTypedef(" << thing << ")" << '\n';
return thing; }
return thing;
}

void testMapMap(map<int32_t, map<int32_t,int32_t> > &mapmap, const int32_t hello) override {
cout << "[C -> C++] testMapMap(" << hello << ")" << '\n';
Expand Down
4 changes: 2 additions & 2 deletions lib/cpp/test/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ OpenSSLManualInitTest_LDADD = \
gen-cpp/AnnotationTest_constants.cpp gen-cpp/AnnotationTest_constants.h gen-cpp/AnnotationTest_types.cpp gen-cpp/AnnotationTest_types.h: $(top_srcdir)/test/AnnotationTest.thrift
$(THRIFT) --gen cpp $<

gen-cpp/DebugProtoTest_types.cpp gen-cpp/DebugProtoTest_types.h gen-cpp/EmptyService.cpp gen-cpp/EmptyService.h: $(top_srcdir)/test/v0.16/DebugProtoTest.thrift
gen-cpp/DebugProtoTest_types.cpp gen-cpp/DebugProtoTest_types.h gen-cpp/EmptyService.cpp gen-cpp/EmptyService.h: $(top_srcdir)/test/DebugProtoTest.thrift
$(THRIFT) --gen cpp $<

gen-cpp/DoubleConstantsTest_constants.cpp gen-cpp/DoubleConstantsTest_constants.h: $(top_srcdir)/test/DoubleConstantsTest.thrift
Expand All @@ -408,7 +408,7 @@ gen-cpp/Recursive_types.cpp gen-cpp/Recursive_types.h: $(top_srcdir)/test/Recurs
gen-cpp/Service.cpp gen-cpp/StressTest_types.cpp: $(top_srcdir)/test/StressTest.thrift
$(THRIFT) --gen cpp $<

gen-cpp/SecondService.cpp gen-cpp/ThriftTest_constants.cpp gen-cpp/ThriftTest.cpp gen-cpp/ThriftTest_types.cpp gen-cpp/ThriftTest_types.h: $(top_srcdir)/test/v0.16/ThriftTest.thrift
gen-cpp/SecondService.cpp gen-cpp/ThriftTest_constants.cpp gen-cpp/ThriftTest.cpp gen-cpp/ThriftTest_types.cpp gen-cpp/ThriftTest_types.h: $(top_srcdir)/test/ThriftTest.thrift
$(THRIFT) --gen cpp $<

gen-cpp/OneWayService.cpp gen-cpp/OneWayTest_types.h gen-cpp/OneWayService.h: OneWayTest.thrift
Expand Down