Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit b1b368c

Browse files
committed
test page_size via test dependency support
and move crate tests to their own folders
1 parent 8fa1542 commit b1b368c

File tree

6 files changed

+18
-0
lines changed

6 files changed

+18
-0
lines changed

test_dependencies/Cargo.lock

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test_dependencies/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ edition = "2021"
1111
# all dependencies (and their transitive ones) listed here can be used in `tests/`.
1212
tokio = { version = "1.0", features = ["full"] }
1313
libc = "0.2"
14+
page_size = "0.4.1"
1415

1516
getrandom_1 = { package = "getrandom", version = "0.1" }
1617
getrandom_2 = { package = "getrandom", version = "0.2" }
File renamed without changes.
File renamed without changes.

tests/pass/crates/page_size.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
fn main() {
2+
let page_size = page_size::get();
3+
4+
// In particular, this checks that it is not 0.
5+
assert!(page_size.is_power_of_two(), "page size not a power of two: {}", page_size);
6+
}
File renamed without changes.

0 commit comments

Comments
 (0)