-
Notifications
You must be signed in to change notification settings - Fork 70
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
Adds test for methods in vec, map and bytes (#840) #900
Conversation
98298bc
to
303ce33
Compare
On a side note, there are some |
@Ray-Escobar thanks for the PR! I will take a look at the tests soon. |
@jayz22 thanks! I am very open with feedback so be as critical as you need. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding tests!
If possible I'd like us to change how we assert the panics so that we're asserting on the specific function that we expect to panic. See inline comment.
303ce33
to
1b7f130
Compare
Adds tests for the methods within the modules Vec, Map and Bytes. These modules are the bulding blocks of soroban-sdk.
1b7f130
to
5c0b6a9
Compare
What
Adds tests for the methods within the modules Vec, Map and Bytes.
Tests have been added for the following methods...
Bytes:
is_empty
,first
,first_unchecked
,last
,last_unchecked
,get
,get_unchecked
,remove
,remove_unchecked
,pop
,pop_unchecked
,insert
,slice
Map:
from_array
,contains_key
,is_empty
,get
,get_unchecked
,remove
,remove_unchecked
Vec:
get
,get_unchecked
,remove
,remove_unchecked
Why
These modules are the building blocks of soroban-sdk.
Extra
I refactored some tests names in
Vec
so that they are pre-pended with the wordtest
. It seems the majority of the tests follow this convention, but I also stopped short in case the renaming is not necessary. I do find its useful as an easy way to search files i.e. if you want to look for tests simply use the query "find_" on all your files.