zng/tests
Samuel Guerra 380dc04b52 More docs review. 2024-02-12 15:46:22 -03:00
..
build More docs review. 2024-02-08 23:13:56 -03:00
Cargo.toml More test fixes. 2023-12-12 23:48:37 -03:00
README.md Reorganized project folders. 2021-12-15 20:43:05 -03:00
command.rs Renamed wgt_prelude to prelude_wgt. 2024-01-05 12:45:09 -03:00
config.rs Fixed tests. 2023-12-27 12:57:40 -03:00
focus.rs More docs review. 2024-02-12 15:46:22 -03:00
image.rs Documented checkerboard. 2024-01-12 12:56:56 -03:00
text.rs Renamed wgt_prelude to prelude_wgt. 2024-01-05 12:45:09 -03:00
var.rs Fixed tests. 2024-01-19 15:04:39 -03:00

README.md

Tests

Use this directory for integration, build tests or any test that is not a unit test.

Running

Use cargo do test -t command to run tests in the ./command.rs file.

Use cargo do test -b * to run all build tests.

Use cargo do test -b property/* to run build test cases that match the path relative to ./build/cases.

Adding an Integration Test

To add an integration test, create a file then add it in ./Cargo.toml as a [[bin]].

In ./foo.rs:

use zero_ui::prelude::*;

#[test]
fn foo() {
    assert!(true);
}

Then add in ./Cargo.toml:

[[test]]
name = "foo"
path = "foo.rs"

Then run from the project root using cargo do test -t foo.