Skip to content

Commit

Permalink
Rename tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jevancc committed Jan 19, 2021
1 parent d67cec2 commit f59a002
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions boa/src/syntax/lexer/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,7 @@ fn illegal_following_numeric_literal() {
}

#[test]
fn codepoint_with_no_braces() {
fn string_codepoint_with_no_braces() {
let mut lexer = Lexer::new(&br#""test\uD38Dtest""#[..]);
assert!(lexer.next().is_ok());
}
Expand All @@ -814,7 +814,7 @@ fn illegal_code_point_following_numeric_literal() {
}

#[test]
fn non_english_str() {
fn string_unicode() {
let str = r#"'中文';"#;

let mut lexer = Lexer::new(str.as_bytes());
Expand All @@ -828,7 +828,7 @@ fn non_english_str() {
}

#[test]
fn unicode_escape_with_braces() {
fn string_unicode_escape_with_braces() {
let mut lexer = Lexer::new(&br#"'{\u{20ac}\u{a0}\u{a0}}'"#[..]);

let expected = [TokenKind::StringLiteral("{\u{20ac}\u{a0}\u{a0}}".into())];
Expand Down Expand Up @@ -859,7 +859,7 @@ fn unicode_escape_with_braces() {
}

#[test]
fn unicode_escape_with_braces_() {
fn take_string_characters_unicode_escape_with_braces_2() {
let s = r#"\u{20ac}\u{a0}\u{a0}"#.to_string();

let mut cursor = Cursor::new(s.as_bytes());
Expand All @@ -877,7 +877,7 @@ fn unicode_escape_with_braces_() {
}

#[test]
fn unescape_string_with_single_escape() {
fn take_string_characters_with_single_escape() {
let s = r#"\Б"#.to_string();
let mut cursor = Cursor::new(s.as_bytes());
let (s, _) = StringLiteral::take_string_characters(
Expand All @@ -891,7 +891,7 @@ fn unescape_string_with_single_escape() {
}

#[test]
fn legacy_octal_escape() {
fn take_string_characters_legacy_octal_escape() {
let test_cases = [
(r#"\3"#, "\u{3}"),
(r#"\03"#, "\u{3}"),
Expand Down Expand Up @@ -928,7 +928,7 @@ fn legacy_octal_escape() {
}

#[test]
fn zero_escape() {
fn take_string_characters_zero_escape() {
let test_cases = [(r#"\0"#, "\u{0}"), (r#"\0A"#, "\u{0}A")];

for (s, expected) in test_cases.iter() {
Expand All @@ -946,7 +946,7 @@ fn zero_escape() {
}

#[test]
fn non_octal_decimal_escape() {
fn take_string_characters_non_octal_decimal_escape() {
let test_cases = [(r#"\8"#, "8"), (r#"\9"#, "9")];

for (s, expected) in test_cases.iter() {
Expand Down Expand Up @@ -975,7 +975,7 @@ fn non_octal_decimal_escape() {
}

#[test]
fn line_continuation() {
fn take_string_characters_line_continuation() {
let s = "hello \\\nworld";
let mut cursor = Cursor::new(s.as_bytes());
let (s, _) = StringLiteral::take_string_characters(
Expand Down

0 comments on commit f59a002

Please sign in to comment.