Lines Matching +full:integration +full:- +full:tests
1 # Jni-rs Contribution Guide
3 Jni-rs is open to any contributions, whether
7 * how to [build](#how-to-build) it
8 * how to [test](#tests) it
9 * the [code style guidelines](#the-code-style)
10 * how to [submit an issue](#submitting-issues)
11 * how to [submit a PR](#submitting-pull-requests).
20 * [Rust (latest stable)](https://www.rust-lang.org/).
24 To build `jni-rs`, simply run
31 adding `--release` flag.
33 ## Tests section in Jni-rs Contribution Guide
35 ### Categories of Tests argument
37 * Unit tests are typically placed at the bottom of their module file.
38 E.g. [unit tests of signature module](src/wrapper/signature.rs). Tests are wrapped
49 // More tests...
53 * Integration tests are in [tests directory](tests). They use the same pattern as
54 unit tests, but split into several files instead of private modules.
55 Integration tests use `jni-rs` as every other Rust application — by importing
63 Integration tests typically require running a JVM, so you should add
65 methods from [util module](tests/util/mod.rs) to run JVM.
67 Keep in mind, that only one JVM can be run per process. Therefore, tests that
69 source files. `Cargo` runs tests from different modules in parallel.
71 * Benchmarks are in [benches](benches) directory. As integration tests, they
74 * Doc tests are rarely used, but they allow to efficiently test some functionality
76 [Rust documentation](https://doc.rust-lang.org/beta/rustdoc/documentation-tests.html)
77 for more info about writing these tests.
79 ### Running Tests argument
83 As some tests need to launch a JVM, add a directory with JVM library that you want
91 #### Run Tests argument
93 To run all tests, execute the following command:
96 cargo test --features=invocation
99 This command will run all tests, including unit, integration and documentation
100 tests.
107 cargo +nightly bench --features=invocation
111 two [API flavours][checked-unchecked]: checked and unchecked, and
114 [checked-unchecked]: https://docs.rs/jni/0.21.1/jni/struct.JNIEnv.html#checked-and-unchecked-methods
118 Rust code follows the [Rust style guide](https://github.com/rust-lang-nursery/fmt-rfcs/blob/master/…
119 [`rustfmt`](https://github.com/rust-lang-nursery/rustfmt) enforces the code style.
124 cargo fmt --all -- --check
127 Every public entry of the API must be thoroughly documented and covered with tests if it is possibl…
136 cargo doc --open
141 … question, some feedback, a bug or a feature request: <https://github.com/jni-rs/jni-rs/issues/new>
155 * Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or
156 <http://www.apache.org/licenses/LICENSE-2.0>)
157 * MIT license ([LICENSE-MIT](LICENSE-MIT) or <http://opensource.org/licenses/MIT>)
164 Apache-2.0 license, shall be dual licensed as above, without any