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