zng/tests
Samuel Guerra 7af0065a9b Fixed tests. 2023-12-30 22:56:22 -03:00
..
build Fixed tests. 2023-12-30 22:56:22 -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 Fixed tests. 2023-12-27 12:57:40 -03:00
config.rs Fixed tests. 2023-12-27 12:57:40 -03:00
focus.rs Replaced stack functions with `Stack!` shorthand. 2023-12-22 00:00:37 -03:00
image.rs More test fixes. 2023-12-12 23:48:37 -03:00
text.rs Started fixling integration tests. 2023-12-11 16:12:59 -03:00
var.rs Implemented strong typed var hook. 2023-12-27 11:38:30 -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.