Flutter Engine
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 
5 #include "flutter/shell/platform/common/cpp/path_utils.h"
6 
7 #include "gtest/gtest.h"
8 
9 namespace flutter {
10 
11 // Tests that GetExecutableDirectory returns a valid, absolute path.
12 TEST(PathUtilsTest, ExecutableDirector) {
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
DEF_SWITCHES_START snapshot asset path
Definition: switches.h:32
std::filesystem::path GetExecutableDirectory()
Definition: path_utils.cc:16
TEST(DartServiceIsolateTest, CanAddAndRemoveHandles)