mirror of
https://gitee.com/openharmony/third_party_rust_syn
synced 2024-11-24 00:10:15 +00:00
No longer require so much stack space
This commit is contained in:
parent
7b07aa1a17
commit
59e9631b80
@ -20,20 +20,6 @@ use self::walkdir::DirEntry;
|
||||
pub mod eq;
|
||||
pub mod parse;
|
||||
|
||||
pub fn check_min_stack() {
|
||||
let min_stack_value = match env::var("RUST_MIN_STACK") {
|
||||
Ok(s) => s,
|
||||
Err(_) => {
|
||||
env::set_var("RUST_MIN_STACK", 16000000.to_string());
|
||||
return;
|
||||
}
|
||||
};
|
||||
let min_stack_value: usize = min_stack_value
|
||||
.parse()
|
||||
.expect("RUST_MIN_STACK env var should be set since some tests require it.");
|
||||
assert!(min_stack_value >= 16_000_000);
|
||||
}
|
||||
|
||||
/// Read the `ABORT_AFTER_FAILURE` environment variable, and parse it.
|
||||
pub fn abort_after() -> usize {
|
||||
match env::var("ABORT_AFTER_FAILURE") {
|
||||
|
@ -92,7 +92,6 @@ fn test_simple_precedence() {
|
||||
/// Test expressions from rustc, like in `test_round_trip`.
|
||||
#[test]
|
||||
fn test_rustc_precedence() {
|
||||
common::check_min_stack();
|
||||
common::clone_rust();
|
||||
let abort_after = common::abort_after();
|
||||
if abort_after == 0 {
|
||||
|
@ -42,7 +42,6 @@ use common::eq::SpanlessEq;
|
||||
|
||||
#[test]
|
||||
fn test_round_trip() {
|
||||
common::check_min_stack();
|
||||
common::clone_rust();
|
||||
let abort_after = common::abort_after();
|
||||
if abort_after == 0 {
|
||||
|
Loading…
Reference in New Issue
Block a user