gtest_main_test.cpp 651 B

12345678910111213141516171819202122232425
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. #include "testing/base/gtest_main.h"
  5. #include <gmock/gmock.h>
  6. #include <gtest/gtest.h>
  7. #include "llvm/Support/FileSystem.h"
  8. namespace Carbon::Testing {
  9. namespace {
  10. using ::testing::StrNe;
  11. TEST(TestExePathTest, Test) {
  12. llvm::StringRef exe_path = GetTestExePath();
  13. EXPECT_THAT(exe_path, StrNe(""));
  14. EXPECT_TRUE(llvm::sys::fs::exists(exe_path));
  15. EXPECT_TRUE(llvm::sys::fs::can_execute(exe_path));
  16. }
  17. } // namespace
  18. } // namespace Carbon::Testing