refmt
This commit is contained in:
parent
f805290a4b
commit
be73b0b828
17 changed files with 588 additions and 675 deletions
|
|
@ -1,5 +1,5 @@
|
|||
mod lex_tests {
|
||||
use relish::ast::{lex, ast_to_string};
|
||||
use relish::ast::{ast_to_string, lex};
|
||||
|
||||
#[test]
|
||||
fn test_lex_basic_pair() {
|
||||
|
|
@ -7,7 +7,7 @@ mod lex_tests {
|
|||
match lex(document.to_string()) {
|
||||
Ok(tree) => {
|
||||
assert_eq!(ast_to_string(tree), document);
|
||||
},
|
||||
}
|
||||
Err(s) => {
|
||||
print!("{}\n", s);
|
||||
assert!(false);
|
||||
|
|
@ -21,7 +21,7 @@ mod lex_tests {
|
|||
match lex(document.to_string()) {
|
||||
Ok(tree) => {
|
||||
assert_eq!(ast_to_string(tree), document);
|
||||
},
|
||||
}
|
||||
Err(s) => {
|
||||
print!("{}\n", s);
|
||||
assert!(false);
|
||||
|
|
@ -35,7 +35,7 @@ mod lex_tests {
|
|||
match lex(document.to_string()) {
|
||||
Ok(tree) => {
|
||||
assert_eq!(ast_to_string(tree), document);
|
||||
},
|
||||
}
|
||||
Err(s) => {
|
||||
print!("{}\n", s);
|
||||
assert!(false);
|
||||
|
|
@ -51,7 +51,7 @@ mod lex_tests {
|
|||
Ok(tree) => {
|
||||
print!("Bad token yielded: {}\n", ast_to_string(tree));
|
||||
assert!(false);
|
||||
},
|
||||
}
|
||||
Err(s) => {
|
||||
assert_eq!(s, output.to_string());
|
||||
}
|
||||
|
|
@ -64,7 +64,7 @@ mod lex_tests {
|
|||
match lex(document.to_string()) {
|
||||
Ok(tree) => {
|
||||
assert_eq!(ast_to_string(tree), document);
|
||||
},
|
||||
}
|
||||
Err(s) => {
|
||||
print!("{}\n", s);
|
||||
assert!(false);
|
||||
|
|
@ -78,7 +78,7 @@ mod lex_tests {
|
|||
match lex(document.to_string()) {
|
||||
Ok(tree) => {
|
||||
assert_eq!(ast_to_string(tree), document);
|
||||
},
|
||||
}
|
||||
Err(s) => {
|
||||
print!("{}\n", s);
|
||||
assert!(false);
|
||||
|
|
@ -94,7 +94,7 @@ mod lex_tests {
|
|||
Ok(tree) => {
|
||||
print!("Bad token yielded: {}\n", ast_to_string(tree));
|
||||
assert!(false);
|
||||
},
|
||||
}
|
||||
Err(s) => {
|
||||
assert_eq!(s, output.to_string());
|
||||
}
|
||||
|
|
@ -109,7 +109,7 @@ mod lex_tests {
|
|||
Ok(tree) => {
|
||||
print!("Bad token yielded: {}\n", ast_to_string(tree));
|
||||
assert!(false);
|
||||
},
|
||||
}
|
||||
Err(s) => {
|
||||
assert_eq!(s, output.to_string());
|
||||
}
|
||||
|
|
@ -123,7 +123,7 @@ mod lex_tests {
|
|||
match lex(document.to_string()) {
|
||||
Ok(tree) => {
|
||||
assert_eq!(ast_to_string(tree), output.to_string());
|
||||
},
|
||||
}
|
||||
Err(s) => {
|
||||
print!("{}\n", s);
|
||||
assert!(false);
|
||||
|
|
@ -138,7 +138,7 @@ mod lex_tests {
|
|||
match lex(document.to_string()) {
|
||||
Ok(tree) => {
|
||||
assert_eq!(ast_to_string(tree), output.to_string());
|
||||
},
|
||||
}
|
||||
Err(s) => {
|
||||
print!("{}\n", s);
|
||||
assert!(false);
|
||||
|
|
@ -153,7 +153,7 @@ mod lex_tests {
|
|||
match lex(document.to_string()) {
|
||||
Ok(tree) => {
|
||||
assert_eq!(ast_to_string(tree), output.to_string());
|
||||
},
|
||||
}
|
||||
Err(s) => {
|
||||
print!("{}\n", s);
|
||||
assert!(false);
|
||||
|
|
@ -169,7 +169,7 @@ mod lex_tests {
|
|||
Ok(tree) => {
|
||||
print!("Bad token yielded: {}\n", ast_to_string(tree));
|
||||
assert!(false);
|
||||
},
|
||||
}
|
||||
Err(s) => {
|
||||
assert_eq!(s, output.to_string());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue