Skip to content

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

Open
@dadhi

Description

@dadhi

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???

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions