summaryrefslogtreecommitdiffstats
path: root/llvm/utils/unittest/googletest/include
Commit message (Collapse)AuthorAgeFilesLines
* Fixed -Wdeprecated-copy warnings in gtest. NFCI.Dávid Bolvanský2019-11-242-79/+79
|
* reland [gtest] Fix printing of StringRef and SmallString in assert messages.Sam McCall2019-08-212-2/+29
| | | | | | | | | Renames GTEST_NO_LLVM_RAW_OSTREAM -> GTEST_NO_LLVM_SUPPORT and guards the new features behind it. This reverts commit a063bcf3ef5a879adbe9639a3c187d876eee0e66. llvm-svn: 369527
* Revert "[gtest] Fix printing of StringRef and SmallString in assert messages."Sam McCall2019-08-211-29/+0
| | | | | | This reverts commit 4becb2ab4e9f52ce98272d1f5930d6942af5172b. llvm-svn: 369525
* [gtest] Fix printing of StringRef and SmallString in assert messages.Sam McCall2019-08-211-0/+29
| | | | | | | | | | | | | | | | | | Summary: These are detected by gtest as containers, and so previously printed as e.g. { '.' (46, 0x2E), 's' (115, 0x73), 'e' (101, 0x65), 'c' (99, 0x63), '0' (48, 0x30) }, gtest itself overloads PrintTo for std::string and friends, we use the same mechanism. Reviewers: labath Subscribers: dexonsmith, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66520 llvm-svn: 369518
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* [ADT] Add streaming operators for llvm::OptionalPavel Labath2019-01-181-1/+14
| | | | | | | | | | | | | | | | | | | | | | | Summary: The operators simply print the underlying value or "None". The trickier part of this patch is making sure the streaming operators work even in unit tests (which was my primary motivation, though I can also see them being useful elsewhere). Since the stream operator was a template, implicit conversions did not kick in, and our gtest glue code was explicitly introducing an implicit conversion to make sure other implicit conversions do not kick in :P. I resolve that by specializing llvm_gtest::StreamSwitch for llvm:Optional<T>. Reviewers: sammccall, dblaikie Reviewed By: sammccall Subscribers: mgorny, dexonsmith, kristina, llvm-commits Differential Revision: https://reviews.llvm.org/D56795 llvm-svn: 351548
* Revert r326092: [gtest] Add PrintTo overload for StringRef.Ilya Biryukov2018-02-261-13/+0
| | | | | | | | | It seems to break the following buildbot: http://lab.llvm.org:8011/builders/sanitizer-windows/builds/24729 Will resubmit after investigating and fixing it. llvm-svn: 326096
* [gtest] Add PrintTo overload for StringRef.Ilya Biryukov2018-02-261-0/+13
| | | | | | | | | | | | | | | | Summary: It was printed using code for generic containers before, resulting in unreadable output. Reviewers: sammccall, labath Reviewed By: sammccall, labath Subscribers: labath, zturner, llvm-commits Differential Revision: https://reviews.llvm.org/D43330 llvm-svn: 326092
* [gtest] Support raw_ostream printing functions more comprehensively.Sam McCall2018-02-123-41/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: These are functions like operator<<(raw_ostream&, Foo). Previously these were only supported for messages. In the assertion EXPECT_EQ(A, B) << C; the local modifications would explicitly try to use raw_ostream printing for C. However A and B would look for a std::ostream printing function, and often fall back to gtest's default "168 byte object <00 01 FE 42 ...>". This patch pulls out the raw_ostream support into a new header under `custom/`. I changed the mechanism: instead of a convertible stream, we wrap the printed value in a proxy object to allow it to be sent to a std::ostream. I think the new way is clearer. I also changed the policy: we prefer raw_ostream printers over std::ostream ones. This is because the fallback printers are defined using std::ostream, while all the raw_ostream printers should be "good". Reviewers: ilya-biryukov, chandlerc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D43091 llvm-svn: 324876
* Fix typos of occurred and occurrenceMalcolm Parsons2018-01-241-1/+1
| | | | llvm-svn: 323318
* Add NetBSD to the list of platforms supporting death tests. Two unitJoerg Sonnenberger2017-05-052-1/+3
| | | | | | tests require this for compilation. llvm-svn: 302264
* [gtest] Work around broken installs of libc++ where we don't haveChandler Carruth2017-01-051-1/+7
| | | | | | | | | | | | | | | | | | | a cxxabi.h in the include search paths. This comes up when libc++ is installed with some other abi library. At some points in time in history we have had CMake hackery to try and get a cxxabi.h installed that would work, but there are lots of examples lacking this. Also, the just-built tree with libc++ seems to not quite get this right. To let folks make progress, we can easily work around this by detecting that the header is missing and disabling the relevant parts of gtest. This should fix the last remainging build bot failures. While these failures are typically indicative of a questionable install, I don't think gtest should be the thing that surfaces those issues and I don't want folks blocked on this. llvm-svn: 291063
* Patch gtest to move GTEST_IS_THREADSAFE out of unrelated GTEST_HAS_SEH ifdefReid Kleckner2017-01-051-2/+2
| | | | | | | Fixes the sanitizer Windows build, which happens to set -DGTEST_HAS_SEH=0. llvm-svn: 291038
* [gtest] Upgrade googletest to version 1.8.0, minimizing local changes.Chandler Carruth2017-01-0423-1293/+2984
| | | | | | | | | This required re-working the streaming support and lit's support for '--gtest_list_tests' but otherwise seems to be a clean upgrade. Differential Revision: https://reviews.llvm.org/D28154 llvm-svn: 291029
* Fix undefined behavior in llvm's local changes to googletest.Nico Weber2016-01-191-1/+4
| | | | | | | | | r100895 landed an llvm-only change to add minix support to googletest. It did that by putting "defined()" in a macro, which has undefined behavior. Slightly reshuffle things to remove that undefined behavior. Also mention in README.LLVM that minix support is a local change. llvm-svn: 258190
* Revert r240271 (Fixed/added namespace ending comments using clang-tidy. NFC)Alexander Kornienko2015-06-231-1/+1
| | | | llvm-svn: 240393
* Fixed/added namespace ending comments using clang-tidy. NFCAlexander Kornienko2015-06-221-1/+1
| | | | | | A few more files that were fixed while preparing r240270. llvm-svn: 240271
* Use 'override/final' instead of 'virtual' for overridden methodsAlexander Kornienko2015-04-117-38/+40
| | | | | | | | | | | | | | The patch is generated using clang-tidy misc-use-override check. This command was used: tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py \ -checks='-*,misc-use-override' -header-filter='llvm|clang' \ -j=32 -fix -format http://reviews.llvm.org/D8925 llvm-svn: 234679
* Fix a grammar issue I introduced.Chandler Carruth2015-03-111-1/+1
| | | | llvm-svn: 231894
* Inspired by r231891, use gender neutral pronouns in the places I'veChandler Carruth2015-03-112-2/+2
| | | | | | found in LLVM. llvm-svn: 231893
* Avoid explicitly declaring the copy assignment operator, as this ↵David Blaikie2015-03-031-3/+0
| | | | | | unnecessarily makes the copy ctor deprecated in C++11 llvm-svn: 231095
* Support GTest for FreeBSD platforms (9.x)Alexey Samsonov2014-02-191-2/+7
| | | | | | Patch by Viktor Kutuzov! llvm-svn: 201683
* Comment out unused macro because of warningRenato Golin2014-01-301-0/+3
| | | | | | | | Modern compilers (Clang 3.4, GCC 4.8) warn on variadic macros being introduced in C99, which produces a huge number of useless diagnostics since this macro is unused in the whole project. llvm-svn: 200479
* [weak vtables] Remove a bunch of weak vtablesJuergen Ributzka2013-11-196-9/+11
| | | | | | | | | | | | This patch removes most of the trivial cases of weak vtables by pinning them to a single object file. The memory leaks in this version have been fixed. Thanks Alexey for pointing them out. Differential Revision: http://llvm-reviews.chandlerc.com/D2068 Reviewed by Andy llvm-svn: 195064
* Revert r194865 and r194874.Alexey Samsonov2013-11-186-11/+9
| | | | | | | | | | | | This change is incorrect. If you delete virtual destructor of both a base class and a subclass, then the following code: Base *foo = new Child(); delete foo; will not cause the destructor for members of Child class. As a result, I observe plently of memory leaks. Notable examples I investigated are: ObjectBuffer and ObjectBufferStream, AttributeImpl and StringSAttributeImpl. llvm-svn: 194997
* [weak vtables] Remove a bunch of weak vtablesJuergen Ributzka2013-11-156-9/+11
| | | | | | | | | | | This patch removes most of the trivial cases of weak vtables by pinning them to a single object file. Differential Revision: http://llvm-reviews.chandlerc.com/D2068 Reviewed by Andy llvm-svn: 194865
* Move all of the GoogleTest files back to the same locations they occupyChandler Carruth2013-11-151-1037/+0
| | | | | | | | | | | | | externally to simplify our integration of GoogleTest into LLVM. Also, build the single source file gtest-all.cc instead of the individual source files as we don't expect these to change and thus gain nothing from increased incrementality in compiles. This makes our standard build of googletest exactly like upstream's recommended build and the sanitizer's build. It also simplifies the steps of importing a new version should we ever want one. llvm-svn: 194801
* Modify the LLVM checkout of googletest:Alexey Samsonov2012-12-061-0/+9
| | | | | | | | | | | 1) don't delete gtest-all.cc (which is used to gather all gtest source files in a single file) 2) make including LLVMSupport headers optional (on by default). Sanitizer tools may want to use their own versions of googletest compiled with specific flags, instead of the common googletest library used for all other LLVM/Clang unittests. llvm-svn: 169559
* Revert 'Fix a typo 'iff' => 'if''. iff is an abreviation of if and only if. ↵Sylvestre Ledru2012-09-2710-64/+64
| | | | | | See: http://en.wikipedia.org/wiki/If_and_only_if Commit 164767 llvm-svn: 164768
* Fix a typo 'iff' => 'if'Sylvestre Ledru2012-09-2710-64/+64
| | | | llvm-svn: 164767
* Fix Android build of gtest and lib/Support.Evgeniy Stepanov2012-09-041-1/+1
| | | | llvm-svn: 163131
* Remove dead private member variables from gtest.Benjamin Kramer2012-06-062-3/+1
| | | | llvm-svn: 158101
* Remove unreachable defaults from gtest.David Blaikie2012-01-211-2/+0
| | | | | | This will ensure LLVM and Clang build -Wswitch-enum-redundant-default (an on-by-default warning I'm about to add to Clang). llvm-svn: 148639
* Merge gtest-1.6.0.Jay Foad2011-07-2720-755/+2252
| | | | llvm-svn: 136212
* Fix a ton of comment typos found by codespell. Patch byChris Lattner2011-04-151-1/+1
| | | | | | Luis Felipe Strano Moraes! llvm-svn: 129558
* Fixes warnings emitted by Visual Studio 2010 compiler.Oscar Fuentes2011-03-011-0/+2
| | | | | | Patch by Erik Olofsson! llvm-svn: 126796
* CMake: Build unittests.Michael J. Spencer2010-09-241-1/+2
| | | | llvm-svn: 114725
* Revert r111082. No warnings for this common pattern.Argyrios Kyrtzidis2010-08-151-2/+2
| | | | llvm-svn: 111102
* Add ATTRIBUTE_UNUSED to methods that are not supposed to be used.Argyrios Kyrtzidis2010-08-141-2/+2
| | | | llvm-svn: 111082
* Don't link against libm and libpthread which don't exist in BeOS/Haiku. Also,Nick Lewycky2010-06-231-3/+4
| | | | | | Haiku like Linux provides <regex.h>, so use it. Patch by Paul Davey! llvm-svn: 106620
* Merge gtest-1.5.0.Benjamin Kramer2010-06-0218-736/+1111
| | | | llvm-svn: 105354
* Merge gtest-1.4.0.Benjamin Kramer2010-06-0215-840/+2734
| | | | llvm-svn: 105353
* Merge gtest-1.3.0.Benjamin Kramer2010-06-0214-162/+533
| | | | | | | OSX users: make sure that CrashReporter is disabled when running unit tests. Death tests are enabled now so you'll get a ton of message boxes. llvm-svn: 105352
* Fix -Asserts warnings.Daniel Dunbar2010-04-131-0/+1
| | | | llvm-svn: 101191
* add minix support, patch by Kees van Reeuwijk! PR6797Chris Lattner2010-04-091-1/+2
| | | | llvm-svn: 100895
* Fix an issue in googletest where a name was used before it was defined.Eli Friedman2009-12-181-1/+6
| | | | llvm-svn: 91718
* Haiku porting patches, Credit to Paul Davey.Edward O'Callaghan2009-10-121-1/+3
| | | | llvm-svn: 83823
* Teach googletest to use raw_ostream instead of just std::ostream.Jeffrey Yasskin2009-09-051-1/+21
| | | | | | | | This can break when there are implicit conversions from types raw_ostream understands but std::ostream doesn't, but it increases the number of cases that Just Work. llvm-svn: 81093
* * Removed gtest-all.cc; .cc files including other .cc files is weirdMisha Brukman2009-01-011-0/+1267
| | | | | | | | | | | | | * Removed gtest_main.cc: we have our own main() elsewhere * Simplified the Makefile as we don't need SOURCES * Moved the internal header to gtest/internal/ * Simplified the Makefile to remove -I param to CPP.Flags * Updated README.LLVM with all the steps I took to massage GTest to work in LLVM so far llvm-svn: 61540
* Import of Google Test 1.2.1, with the non-essential bits removed.Misha Brukman2008-12-3118-0/+15442
Added a README.LLVM file to indicate which files and directories were removed from the original source tarball. llvm-svn: 61526
OpenPOWER on IntegriCloud