Index: test/cctest/test-api.cc |
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc |
index 28a9be159937b9f1399efa6f7de5e9734751ba55..19492a53278f5fdb714633a941775f7a94945ab5 100644 |
--- a/test/cctest/test-api.cc |
+++ b/test/cctest/test-api.cc |
@@ -11380,6 +11380,9 @@ static int ExternalArrayElementSize(v8::ExternalArrayType array_type) { |
case v8::kExternalFloatArray: |
return 4; |
break; |
+ case v8::kExternalDoubleArray: |
+ return 8; |
+ break; |
default: |
UNREACHABLE(); |
return -1; |
@@ -11569,7 +11572,8 @@ static void ExternalArrayTestHelper(v8::ExternalArrayType array_type, |
CHECK_EQ( |
2, static_cast<int>(jsobj->GetElement(6)->ToObjectChecked()->Number())); |
- if (array_type != v8::kExternalFloatArray) { |
+ if (array_type != v8::kExternalFloatArray && |
+ array_type != v8::kExternalDoubleArray) { |
// Though the specification doesn't state it, be explicit about |
// converting NaNs and +/-Infinity to zero. |
result = CompileRun("for (var i = 0; i < 8; i++) {" |
@@ -11966,6 +11970,14 @@ THREADED_TEST(ExternalFloatArray) { |
} |
+THREADED_TEST(ExternalDoubleArray) { |
+ ExternalArrayTestHelper<i::ExternalDoubleArray, double>( |
+ v8::kExternalDoubleArray, |
+ -500, |
+ 500); |
+} |
+ |
+ |
THREADED_TEST(ExternalArrays) { |
TestExternalByteArray(); |
TestExternalUnsignedByteArray(); |
@@ -12003,6 +12015,7 @@ THREADED_TEST(ExternalArrayInfo) { |
ExternalArrayInfoTestHelper(v8::kExternalIntArray); |
ExternalArrayInfoTestHelper(v8::kExternalUnsignedIntArray); |
ExternalArrayInfoTestHelper(v8::kExternalFloatArray); |
+ ExternalArrayInfoTestHelper(v8::kExternalDoubleArray); |
ExternalArrayInfoTestHelper(v8::kExternalPixelArray); |
} |