Condition Token Testing
Condition Token Testing
Condition Token Testing
You can test a condition token that is returned from a bindable API for the following:
Success : To test for success, determine if the first 4 bytes are zero. If the first 4 bytes are zero, the remainder of the condition token is zero, indicating a successful call was made to the bindable API.
Equivalent Tokens : To determine whether two condition tokens are equivalent (that is, the same type of condition token, but not the same instance of the condition token), compare the first 8 bytes of each condition token with one another. These bytes are the same for all instances of a given condition.
Equal Tokens : To determine whether two condition tokens are equal, (that is, they represent the same instance of a condition), compare all 12 bytes of each condition token with one another. The last 4 bytes can change from instance to instance of a condition.