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

Side by Side Diff: runtime/vm/dart_api_impl_test.cc

Issue 9340001: Test again the library url in the error message shortened in r3965. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "include/dart_api.h" 5 #include "include/dart_api.h"
6 #include "platform/assert.h" 6 #include "platform/assert.h"
7 #include "platform/utils.h" 7 #include "platform/utils.h"
8 #include "vm/dart_api_impl.h" 8 #include "vm/dart_api_impl.h"
9 #include "vm/dart_api_state.h" 9 #include "vm/dart_api_state.h"
10 #include "vm/thread.h" 10 #include "vm/thread.h"
(...skipping 1477 matching lines...) Expand 10 before | Expand all | Expand 10 after
1488 1488
1489 // Invoke a function which returns an object of type NativeFields. 1489 // Invoke a function which returns an object of type NativeFields.
1490 result = Dart_InvokeStatic(lib, 1490 result = Dart_InvokeStatic(lib,
1491 Dart_NewString("NativeFieldsTest"), 1491 Dart_NewString("NativeFieldsTest"),
1492 Dart_NewString("testMain"), 1492 Dart_NewString("testMain"),
1493 0, 1493 0,
1494 NULL); 1494 NULL);
1495 // We expect the test script to fail finalization with the error below: 1495 // We expect the test script to fail finalization with the error below:
1496 EXPECT(Dart_IsError(result)); 1496 EXPECT(Dart_IsError(result));
1497 Dart_Handle expected_error = Dart_Error( 1497 Dart_Handle expected_error = Dart_Error(
1498 "'dart:test-lib': Error: line 1 pos 38: class 'NativeFields' is trying"); 1498 "'dart:test-lib': Error: line 1 pos 38: "
1499 "class 'NativeFields' is trying to extend a native fields class, "
1500 "but library '%s' has no native resolvers",
1501 TestCase::url());
1499 EXPECT_SUBSTRING(Dart_GetError(expected_error), Dart_GetError(result)); 1502 EXPECT_SUBSTRING(Dart_GetError(expected_error), Dart_GetError(result));
1500 } 1503 }
1501 1504
1502 1505
1503 static void TestNativeFields(Dart_Handle retobj) { 1506 static void TestNativeFields(Dart_Handle retobj) {
1504 // Access and set various instance fields of the object. 1507 // Access and set various instance fields of the object.
1505 Dart_Handle result = Dart_GetInstanceField(retobj, Dart_NewString("fld3")); 1508 Dart_Handle result = Dart_GetInstanceField(retobj, Dart_NewString("fld3"));
1506 EXPECT(Dart_IsError(result)); 1509 EXPECT(Dart_IsError(result));
1507 result = Dart_GetInstanceField(retobj, Dart_NewString("fld0")); 1510 result = Dart_GetInstanceField(retobj, Dart_NewString("fld0"));
1508 EXPECT_VALID(result); 1511 EXPECT_VALID(result);
(...skipping 1712 matching lines...) Expand 10 before | Expand all | Expand 10 after
3221 // We should have received the expected number of interrupts. 3224 // We should have received the expected number of interrupts.
3222 EXPECT_EQ(kInterruptCount, interrupt_count); 3225 EXPECT_EQ(kInterruptCount, interrupt_count);
3223 3226
3224 // Give the spawned thread enough time to properly exit. 3227 // Give the spawned thread enough time to properly exit.
3225 Isolate::SetInterruptCallback(saved); 3228 Isolate::SetInterruptCallback(saved);
3226 } 3229 }
3227 3230
3228 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64). 3231 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64).
3229 3232
3230 } // namespace dart 3233 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698