1 //===- ToolOutputFileTest.cpp - ToolOutputFile tests ----------------------===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 9 #include "llvm/Support/ToolOutputFile.h" 10 #include "llvm/Support/FileSystem.h" 11 #include "gtest/gtest.h" 12 13 using namespace llvm; 14 15 namespace { 16 TEST(ToolOutputFileTest,DashOpensOuts)17TEST(ToolOutputFileTest, DashOpensOuts) { 18 std::error_code EC; 19 EXPECT_EQ(&ToolOutputFile("-", EC, sys::fs::OF_None).os(), &outs()); 20 } 21 22 } // namespace 23