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