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

Unified Diff: test/cctest/test-ast-expression-visitor.cc

Issue 1447133002: Use asm style type names and improve asm typer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: revised Created 5 years, 1 month 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-ast-expression-visitor.cc
diff --git a/test/cctest/test-ast-expression-visitor.cc b/test/cctest/test-ast-expression-visitor.cc
index 34c4c5303fb8f326efb6bdbb15f55dc940694ee3..8ec5fb0fa7b24f3522bfd4f46f53f1e1fbd91c5a 100644
--- a/test/cctest/test-ast-expression-visitor.cc
+++ b/test/cctest/test-ast-expression-visitor.cc
@@ -273,6 +273,33 @@ TEST(VisitExpressions) {
}
+TEST(VisitConditional) {
+ v8::V8::Initialize();
+ HandleAndZoneScope handles;
+ ZoneVector<ExpressionTypeEntry> types(handles.main_zone());
+ // Check that traversing the ternary operator works.
+ const char test_function[] =
+ "function foo() {\n"
+ " var a, b, c;\n"
+ " var x = a ? b : c;\n"
+ "}\n";
+ CollectTypes(&handles, test_function, &types);
+ CHECK_TYPES_BEGIN {
+ CHECK_EXPR(FunctionLiteral, Bounds::Unbounded()) {
+ CHECK_EXPR(Assignment, Bounds::Unbounded()) {
+ CHECK_VAR(x, Bounds::Unbounded());
+ CHECK_EXPR(Conditional, Bounds::Unbounded()) {
+ CHECK_VAR(a, Bounds::Unbounded());
+ CHECK_VAR(b, Bounds::Unbounded());
+ CHECK_VAR(c, Bounds::Unbounded());
+ }
+ }
+ }
+ }
+ CHECK_TYPES_END
+}
+
+
TEST(VisitEmptyForStatment) {
v8::V8::Initialize();
HandleAndZoneScope handles;
« 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