-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Refactor system contract handling and add tests Refactored variable `SystemContractContent` to handle byte content and renamed the string version for clarity. Added comprehensive tests for system contract functionalities, including deployment, stream acceptance and revocation, and methods validation. * Refactor test setup for deployer injection Refactored the test setup functions to inject the deployer address, improving consistency and reducing redundancy. This change centralizes the creation of the deployer and ensures it is correctly assigned and used across multiple test setups. * Ensure valid Ethereum addresses and refactor test setup Validate and clean Ethereum addresses in procedures. Refactor tests for better readability and setup initial contract states. Added checks for address length and hex validity. * Fix nil pointer dereference in test return * Add test for division by zero error handling This commit adds a new test case, `testDivisionByZero`, to ensure that the system correctly handles division by zero errors during index change calculations. The test sets up a primitive stream and verifies that an error is raised when division by zero occurs, aligning with our expected behavior.
- Loading branch information
Showing
9 changed files
with
556 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.