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

Side by Side Diff: mojo/dart/embedder/test/validation_unittest.cc

Issue 1132063007: Rationalize Dart mojo and sky package structure (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 7 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 | « mojo/dart/embedder/test/run_dart_tests.cc ('k') | mojo/dart/mojom/BUILD.gn » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stdio.h> 5 #include <stdio.h>
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 .AppendASCII("validation_test.dart"); 53 .AppendASCII("validation_test.dart");
54 54
55 // Read in the source. 55 // Read in the source.
56 std::string source; 56 std::string source;
57 EXPECT_TRUE(ReadFileToString(path, &source)) << "Failed to read test file"; 57 EXPECT_TRUE(ReadFileToString(path, &source)) << "Failed to read test file";
58 58
59 // Setup the package root. 59 // Setup the package root.
60 base::FilePath package_root; 60 base::FilePath package_root;
61 PathService::Get(base::DIR_EXE, &package_root); 61 PathService::Get(base::DIR_EXE, &package_root);
62 package_root = package_root.AppendASCII("gen") 62 package_root = package_root.AppendASCII("gen")
63 .AppendASCII("dart-gen"); 63 .AppendASCII("dart-pkg")
64 .AppendASCII("packages");
64 65
65 char* error = NULL; 66 char* error = NULL;
66 bool unhandled_exception = false; 67 bool unhandled_exception = false;
67 DartControllerConfig config; 68 DartControllerConfig config;
68 config.script = source; 69 config.script = source;
69 // Run with strict compilation even in Release mode so that ASAN testing gets 70 // Run with strict compilation even in Release mode so that ASAN testing gets
70 // coverage of Dart asserts, type-checking, etc. 71 // coverage of Dart asserts, type-checking, etc.
71 config.strict_compilation = true; 72 config.strict_compilation = true;
72 config.script_uri = test; 73 config.script_uri = test;
73 config.package_root = package_root.AsUTF8Unsafe(); 74 config.package_root = package_root.AsUTF8Unsafe();
(...skipping 12 matching lines...) Expand all
86 EXPECT_FALSE(unhandled_exception); 87 EXPECT_FALSE(unhandled_exception);
87 } 88 }
88 89
89 TEST(DartTest, validation) { 90 TEST(DartTest, validation) {
90 RunTest(GetPath()); 91 RunTest(GetPath());
91 } 92 }
92 93
93 } // namespace 94 } // namespace
94 } // namespace dart 95 } // namespace dart
95 } // namespace mojo 96 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/dart/embedder/test/run_dart_tests.cc ('k') | mojo/dart/mojom/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698