Flutter Engine
The Flutter Engine
test_utils.cc
Go to the documentation of this file.
1// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
2// for details. All rights reserved. Use of this source code is governed by a
3// BSD-style license that can be found in the LICENSE file.
4
5#include "bin/test_utils.h"
6#include "bin/file.h"
7
8namespace dart {
9namespace bin {
10namespace test {
11
12const char* GetFileName(const char* name) {
13 if (bin::File::Exists(nullptr, name)) {
14 return name;
15 } else {
16 const int kRuntimeLength = strlen("runtime/");
17 return name + kRuntimeLength;
18 }
19}
20
21} // namespace test
22} // namespace bin
23} // namespace dart
static bool Exists(Namespace *namespc, const char *path)
const char * GetFileName(const char *name)
Definition: test_utils.cc:12
Definition: dart_vm.cc:33
const char *const name