mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 00:39:49 +00:00
3c298dbca5
TEST=build Change-Id: I18fc7cfe725dc978d4b23de6191e455ac7cd75e5 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/293800 Reviewed-by: Siva Annamalai <asiva@google.com> Commit-Queue: Ryan Macnak <rmacnak@google.com>
24 lines
587 B
C++
24 lines
587 B
C++
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
#include "bin/test_utils.h"
|
|
#include "bin/file.h"
|
|
|
|
namespace dart {
|
|
namespace bin {
|
|
namespace test {
|
|
|
|
const char* GetFileName(const char* name) {
|
|
if (bin::File::Exists(nullptr, name)) {
|
|
return name;
|
|
} else {
|
|
const int kRuntimeLength = strlen("runtime/");
|
|
return name + kRuntimeLength;
|
|
}
|
|
}
|
|
|
|
} // namespace test
|
|
} // namespace bin
|
|
} // namespace dart
|