Skip to content

Commit

Permalink
added few test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
hitanshu-dhawan committed Jan 10, 2020
1 parent 48d014c commit 4694484
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,12 @@ object TestingUtils {
122 to " { {`Hitanshu`<a:b|c;d:e/>}{`Dhawan`<a:b|c;d:e/>} } ",
123 to "{ {`Hitanshu`<a:b|c;d:e/>} }{ {`Dhawan`<a:b|c;d:e/>} }",
124 to " { {`Hitanshu`<a:b|c;d:e/>} {`Dhawan`<a:b|c;d:e/>} } ",
125 to " { {`Hitanshu`<a:b|c;d:e/>} } { {`Dhawan`<a:b|c;d:e/>} } "
125 to " { {`Hitanshu`<a:b|c;d:e/>} } { {`Dhawan`<a:b|c;d:e/>} } ",
//
126 to "Hello Hitanshu",
127 to "Hello\tHitanshu",
128 to "Hello\rHitanshu",
129 to "Hello\nHitanshu"
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1157,4 +1157,52 @@ class LexerTest {
)
}

@Test
fun test126() {
assertEquals(
listOf(
Token(TEXT, "Hello"),
Token(WHITESPACE, " "),
Token(TEXT, "Hitanshu")
),
testStrings.getValue(126).tokenize()
)
}

@Test
fun test127() {
assertEquals(
listOf(
Token(TEXT, "Hello"),
Token(WHITESPACE, "\t"),
Token(TEXT, "Hitanshu")
),
testStrings.getValue(127).tokenize()
)
}

@Test
fun test128() {
assertEquals(
listOf(
Token(TEXT, "Hello"),
Token(WHITESPACE, "\r"),
Token(TEXT, "Hitanshu")
),
testStrings.getValue(128).tokenize()
)
}

@Test
fun test129() {
assertEquals(
listOf(
Token(TEXT, "Hello"),
Token(WHITESPACE, "\n"),
Token(TEXT, "Hitanshu")
),
testStrings.getValue(129).tokenize()
)
}

}

0 comments on commit 4694484

Please sign in to comment.