Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
shell
platform
common
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/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) {
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
TEST
#define TEST(S, s, D, expected)
Definition
FitsInTest.cpp:15
flutter
Definition
asset_manager.cc:10
flutter::GetExecutableDirectory
std::filesystem::path GetExecutableDirectory()
Definition
path_utils.cc:16
Generated on Fri Apr 26 2024 06:14:23 for Flutter Engine by
1.9.8