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

Unified Diff: test/cctest/test-field-type-tracking.cc

Issue 2292953002: Make FieldType::None() non-nullptr value to avoid undefined behaviour (Closed)
Patch Set: (fix build by removing unused var in test) Created 4 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 | « src/field-type.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-field-type-tracking.cc
diff --git a/test/cctest/test-field-type-tracking.cc b/test/cctest/test-field-type-tracking.cc
index 9f2a6848ccfc362a961486007de9bc6638a03e3d..ae63feaedb9689d003d8e4c4ce7a41a599296ca1 100644
--- a/test/cctest/test-field-type-tracking.cc
+++ b/test/cctest/test-field-type-tracking.cc
@@ -17,6 +17,7 @@
#include "src/global-handles.h"
#include "src/ic/stub-cache.h"
#include "src/macro-assembler.h"
+#include "src/types.h"
using namespace v8::internal;
@@ -2410,6 +2411,16 @@ TEST(TransitionAccessorConstantToSameAccessorConstant) {
TestTransitionTo(transition_op, transition_op, checker);
}
+TEST(FieldTypeConvertSimple) {
+ CcTest::InitializeVM();
+ v8::HandleScope scope(CcTest::isolate());
+ Isolate* isolate = CcTest::i_isolate();
+
+ Zone zone(isolate->allocator());
+
+ CHECK_EQ(FieldType::Any()->Convert(&zone), Type::NonInternal());
+ CHECK_EQ(FieldType::None()->Convert(&zone), Type::None());
+}
// TODO(ishell): add this test once IS_ACCESSOR_FIELD_SUPPORTED is supported.
// TEST(TransitionAccessorConstantToAnotherAccessorConstant)
« no previous file with comments | « src/field-type.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698