Flutter Engine
dart_project_unittests.cc
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include <memory>
6 #include <string>
7 
8 #include "flutter/shell/platform/windows/client_wrapper/include/flutter/dart_project.h"
9 #include "gtest/gtest.h"
10 
11 namespace flutter {
12 
13 class DartProjectTest : public ::testing::Test {
14  protected:
15  // Wrapper for accessing private icu_data_path.
16  std::wstring GetProjectIcuDataPath(const DartProject& project) {
17  return project.icu_data_path();
18  }
19 
20  // Wrapper for accessing private assets_path.
21  std::wstring GetProjectAssetsPath(const DartProject& project) {
22  return project.assets_path();
23  }
24 
25  // Wrapper for accessing private aot_library_path_.
26  std::wstring GetProjectAotLibraryPath(const DartProject& project) {
27  return project.aot_library_path();
28  }
29 };
30 
31 TEST_F(DartProjectTest, StandardProjectFormat) {
32  DartProject project(L"test");
33  EXPECT_EQ(GetProjectIcuDataPath(project), L"test\\icudtl.dat");
34  EXPECT_EQ(GetProjectAssetsPath(project), L"test\\flutter_assets");
35  EXPECT_EQ(GetProjectAotLibraryPath(project), L"test\\app.so");
36 }
37 
38 } // namespace flutter
std::wstring GetProjectIcuDataPath(const DartProject &project)
TEST_F(EngineTest, Create)
std::wstring GetProjectAotLibraryPath(const DartProject &project)
std::wstring GetProjectAssetsPath(const DartProject &project)