credible-std checkout. If you want to run existing tests before adding your own, start with Run an Example Policy Locally; that starter lesson uses a different repository.
Prerequisites
Install PCL and Git. This walkthrough was re-tested with PCL1.9.0 and Solidity 0.8.29 on Linux ARM64 on 2026-11-17. It uses local contracts and needs no wallet or RPC connection.
1. Check out the reviewed library
pcl test.
2. Add a target and three tests
Save this file asexamples/assertions-book/test/OwnerPolicy.t.sol:
0, matching the example. It is a test fixture, not a contract to deploy.
cl.assertion arms the selected assertion function for the next monitored call. This test selects the owner check. The source also has an admin check, which needs its own fixture and tests.
3. Run the tests
What You Learned
The owner check rejects a permanent change and rolls back that transaction. It permits a temporary change that restores the owner before the endpoint comparison, even though another call observed the temporary owner. Passing an endpoint check therefore does not prove that authority stayed unchanged throughout execution. You also tested only the owner assertion function. The source’s admin check needs a separate fixture; the three passing tests do not establish its behavior.Next Steps
- Read State Change Tracking to compare intermediate writes with endpoint values.
- Use the owner and admin lock reference to inspect this pattern’s slots, triggers, and limitations.
- Follow Write Your Own Policies when you are ready to define and test a policy for your own contracts.

