brintos

brintos / llvm-project-archived public Read only

0
0
Text · 950 B · 4d86e79 Raw
29 lines · c
1//===-- PipeTestUtilities.cpp ---------------------------------------------===//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#ifndef LLDB_UNITTESTS_TESTINGSUPPORT_PIPETESTUTILITIES_H10#define LLDB_UNITTESTS_TESTINGSUPPORT_PIPETESTUTILITIES_H11 12#include "lldb/Host/Pipe.h"13#include "llvm/Testing/Support/Error.h"14#include "gtest/gtest.h"15 16/// A base class for tests that need a pair of pipes for communication.17class PipePairTest : public testing::Test {18protected:19  lldb_private::Pipe input;20  lldb_private::Pipe output;21 22  void SetUp() override {23    ASSERT_THAT_ERROR(input.CreateNew().ToError(), llvm::Succeeded());24    ASSERT_THAT_ERROR(output.CreateNew().ToError(), llvm::Succeeded());25  }26};27 28#endif29