Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

gtest target tests a locally redefined function, not production code

Đang mở
#191 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 4 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
48/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
cpp
Lĩnh vực
build-system, testing-qa

Hướng nghiên cứu

Bắt đầu với xplane_plugin/tests/test_threading_tools.cpp và xplane_plugin/meson.build, sau đó so sánh định nghĩa generate_packet cục bộ và các lời gọi kiểm thử với threading-tools.h. Xem xét các issue liên quan #190, #66 và #103 trước khi quyết định target có thể kiểm thử mã production hay nên được xóa. Hoàn tất khi meson test không còn hiển thị một target kiểm thử đạt yêu cầu nhưng chỉ thực thi mã được định nghĩa cục bộ.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

area:xplane-plugin testing

Describe the bug
xplane_plugin/tests/test_threading_tools.cpp includes threading-tools.h, which declares generate_packet(vector<string>), then defines its own generate_packet(const string&, const string&, const string&, const string&) at line 11. Both tests call the local four-string version, so overload resolution never reaches the header's declaration. That is also why the header's missing definitions never cause a link error.

test_threading_tools is the only test target in xplane_plugin/meson.build, so the C++ suite currently exercises no production code at all. meson test passing means nothing.

Expected behavior
The suite tests real production code, or the target is removed so a passing run is not mistaken for coverage.

Additional context
ThreadMessage in the header is a four-float struct, predating the current eight-value payload, so the test reflects an obsolete data model. Related to #66 and #103. Should be resolved together with #190.

Found while writing the setup documentation in #138 / #178.

Ngôn ngữ chính
Rust
Star
4
Fork
8
Merge trung bình
3 ngày 12 giờ
Pull request đã merge (30 ngày)
16

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của oss-slu/PilotDataSynchronization

Tất cả issue của oss-slu/PilotDataSynchronization

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.