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

Unified Diff: runtime/vm/snapshot_test.cc

Issue 23816010: "Reverting 27298" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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 | « runtime/vm/dart_api_message.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/snapshot_test.cc
diff --git a/runtime/vm/snapshot_test.cc b/runtime/vm/snapshot_test.cc
index fdcf6c027809cf135dd45fd9d83da584780eb27e..0aac46188161548b76891dd2ffcf28f9c38a6f8c 100644
--- a/runtime/vm/snapshot_test.cc
+++ b/runtime/vm/snapshot_test.cc
@@ -131,15 +131,6 @@ static void CheckEncodeDecodeMessage(Dart_CObject* root) {
CompareDartCObjects(root, new_root);
}
-
-static void ExpectEncodeFail(Dart_CObject* root) {
- uint8_t* buffer = NULL;
- ApiMessageWriter writer(&buffer, &malloc_allocator);
- const bool result = writer.WriteCMessage(root);
- EXPECT_EQ(false, result);
-}
-
-
TEST_CASE(SerializeNull) {
StackZone zone(Isolate::Current());
@@ -589,58 +580,6 @@ TEST_CASE(SerializeArray) {
}
-TEST_CASE(FailSerializeLargeArray) {
- Dart_CObject root;
- root.type = Dart_CObject_kArray;
- root.value.as_array.length = Array::kMaxElements + 1;
- root.value.as_array.values = NULL;
- ExpectEncodeFail(&root);
-}
-
-
-TEST_CASE(FailSerializeLargeNestedArray) {
- Dart_CObject parent;
- Dart_CObject child;
- Dart_CObject* values[1] = { &child };
-
- parent.type = Dart_CObject_kArray;
- parent.value.as_array.length = 1;
- parent.value.as_array.values = values;
- child.type = Dart_CObject_kArray;
- child.value.as_array.length = Array::kMaxElements + 1;
- ExpectEncodeFail(&parent);
-}
-
-
-TEST_CASE(FailSerializeLargeTypedDataInt8) {
- Dart_CObject root;
- root.type = Dart_CObject_kTypedData;
- root.value.as_typed_data.type = Dart_TypedData_kInt8;
- root.value.as_typed_data.length =
- TypedData::MaxElements(kTypedDataInt8ArrayCid) + 1;
- ExpectEncodeFail(&root);
-}
-
-
-TEST_CASE(FailSerializeLargeTypedDataUint8) {
- Dart_CObject root;
- root.type = Dart_CObject_kTypedData;
- root.value.as_typed_data.type = Dart_TypedData_kUint8;
- root.value.as_typed_data.length =
- TypedData::MaxElements(kTypedDataUint8ArrayCid) + 1;
- ExpectEncodeFail(&root);
-}
-
-
-TEST_CASE(FailSerializeLargeExternalTypedData) {
- Dart_CObject root;
- root.type = Dart_CObject_kExternalTypedData;
- root.value.as_typed_data.length =
- ExternalTypedData::MaxElements(kExternalTypedDataUint8ArrayCid) + 1;
- ExpectEncodeFail(&root);
-}
-
-
TEST_CASE(SerializeEmptyArray) {
StackZone zone(Isolate::Current());
« no previous file with comments | « runtime/vm/dart_api_message.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698