Skip to content
This repository has been archived by the owner on Apr 20, 2023. It is now read-only.

add testing file #86

Merged
merged 7 commits into from
Mar 23, 2023
Merged

add testing file #86

merged 7 commits into from
Mar 23, 2023

Conversation

critesjosh
Copy link
Contributor

@critesjosh critesjosh commented Mar 21, 2023

Copy link
Contributor

@signorecello signorecello left a comment

Choose a reason for hiding this comment

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

Looks great my friend

Running `nargo test` will test that the `test_add` function can be executed while satisfying the all the contraints which allows you to test that add returns the expected values. Test functions can't have any arguments currently.

This is much faster compared to testing in Typescript but the only downside is that you can't explicitly test that a certain set of inputs are invalid.
i.e. you can't say that you want add(2^64-1, 2^64-1) to fail.
Copy link
Contributor

Choose a reason for hiding this comment

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

Good point here, perhaps we should consider adding this in the future

@critesjosh critesjosh merged commit 2c394c3 into master Mar 23, 2023
@critesjosh critesjosh deleted the jc/testing branch March 23, 2023 19:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document nargo test
3 participants