Skip to content

Added tests for xinspect #278

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

Merged
merged 5 commits into from
Apr 16, 2025
Merged

Conversation

kr-2003
Copy link
Contributor

@kr-2003 kr-2003 commented Mar 8, 2025

Description

  • Added tests for fetch_documentation_of_member_or_parameter and is_inspect_request.
  • Fixed inspect function. (Previously, one can't fetch documentation of member functions and variables.)

Fixes #276

Copy link
Contributor

github-actions bot commented Mar 8, 2025

clang-tidy review says "All clean, LGTM! 👍"

@codecov-commenter
Copy link

codecov-commenter commented Mar 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.15%. Comparing base (9458ebe) to head (6dc6e14).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #278      +/-   ##
==========================================
+ Coverage   80.87%   82.15%   +1.27%     
==========================================
  Files          20       20              
  Lines         957      958       +1     
  Branches       88       88              
==========================================
+ Hits          774      787      +13     
+ Misses        183      171      -12     
Files with missing lines Coverage Δ
src/xinspect.cpp 94.02% <100.00%> (+9.06%) ⬆️
Files with missing lines Coverage Δ
src/xinspect.cpp 94.02% <100.00%> (+9.06%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

github-actions bot commented Mar 8, 2025

clang-tidy review says "All clean, LGTM! 👍"

@kr-2003
Copy link
Contributor Author

kr-2003 commented Mar 20, 2025

@anutosh491
We discussed about ?std::vector.push_back working but ?vector.push_back not working. And ?std::vector and ?vector working.

This is not something that I can change. The format of cppreference-doxygen-web.tag file is such that it has 2 instances for vector. One is std::vector as class and another one is vector as file. Therefore one can find documentation related to both of them. But for any class member function or variable, it can be only access via class std::vector. Therefore the above specified scenario takes place.

I think this is how it is supposed to work.

PR is complete from my side.

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

Copy link
Collaborator

@anutosh491 anutosh491 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM !

Coverage goes up. Works with lite too so no complaints. Thanks.

@anutosh491 anutosh491 merged commit 160dce0 into compiler-research:main Apr 16, 2025
16 checks passed
xcpp::interpreter interpreter((int)Args.size(), Args.data());

std::string code = "?std::vector.push_back";
std::string inspect_result = "https://en.cppreference.com/w/cpp/container/vector/push_back";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we require internet connection for this test to work?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve test coverage for xinspect.cpp
4 participants