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

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

Issue 8495001: Fix the build. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 9 years, 1 month 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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 6
7 #include "vm/assert.h" 7 #include "vm/assert.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/unit_test.h" 10 #include "vm/unit_test.h"
11 #include "vm/utils.h" 11 #include "vm/utils.h"
12 #include "vm/verifier.h" 12 #include "vm/verifier.h"
13 13
14 namespace dart { 14 namespace dart {
15 15
16 #if defined(TARGET_ARCH_IA32)
16 UNIT_TEST_CASE(Dart_Error) { 17 UNIT_TEST_CASE(Dart_Error) {
17 Dart_CreateIsolate(NULL, NULL); 18 Dart_CreateIsolate(NULL, NULL);
18 Dart_EnterScope(); 19 Dart_EnterScope();
19 20
20 Dart_Handle error = Dart_Error("An %s", "error"); 21 Dart_Handle error = Dart_Error("An %s", "error");
21 EXPECT(!Dart_IsValid(error)); 22 EXPECT(!Dart_IsValid(error));
22 EXPECT_STREQ("An error", Dart_GetError(error)); 23 EXPECT_STREQ("An error", Dart_GetError(error));
23 24
24 Dart_ExitScope(); 25 Dart_ExitScope();
25 Dart_ShutdownIsolate(); 26 Dart_ShutdownIsolate();
26 } 27 }
28 #endif
27 29
28 30
29 UNIT_TEST_CASE(Null) { 31 UNIT_TEST_CASE(Null) {
30 Dart_CreateIsolate(NULL, NULL); 32 Dart_CreateIsolate(NULL, NULL);
31 Dart_EnterScope(); // Enter a Dart API scope for the unit test. 33 Dart_EnterScope(); // Enter a Dart API scope for the unit test.
32 34
33 Dart_Handle null = Dart_Null(); 35 Dart_Handle null = Dart_Null();
34 EXPECT_VALID(null); 36 EXPECT_VALID(null);
35 EXPECT(Dart_IsNull(null)); 37 EXPECT(Dart_IsNull(null));
36 38
(...skipping 1937 matching lines...) Expand 10 before | Expand all | Expand 10 after
1974 NULL); 1976 NULL);
1975 EXPECT_VALID(result); 1977 EXPECT_VALID(result);
1976 1978
1977 Dart_ExitScope(); // Exit the Dart API scope. 1979 Dart_ExitScope(); // Exit the Dart API scope.
1978 } 1980 }
1979 Dart_ShutdownIsolate(); 1981 Dart_ShutdownIsolate();
1980 } 1982 }
1981 #endif // TARGET_ARCH_IA32. 1983 #endif // TARGET_ARCH_IA32.
1982 1984
1983 } // namespace dart 1985 } // 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