Exemplo n.º 1
0
 public void TestParseIdentifierEmptyArray()
 {
     Assert.Throws <InvalidTokenParsingException>(() =>
     {
         ReadOnlySpan <char> data = "";
         SimpleTokenizer.ParseIdentifier(ref data);
     });
 }
Exemplo n.º 2
0
 public void TestIdentifiersCantStartWithInvalidCharacters(string str)
 {
     Assert.Throws <InvalidTokenParsingException>(() =>
     {
         ReadOnlySpan <char> input = str;
         SimpleTokenizer.ParseIdentifier(ref input);
     });
 }
Exemplo n.º 3
0
 public void TestKeywordsCantBeArrays()
 {
     Assert.Throws <InvalidTokenParsingException>(() =>
     {
         ReadOnlySpan <char> input = "return[]";
         SimpleTokenizer.ParseIdentifier(ref input);
     });
 }