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

Unified Diff: runtime/bin/fuchsia_test.cc

Issue 2117593002: Fuchsia: Initial check-in. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address comments Created 4 years, 6 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/bin/bin.gypi ('k') | runtime/lib/timeline.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/fuchsia_test.cc
diff --git a/runtime/bin/fuchsia_test.cc b/runtime/bin/fuchsia_test.cc
new file mode 100644
index 0000000000000000000000000000000000000000..802ff31fabaa8c5628ab8a483900e7a57b271489
--- /dev/null
+++ b/runtime/bin/fuchsia_test.cc
@@ -0,0 +1,39 @@
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <dart_api.h>
+
+int main(void) {
+ fprintf(stderr, "Calling Dart_SetVMFlags\n");
+ fflush(stderr);
+ if (!Dart_SetVMFlags(0, NULL)) {
+ fprintf(stderr, "Failed to set flags\n");
+ fflush(stderr);
+ return -1;
+ }
+ fprintf(stderr, "Calling Dart_Initialize\n");
+ fflush(stderr);
+ char* error = Dart_Initialize(
+ NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL);
+ if (error != NULL) {
+ fprintf(stderr, "VM initialization failed: %s\n", error);
+ fflush(stderr);
+ free(error);
+ return -1;
+ }
+ fprintf(stderr, "Success!\n");
+ fflush(stderr);
+ return 0;
+}
« no previous file with comments | « runtime/bin/bin.gypi ('k') | runtime/lib/timeline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698