gtest_main.cpp 563 B

1234567891011121314151617
  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 <gtest/gtest.h>
  5. #include "common/init_llvm.h"
  6. #include "testing/base/global_exe_path.h"
  7. auto main(int argc, char** argv) -> int {
  8. // Initialize LLVM first, as that will also handle ensuring UTF-8 encoding.
  9. Carbon::InitLLVM init_llvm(argc, argv);
  10. Carbon::Testing::SetExePath(argv[0]);
  11. testing::InitGoogleTest(&argc, argv);
  12. return RUN_ALL_TESTS();
  13. }