From c946d46283b2578055c47de9b7ef7d182cd9a2ac Mon Sep 17 00:00:00 2001 From: Zachary Turner Date: Fri, 13 Nov 2015 01:24:35 +0000 Subject: gtest - Make a `PythonTestSuite` base class for setup / teardown. This allows other potential unit test suites (of which one is forthcoming in a subsequent patch) to re-use the same initialization and teardown of the GIL. llvm-svn: 252993 --- .../ScriptInterpreter/Python/PythonTestSuite.h | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.h (limited to 'lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.h') diff --git a/lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.h b/lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.h new file mode 100644 index 00000000000..461fc1d5676 --- /dev/null +++ b/lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.h @@ -0,0 +1,26 @@ +//===-- PythonTestSuite.cpp -------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "gtest/gtest.h" + +using namespace lldb_private; + +class PythonTestSuite : public testing::Test +{ +public: + void + SetUp() override; + + void + TearDown() override; + +private: + PyGILState_STATE m_gil_state; +}; + -- cgit v1.2.3