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

Add unit testing framework and skeleton test project

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

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
35/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
cpp

Hướng nghiên cứu

Trước tiên, hãy xem xét cấu hình build C++ hiện tại và bố cục mã nguồn của repository; issue không nêu tên tệp hoặc test cụ thể nào. Xác nhận framework kiểm thử đơn vị đã chọn, thêm phần cài đặt framework đó cùng một project test khung, sau đó ghi lại cách thêm các test trong tương lai và cách chạy coverage.

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

Mô tả

maintenance
Verification
  • I searched for similar issues (including closed issues) and found none was relevant.
Introduce the issue

Unit testing can improve code quality, help developers find bugs, and make it easier to add new features.

After looking into the project I see that there are no unit tests for Infinitime. I would like to suggest that the community adopts a unit testing framework and add documentation to the source code on how to include test coverage to new or existing code.

Preferred solution

After some initial research it looks like Google Test is a framework that is easy to integrate into an existing project and it has some nice features. There are a lot of unit testing frameworks out there for C++ and I think the community should discuss in case people have preferences for other solutions.

For the scope of this issue, I think the chosen framework should be installed and a skeleton test project should be added to the source code. It should also be well documented and provide a rough outline on how future tests could be included.

Version

No response

Ngôn ngữ chính
C
Star
3.4k
Fork
1.1k
Merge trung bình
23 giờ 18 phút
Pull request đã merge (30 ngày)
1

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

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

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 InfiniTimeOrg/InfiniTime

Tất cả issue của InfiniTimeOrg/InfiniTime

Issue tương tự

Thêm issue về C

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.