Skip to content

Commit 10892f4

Browse files
tests: add nightly channel check to emitter tests
1 parent 849e818 commit 10892f4

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/syntux/session.rs

+10
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ mod tests {
269269
mod emitter {
270270
use super::*;
271271
use crate::config::IgnoreList;
272+
use crate::is_nightly_channel;
272273
use crate::utils::mk_sp;
273274
use std::path::PathBuf;
274275
use syntax::source_map::FileName as SourceMapFileName;
@@ -347,6 +348,9 @@ mod tests {
347348

348349
#[test]
349350
fn handles_recoverable_parse_error_in_ignored_file() {
351+
if !is_nightly_channel!() {
352+
return;
353+
}
350354
let num_emitted_errors = Rc::new(RefCell::new(0));
351355
let can_reset_errors = Rc::new(RefCell::new(false));
352356
let ignore_list = get_ignore_list(r#"ignore = ["foo.rs"]"#);
@@ -368,6 +372,9 @@ mod tests {
368372

369373
#[test]
370374
fn handles_recoverable_parse_error_in_non_ignored_file() {
375+
if !is_nightly_channel!() {
376+
return;
377+
}
371378
let num_emitted_errors = Rc::new(RefCell::new(0));
372379
let can_reset_errors = Rc::new(RefCell::new(false));
373380
let source_map = Rc::new(SourceMap::new(FilePathMapping::empty()));
@@ -388,6 +395,9 @@ mod tests {
388395

389396
#[test]
390397
fn handles_mix_of_recoverable_parse_error() {
398+
if !is_nightly_channel!() {
399+
return;
400+
}
391401
let num_emitted_errors = Rc::new(RefCell::new(0));
392402
let can_reset_errors = Rc::new(RefCell::new(false));
393403
let source_map = Rc::new(SourceMap::new(FilePathMapping::empty()));

0 commit comments

Comments
 (0)