You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For accept message it has two (kind of three) things that it does
if called from inspect message the call will go through
if not called form inspect message the call will not go through
if called outside of inspect message the canister will trap
So we just need to tests that it does that.
So we make a canister with four methods, two queries, two updates, one of each will be do something simple like just return the input value, the other ones will call accept message and we will make sure that they trap.
If the input to those methods is a number we could have the inspect message be something simple like if the parameter is odd then reject, if it's even then accept. Then we get a smattering of calls that will accept, and a smattering that will reject. We call the methods that call accept once each to make sure they trap and then we call it a day.
The text was updated successfully, but these errors were encountered:
For accept message it has two (kind of three) things that it does
So we just need to tests that it does that.
So we make a canister with four methods, two queries, two updates, one of each will be do something simple like just return the input value, the other ones will call accept message and we will make sure that they trap.
If the input to those methods is a number we could have the inspect message be something simple like if the parameter is odd then reject, if it's even then accept. Then we get a smattering of calls that will accept, and a smattering that will reject. We call the methods that call accept once each to make sure they trap and then we call it a day.
The text was updated successfully, but these errors were encountered: