diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2020-02-29 20:10:08 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2020-02-29 20:47:10 +0300 |
| commit | e94d3b70cb495df83230cff9ef5bb00f235883e4 (patch) | |
| tree | 8e00decea40c5a6ad9dbb7fe0809c79357361adf /src/libsyntax/util/comments | |
| parent | e9bca510fe17354f876aa289bb39d347d7c69c69 (diff) | |
| download | rust-e94d3b70cb495df83230cff9ef5bb00f235883e4.tar.gz rust-e94d3b70cb495df83230cff9ef5bb00f235883e4.zip | |
Move directory `libsyntax` -> `librustc_ast`
Diffstat (limited to 'src/libsyntax/util/comments')
| -rw-r--r-- | src/libsyntax/util/comments/tests.rs | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/src/libsyntax/util/comments/tests.rs b/src/libsyntax/util/comments/tests.rs deleted file mode 100644 index f9cd69fb50d..00000000000 --- a/src/libsyntax/util/comments/tests.rs +++ /dev/null @@ -1,47 +0,0 @@ -use super::*; - -#[test] -fn test_block_doc_comment_1() { - let comment = "/**\n * Test \n ** Test\n * Test\n*/"; - let stripped = strip_doc_comment_decoration(comment); - assert_eq!(stripped, " Test \n* Test\n Test"); -} - -#[test] -fn test_block_doc_comment_2() { - let comment = "/**\n * Test\n * Test\n*/"; - let stripped = strip_doc_comment_decoration(comment); - assert_eq!(stripped, " Test\n Test"); -} - -#[test] -fn test_block_doc_comment_3() { - let comment = "/**\n let a: *i32;\n *a = 5;\n*/"; - let stripped = strip_doc_comment_decoration(comment); - assert_eq!(stripped, " let a: *i32;\n *a = 5;"); -} - -#[test] -fn test_block_doc_comment_4() { - let comment = "/*******************\n test\n *********************/"; - let stripped = strip_doc_comment_decoration(comment); - assert_eq!(stripped, " test"); -} - -#[test] -fn test_line_doc_comment() { - let stripped = strip_doc_comment_decoration("/// test"); - assert_eq!(stripped, " test"); - let stripped = strip_doc_comment_decoration("///! test"); - assert_eq!(stripped, " test"); - let stripped = strip_doc_comment_decoration("// test"); - assert_eq!(stripped, " test"); - let stripped = strip_doc_comment_decoration("// test"); - assert_eq!(stripped, " test"); - let stripped = strip_doc_comment_decoration("///test"); - assert_eq!(stripped, "test"); - let stripped = strip_doc_comment_decoration("///!test"); - assert_eq!(stripped, "test"); - let stripped = strip_doc_comment_decoration("//test"); - assert_eq!(stripped, "test"); -} |
