Skip to content

Commit 275d321

Browse files
committed
Remove some unit tests and that are redundant with run-pass/hygiene.rs
and that would be painful to rewrite.
1 parent 44575f7 commit 275d321

File tree

1 file changed

+0
-35
lines changed

1 file changed

+0
-35
lines changed

src/libsyntax/ext/hygiene.rs

-35
Original file line numberDiff line numberDiff line change
@@ -114,38 +114,3 @@ impl fmt::Debug for SyntaxContext {
114114
write!(f, "#{}", self.0)
115115
}
116116
}
117-
118-
#[cfg(test)]
119-
mod tests {
120-
use ast::{EMPTY_CTXT, Mrk, SyntaxContext};
121-
use super::{apply_mark_internal, new_sctable_internal, Mark, SCTable};
122-
123-
// extend a syntax context with a sequence of marks given
124-
// in a vector. v[0] will be the outermost mark.
125-
fn unfold_marks(mrks: Vec<Mrk> , tail: SyntaxContext, table: &SCTable)
126-
-> SyntaxContext {
127-
mrks.iter().rev().fold(tail, |tail:SyntaxContext, mrk:&Mrk|
128-
{apply_mark_internal(*mrk,tail,table)})
129-
}
130-
131-
#[test] fn unfold_marks_test() {
132-
let mut t = new_sctable_internal();
133-
134-
assert_eq!(unfold_marks(vec!(3,7),EMPTY_CTXT,&mut t),SyntaxContext(2));
135-
{
136-
let table = t.table.borrow();
137-
assert!((*table)[1] == Mark(7,EMPTY_CTXT));
138-
assert!((*table)[2] == Mark(3,SyntaxContext(1)));
139-
}
140-
}
141-
142-
#[test]
143-
fn hashing_tests () {
144-
let mut t = new_sctable_internal();
145-
assert_eq!(apply_mark_internal(12,EMPTY_CTXT,&mut t),SyntaxContext(1));
146-
assert_eq!(apply_mark_internal(13,EMPTY_CTXT,&mut t),SyntaxContext(2));
147-
// using the same one again should result in the same index:
148-
assert_eq!(apply_mark_internal(12,EMPTY_CTXT,&mut t),SyntaxContext(1));
149-
// I'm assuming that the rename table will behave the same....
150-
}
151-
}

0 commit comments

Comments
 (0)