Skip to content

Commit

Permalink
test page_size via test dependency support
Browse files Browse the repository at this point in the history
and move crate tests to their own folders
  • Loading branch information
RalfJung committed Jul 21, 2022
1 parent 8fa1542 commit b1b368c
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test_dependencies/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions test_dependencies/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ edition = "2021"
# all dependencies (and their transitive ones) listed here can be used in `tests/`.
tokio = { version = "1.0", features = ["full"] }
libc = "0.2"
page_size = "0.4.1"

getrandom_1 = { package = "getrandom", version = "0.1" }
getrandom_2 = { package = "getrandom", version = "0.2" }
Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 6 additions & 0 deletions tests/pass/crates/page_size.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
fn main() {
let page_size = page_size::get();

// In particular, this checks that it is not 0.
assert!(page_size.is_power_of_two(), "page size not a power of two: {}", page_size);
}
File renamed without changes.

0 comments on commit b1b368c

Please sign in to comment.