https://github.com/nikvolf/cargo-gtest
https://github.com/nikvolf/cargo-gtest
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/nikvolf/cargo-gtest
- Owner: NikVolf
- Created: 2023-10-16T14:35:23.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-03-28T13:09:15.000Z (about 2 years ago)
- Last Synced: 2024-03-28T14:32:25.742Z (about 2 years ago)
- Language: Rust
- Size: 1.16 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Cargo gtest tool
Along with various tools and libraries to facilitate stability of your Gear programs and any Gear network as a whole. We plan to use this to test for regressions and backward compatibility.
## How to use
#### Install cargo-gtest
For contracts development (Gear programs) to run on Vara or different Gear protocol powered network, install `cargo-gtest`:
```
cargo install --git https://github.com/NikVolf/cargo-gtest
```
This will add cargo extension as a drop-in replacement for `cargo test`:
```
cargo gtest
```
(it accepts any parameters as regular `cargo test` does)
#### In your contracts/programs, tests can be declared with a simple decorator:
```rust
#[gear-test-codegen::test]
fn some_test() {
assert_eq(1, 1)
}
```
#### Examples
See `./examplle` in this repository or standalone minimal example at https://github.com/NikVolf/gtest-min.