Skip to content

Commit cf8c29a

Browse files
committed
Move all alloc integration tests to a new alloctests crate
1 parent dfca153 commit cf8c29a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+58
-19
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ members = [
44
"std",
55
"sysroot",
66
"coretests",
7+
"alloctests",
78
]
89

910
exclude = [

alloc/Cargo.toml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,6 @@ compiler_builtins = { version = "=0.1.151", features = ['rustc-dep-of-std'] }
1818
rand = { version = "0.9.0", default-features = false, features = ["alloc"] }
1919
rand_xorshift = "0.4.0"
2020

21-
[[test]]
22-
name = "alloctests"
23-
path = "tests/lib.rs"
24-
25-
[[test]]
26-
name = "vec_deque_alloc_error"
27-
path = "tests/vec_deque_alloc_error.rs"
28-
29-
[[bench]]
30-
name = "allocbenches"
31-
path = "benches/lib.rs"
32-
test = true
33-
34-
[[bench]]
35-
name = "vec_deque_append_bench"
36-
path = "benches/vec_deque_append.rs"
37-
harness = false
38-
3921
[features]
4022
compiler-builtins-mem = ['compiler_builtins/mem']
4123
compiler-builtins-c = ["compiler_builtins/c"]
File renamed without changes.
File renamed without changes.

alloctests/Cargo.toml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
[package]
2+
name = "alloctests"
3+
version = "0.0.0"
4+
license = "MIT OR Apache-2.0"
5+
repository = "https://github.com/rust-lang/rust.git"
6+
description = "Tests for the Rust Allocation Library"
7+
autotests = false
8+
autobenches = false
9+
edition = "2021"
10+
11+
[lib]
12+
path = "lib.rs"
13+
test = false
14+
bench = false
15+
16+
[dev-dependencies]
17+
rand = { version = "0.9.0", default-features = false, features = ["alloc"] }
18+
rand_xorshift = "0.4.0"
19+
20+
[[test]]
21+
name = "alloctests"
22+
path = "tests/lib.rs"
23+
24+
[[test]]
25+
name = "vec_deque_alloc_error"
26+
path = "tests/vec_deque_alloc_error.rs"
27+
28+
[[bench]]
29+
name = "allocbenches"
30+
path = "benches/lib.rs"
31+
test = true
32+
33+
[[bench]]
34+
name = "vec_deque_append_bench"
35+
path = "benches/vec_deque_append.rs"
36+
harness = false
37+
38+
[lints.rust.unexpected_cfgs]
39+
level = "warn"
40+
check-cfg = [
41+
'cfg(bootstrap)',
42+
'cfg(no_global_oom_handling)',
43+
'cfg(no_rc)',
44+
'cfg(no_sync)',
45+
'cfg(randomized_layouts)',
46+
]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

alloctests/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// Intentionally left empty.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

alloc/tests/lib.rs renamed to alloctests/tests/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,12 @@
4343
#![deny(fuzzy_provenance_casts)]
4444
#![deny(unsafe_op_in_unsafe_fn)]
4545

46+
extern crate alloc;
4647
extern crate test;
4748

4849
use std::hash::{DefaultHasher, Hash, Hasher};
4950

50-
mod alloc;
51+
mod alloc_test;
5152
mod arc;
5253
mod autotraits;
5354
mod borrow;
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)