Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1734)

Unified Diff: mojo/public/tools/bindings/pylib/mojom_tests/parse/lexer_unittest.py

Issue 474063002: Mojo: add support for {double,float}.{INFINITY,NEGATIVE_INFINITY,NAN} (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mojo/public/tools/bindings/pylib/mojom_tests/parse/lexer_unittest.py
diff --git a/mojo/public/tools/bindings/pylib/mojom_tests/parse/lexer_unittest.py b/mojo/public/tools/bindings/pylib/mojom_tests/parse/lexer_unittest.py
index 49dc77e477da39d1daa35b420edfcbe39652c2e4..e5f3912e4827632d069ea4370a04d76a5f22c159 100644
--- a/mojo/public/tools/bindings/pylib/mojom_tests/parse/lexer_unittest.py
+++ b/mojo/public/tools/bindings/pylib/mojom_tests/parse/lexer_unittest.py
@@ -124,6 +124,14 @@ class LexerTest(unittest.TestCase):
_MakeLexToken("INT_CONST_HEX", "0x01aB2eF3"))
self.assertEquals(self._SingleTokenForInput("123.456"),
_MakeLexToken("FLOAT_CONST", "123.456"))
+ self.assertEquals(self._SingleTokenForInput("Inf"),
+ _MakeLexToken("FLOAT_CONST", "Inf"))
+ self.assertEquals(self._SingleTokenForInput("+Inf"),
+ _MakeLexToken("FLOAT_CONST", "+Inf"))
+ self.assertEquals(self._SingleTokenForInput("-Inf"),
+ _MakeLexToken("FLOAT_CONST", "-Inf"))
+ self.assertEquals(self._SingleTokenForInput("NaN"),
+ _MakeLexToken("FLOAT_CONST", "NaN"))
self.assertEquals(self._SingleTokenForInput("\"hello\""),
_MakeLexToken("STRING_LITERAL", "\"hello\""))
self.assertEquals(self._SingleTokenForInput("+"),

Powered by Google App Engine
This is Rietveld 408576698