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

Unified Diff: test/cctest/test-typing-reset.cc

Issue 1319983004: Refactor type collector testing macros. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix Created 5 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
« no previous file with comments | « test/cctest/test-ast-expression-visitor.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-typing-reset.cc
diff --git a/test/cctest/test-typing-reset.cc b/test/cctest/test-typing-reset.cc
index 1dc701b55439f33897d8fde65efe70f76f150b82..67b123bd56e1b9a74bf126e577fec22bbb335654 100644
--- a/test/cctest/test-typing-reset.cc
+++ b/test/cctest/test-typing-reset.cc
@@ -17,6 +17,8 @@
#include "test/cctest/expression-type-collector.h"
#include "test/cctest/expression-type-collector-macros.h"
+#define INT32_TYPE Bounds(Type::Signed32(), Type::Signed32())
+
using namespace v8::internal;
namespace {
@@ -27,14 +29,13 @@ class TypeSetter : public AstExpressionVisitor {
protected:
void VisitExpression(Expression* expression) {
- expression->set_bounds(Bounds(Type::Integral32()));
+ expression->set_bounds(INT32_TYPE);
}
};
void CheckAllSame(ZoneVector<ExpressionTypeEntry>& types,
Bounds expected_type) {
- HandleAndZoneScope handles;
CHECK_TYPES_BEGIN {
// function logSum
CHECK_EXPR(FunctionLiteral, expected_type) {
@@ -283,7 +284,7 @@ TEST(ResetTypingInfo) {
// Core of the test.
ZoneVector<ExpressionTypeEntry> types(handles.main_zone());
ExpressionTypeCollector(&compilation_info, &types).Run();
- CheckAllSame(types, DEFAULT_TYPE);
+ CheckAllSame(types, Bounds::Unbounded());
TypeSetter(&compilation_info).Run();
@@ -293,5 +294,5 @@ TEST(ResetTypingInfo) {
TypingReseter(&compilation_info).Run();
ExpressionTypeCollector(&compilation_info, &types).Run();
- CheckAllSame(types, DEFAULT_TYPE);
+ CheckAllSame(types, Bounds::Unbounded());
}
« no previous file with comments | « test/cctest/test-ast-expression-visitor.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698