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

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

Issue 2833073002: Stoppp using trippple consonants (Closed)
Patch Set: More spolling Created 3 years, 8 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
« no previous file with comments | « runtime/observatory/tests/service/service_test_common.dart ('k') | runtime/vm/exceptions.cc » ('j') | 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 "bin/builtin.h" 5 #include "bin/builtin.h"
6 #include "vm/compiler.h" 6 #include "vm/compiler.h"
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "include/dart_mirrors_api.h" 8 #include "include/dart_mirrors_api.h"
9 #include "include/dart_native_api.h" 9 #include "include/dart_native_api.h"
10 #include "include/dart_tools_api.h" 10 #include "include/dart_tools_api.h"
(...skipping 2049 matching lines...) Expand 10 before | Expand all | Expand 10 after
2060 "Internal Dart data pointers have been acquired, " 2060 "Internal Dart data pointers have been acquired, "
2061 "please release them using Dart_TypedDataReleaseData."); 2061 "please release them using Dart_TypedDataReleaseData.");
2062 } 2062 }
2063 2063
2064 // Now modify the values in the directly accessible array and then check 2064 // Now modify the values in the directly accessible array and then check
2065 // it we see the changes back in dart. 2065 // it we see the changes back in dart.
2066 for (int i = 0; i < kLength; i++) { 2066 for (int i = 0; i < kLength; i++) {
2067 dataP[i] += 10; 2067 dataP[i] += 10;
2068 } 2068 }
2069 2069
2070 // Release direct accesss to the typed data object. 2070 // Release direct access to the typed data object.
2071 result = Dart_TypedDataReleaseData(array); 2071 result = Dart_TypedDataReleaseData(array);
2072 EXPECT_VALID(result); 2072 EXPECT_VALID(result);
2073 2073
2074 // Invoke the dart function in order to check the modified values. 2074 // Invoke the dart function in order to check the modified values.
2075 result = Dart_Invoke(lib, NewString("testMain"), 1, dart_args); 2075 result = Dart_Invoke(lib, NewString("testMain"), 1, dart_args);
2076 EXPECT_VALID(result); 2076 EXPECT_VALID(result);
2077 } 2077 }
2078 2078
2079 2079
2080 static void TestTypedDataDirectAccess1() { 2080 static void TestTypedDataDirectAccess1() {
(...skipping 7833 matching lines...) Expand 10 before | Expand all | Expand 10 after
9914 EXPECT_VALID(result); 9914 EXPECT_VALID(result);
9915 result = Dart_FinalizeLoading(false); 9915 result = Dart_FinalizeLoading(false);
9916 EXPECT_VALID(result); 9916 EXPECT_VALID(result);
9917 result = Dart_Invoke(lib, NewString("foozoo"), 0, NULL); 9917 result = Dart_Invoke(lib, NewString("foozoo"), 0, NULL);
9918 EXPECT(Dart_IsError(result)); 9918 EXPECT(Dart_IsError(result));
9919 } 9919 }
9920 9920
9921 #endif // !PRODUCT 9921 #endif // !PRODUCT
9922 9922
9923 } // namespace dart 9923 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/observatory/tests/service/service_test_common.dart ('k') | runtime/vm/exceptions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698