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

Unified Diff: test/cctest/test-parsing.cc

Issue 1492123002: Preserve information about dots in numbers across parser rewriting. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « test/cctest/test-asm-validator.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-parsing.cc
diff --git a/test/cctest/test-parsing.cc b/test/cctest/test-parsing.cc
index b9251e9b09afc1461f58a244fad9d278e91e34d3..0769ddc9c9dfb50d388512de6314ad6c4fb17e5b 100644
--- a/test/cctest/test-parsing.cc
+++ b/test/cctest/test-parsing.cc
@@ -1151,12 +1151,23 @@ static void CheckParsesToNumber(const char* source, bool with_dot) {
TEST(ParseNumbers) {
+ CheckParsesToNumber("1.", true);
CheckParsesToNumber("1.34", true);
CheckParsesToNumber("134", false);
CheckParsesToNumber("134e44", false);
CheckParsesToNumber("134.e44", true);
CheckParsesToNumber("134.44e44", true);
CheckParsesToNumber(".44", true);
+
+ CheckParsesToNumber("-1.", true);
+ CheckParsesToNumber("-1.0", true);
+ CheckParsesToNumber("-1.34", true);
+ CheckParsesToNumber("-134", false);
+ CheckParsesToNumber("-134e44", false);
+ CheckParsesToNumber("-134.e44", true);
+ CheckParsesToNumber("-134.44e44", true);
+ CheckParsesToNumber("-.44", true);
+
CheckParsesToNumber("+x", true);
}
« no previous file with comments | « test/cctest/test-asm-validator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698