Пример #1
0
 public void TestFloatsWithNoFractionalPart()
 {
     var lex = new FloatLexer(new StringReader("321."));
     var tok = lex.Scan();
     Assert.AreEqual(tok.tag, Tag.FLOAT);
     Assert.AreEqual(((FloatToken)tok).value, 321.0f);
 }
Пример #2
0
 public void TestIntsNotFloats()
 {
     var lex = new FloatLexer(new StringReader("1"));
     var tok = lex.Scan();
     Assert.AreEqual(tok.tag, Tag.INTEGER);
 }