summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Testing/Support/CMakeLists.txt
Commit message (Collapse)AuthorAgeFilesLines
* [Testing] Move clangd::Annotations to llvm testing supportIlya Biryukov2019-04-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | Summary: Annotations allow writing nice-looking unit test code when one needs access to locations from the source code, e.g. running code completion at particular offsets in a file. See comments in Annotations.cpp for more details on the API. Also got rid of a duplicate annotations parsing code in clang's code complete tests. Reviewers: gribozavr, sammccall Reviewed By: gribozavr Subscribers: mgorny, hiraditya, ioeric, MaskRay, jkorous, arphaman, kadircet, jdoerfert, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D59814 llvm-svn: 359179
* Add support for unittest inputs.Zachary Turner2018-09-051-0/+1
| | | | | | | | | | | | | | | | | | | | | Occasionally it is useful to have unittest which take inputs. While we normally try to have this test be more of a lit test we occasionally don't have tools that can exercise the code in the right way to test certain things. LLDB has been using this style of unit test for a while, particularly with regards to how it tests core dump and minidump file parsing. Recently i needed this as well for the case where we want to test that some of the PDB reading code works correctly. It needs to exercise the code in a way that is not covered by any dumper and would be impractical to implement in one of the dumpers, but requires a valid PDB file. Since this is now needed by more than one project, it makes sense to have this be a generally supported thing that unit tests can do, and we just encourage people to use this sparingly. Differential Revision: https://reviews.llvm.org/D51561 llvm-svn: 341502
* [LLVMTestingSupport] Add explicit linkage to LLVMSupportMichal Gorny2018-04-081-1/+4
| | | | | | | | | | Explicitly link LLVMTestingSupport library against LLVMSupport. This is necessary to fix linking errors when LLVMTestingSupport is built as a shared library (with BUILD_SHARED_LIBS=ON) and -Wl,-z,defs is used. Differential Revision: https://reviews.llvm.org/D45408 llvm-svn: 329522
* Force #define GTEST_LANG_CXX11.Zachary Turner2017-10-271-0/+3
| | | | | | | | | | | | | | | | | | gtest depends on this #define to determine whether it can use various classes like std::tuple, or whether it has to fall back to experimental classes in the std::tr1 namespace. The check in the current version of gtest relies on the value of the `__cplusplus` macro, but MSVC provides a non-conformant value of this macro, making it effectively impossible to detect C++11. In short, LLVM compiled with MSVC has been silently using the tr1 versions of several classes since the beginning of time. This would normally be pretty benign, except that in the latest preview of MSVC they have marked all of the tr1 classes deprecated, so it spews thousands of warnings. llvm-svn: 316798
* [gtest] Create a shared include directory for gtest utilities.Zachary Turner2017-06-141-0/+12
Many times unit tests for different libraries would like to use the same helper functions for checking common types of errors. This patch adds a common library with helpers for testing things in Support, and introduces helpers in here for integrating the llvm::Error and llvm::Expected<T> classes with gtest and gmock. Normally, we would just be able to write: EXPECT_THAT(someFunction(), succeeded()); but due to some quirks in llvm::Error's move semantics, gmock doesn't make this easy, so two macros EXPECT_THAT_ERROR() and EXPECT_THAT_EXPECTED() are introduced to gloss over the difficulties. Consider this an exception, and possibly only temporary as we look for ways to improve this. Differential Revision: https://reviews.llvm.org/D33059 llvm-svn: 305395
OpenPOWER on IntegriCloud