23 lines · cpp
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-exception6//7//===----------------------------------------------------------------------===//8 9#include "llvm/Support/ToolOutputFile.h"10#include "llvm/Support/FileSystem.h"11#include "gtest/gtest.h"12 13using namespace llvm;14 15namespace {16 17TEST(ToolOutputFileTest, DashOpensOuts) {18 std::error_code EC;19 EXPECT_EQ(&ToolOutputFile("-", EC, sys::fs::OF_None).os(), &outs());20}21 22} // namespace23