Skip to content

Support testing/clearing Assignable_Proxy_Function's callable#480

Open
totalgee wants to merge 1 commit into
ChaiScript:developfrom
totalgee:function_clear
Open

Support testing/clearing Assignable_Proxy_Function's callable#480
totalgee wants to merge 1 commit into
ChaiScript:developfrom
totalgee:function_clear

Conversation

@totalgee
Copy link
Copy Markdown
Contributor

Issue this pull request references: #321

Changes proposed in this pull request

  • add operator bool() cast to test if an Assignable_Proxy_Function has a callable.
  • add clear() to reset/empty the callable function.
  • include new compiled test case to work with (setting, testing, calling and clearing) callback functions in C++ objects.

- add `operator bool()` cast to test if an Assignable_Proxy_Function
  has a callable.
- add `clear()` to reset/empty the callable function.
- include new compiled test case to work with (setting, testing, calling
  and clearing) callback functions in C++ objects.
@totalgee
Copy link
Copy Markdown
Contributor Author

Incidentally, when I run make test or just ctest locally, if there is actually an error it still shows the tests as passing. However if you actually run ./compiled_tests you'll see if there were any failing exceptions or CHECK() clauses. Why is that? Does "compiled_tests" not have the proper return code? Hopefully it actually checks these things properly when running the continuous integration, if not in my local build.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 23, 2026

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 0% with 32 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (develop@b0c1483). Learn more about missing BASE report.
⚠️ Report is 181 commits behind head on develop.

Files with missing lines Patch % Lines
unittests/compiled_tests.cpp 0.00% 28 Missing ⚠️
include/chaiscript/dispatchkit/proxy_functions.hpp 0.00% 4 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##             develop     #480   +/-   ##
==========================================
  Coverage           ?   68.97%           
==========================================
  Files              ?       60           
  Lines              ?    10506           
  Branches           ?        0           
==========================================
  Hits               ?     7246           
  Misses             ?     3260           
  Partials           ?        0           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

2 participants