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

Replace NUnit Assert with the custom verification logic to imrpove performance and avoid NUnit dependency #453

Open
dadhi opened this issue Mar 6, 2025 · 0 comments
Assignees

Comments

@dadhi
Copy link
Owner

dadhi commented Mar 6, 2025

In regard to the testing and using of NUnit as a testing library, the only thing in use right now is its Assert facilities
e.g.:

  • I am using custom test runner and debugging of the tests with...TestRunner CLI program instead of relying on the NUnit runner.
  • I am not using the test coverage (In the future, I would rather use fuzzing instead).

Right now I need a rather simple or much more complex custom verification (for the generated OpCodes) instead of the generic Assert.
So by cutting this last used NUnit feature, I will remove the dependency altogether, speeding up the compilation and simplifying the solution

My Assert replacing would probably be like:

  • Using CallerArgumentExpression to quickly understand the failed condition.
  • Won't throw the Exception on failure but rather will return false. It should speed up the test run given how many Asserts the test suite has (1753 at 2025.03.07). Ackshually... the test is expected to either pass or fail, and the tests in general have a flat structure, so why use Exception to propagate the failure???
@dadhi dadhi self-assigned this Mar 6, 2025
dadhi added a commit that referenced this issue Mar 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant