OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "platform/globals.h" | 5 #include "platform/globals.h" |
6 | 6 |
7 #include "include/dart_debugger_api.h" | 7 #include "include/dart_debugger_api.h" |
8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
9 #include "vm/bigint_operations.h" | 9 #include "vm/bigint_operations.h" |
10 #include "vm/class_finalizer.h" | 10 #include "vm/class_finalizer.h" |
(...skipping 2699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2710 | 2710 |
2711 result = Dart_RunLoop(); | 2711 result = Dart_RunLoop(); |
2712 EXPECT(Dart_IsError(result)); | 2712 EXPECT(Dart_IsError(result)); |
2713 EXPECT(Dart_ErrorHasException(result)); | 2713 EXPECT(Dart_ErrorHasException(result)); |
2714 EXPECT_SUBSTRING("Exception: nulltruefalse123456æøå3.14[]100123456789\n", | 2714 EXPECT_SUBSTRING("Exception: nulltruefalse123456æøå3.14[]100123456789\n", |
2715 Dart_GetError(result)); | 2715 Dart_GetError(result)); |
2716 | 2716 |
2717 Dart_ExitScope(); | 2717 Dart_ExitScope(); |
2718 } | 2718 } |
2719 | 2719 |
| 2720 |
| 2721 TEST_CASE(OmittedObjectEncodingLength) { |
| 2722 StackZone zone(Isolate::Current()); |
| 2723 uint8_t* buffer; |
| 2724 MessageWriter writer(&buffer, &zone_allocator); |
| 2725 writer.WriteInlinedObjectHeader(kOmittedObjectId); |
| 2726 // For performance, we'd like single-byte headers when ids are omitted. |
| 2727 // If this starts failing, consider renumbering the snapshot ids. |
| 2728 EXPECT_EQ(1, writer.BytesWritten()); |
| 2729 } |
| 2730 |
2720 } // namespace dart | 2731 } // namespace dart |
OLD | NEW |