Flutter Windows Embedder
path_utils_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 
6 
7 #include "gtest/gtest.h"
8 
9 namespace flutter {
10 
11 // Tests that GetExecutableDirectory returns a valid, absolute path.
12 TEST(PathUtilsTest, ExecutableDirector) {
13  std::filesystem::path exe_directory = GetExecutableDirectory();
14 #if defined(__linux__) || defined(_WIN32)
15  EXPECT_EQ(exe_directory.empty(), false);
16  EXPECT_EQ(exe_directory.is_absolute(), true);
17 #else
18  // On platforms where it's not implemented, it should indicate that
19  // by returning an empty path.
20  EXPECT_EQ(exe_directory.empty(), true);
21 #endif
22 }
23 
24 } // namespace flutter
flutter::TEST
TEST(FlutterEngineTest, CreateDestroy)
Definition: flutter_engine_unittests.cc:103
flutter::GetExecutableDirectory
std::filesystem::path GetExecutableDirectory()
Definition: path_utils.cc:16
path_utils.h
flutter
Definition: accessibility_bridge_windows.cc:11