summaryrefslogtreecommitdiff
path: root/unittests
Commit message (Collapse)AuthorAge
...
* remove support for "NoSub" from regex. It seems like a minor optimizationChris Lattner2009-09-26
| | | | | | | and makes the API more annoying. Add a Regex::getNumMatches() method. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82877 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a compile failure introduced by r82675 on MinGW which doesn't haveJeffrey Yasskin2009-09-25
| | | | | | | | setenv(). This patch just disables the test rather than getting putenv() to work. Thanks to Sandeep Patel for reporting the problem. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82797 91177308-0d34-0410-b5e6-96231b3b80d8
* add and document regex support for FileCheck. You can now do stuff like:Chris Lattner2009-09-24
| | | | | | | | | | ; CHECK: movl {{%e[a-z][xi]}}, %eax or whatever. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82717 91177308-0d34-0410-b5e6-96231b3b80d8
* Roll back r82348, which introduced an infinite loop in ParseCStringVector() thatJeffrey Yasskin2009-09-24
| | | | | | | | | a trivial unittest would have caught. This revision also adds the trivial unittest. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82675 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a few more conversion warnings on 4.0Daniel Dunbar2009-09-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82232 91177308-0d34-0410-b5e6-96231b3b80d8
* Another try at fixing compile warnings on 4.0Daniel Dunbar2009-09-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82148 91177308-0d34-0410-b5e6-96231b3b80d8
* Add StringRef::{rfind, rsplit}Daniel Dunbar2009-09-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82087 91177308-0d34-0410-b5e6-96231b3b80d8
* Drop the raw_ostream required buffer size to 1.Daniel Dunbar2009-09-15
| | | | | | | - As best I can tell, we have eliminated all the code which used to require a larger buffer size. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81912 91177308-0d34-0410-b5e6-96231b3b80d8
* Attempt to fix some 4.0.0 build warnings.Daniel Dunbar2009-09-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81752 91177308-0d34-0410-b5e6-96231b3b80d8
* Build (not test) the unittests as part of a normal build.Daniel Dunbar2009-09-13
| | | | | | | - 'make unittests' still builds and tests. - 'make unitcheck' inside a unittest directory runs the tests in that directory. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81725 91177308-0d34-0410-b5e6-96231b3b80d8
* Move unittest driver to utils/unittest/UnitTestMain.Daniel Dunbar2009-09-13
| | | | | | | - This eliminates a race between building the unittests and linking the UnitTestMain library. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81719 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert unittests build changes temporarily, the unit test build isn't -j safe.Daniel Dunbar2009-09-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81692 91177308-0d34-0410-b5e6-96231b3b80d8
* Build (not test) the unittests as part of a normal build.Daniel Dunbar2009-09-13
| | | | | | | - 'make unittests' still builds and tests. - 'make unitcheck' inside a unittest directory runs the tests in that directory. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81687 91177308-0d34-0410-b5e6-96231b3b80d8
* Make TypeBuilder's result depend on the LLVMContext it's passed.Jeffrey Yasskin2009-09-09
| | | | | | | | | TypeBuilder was using a local static variable to cache its result. This made it ignore changes in its LLVMContext argument and always return a type constructed from the argument to the first call. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81316 91177308-0d34-0410-b5e6-96231b3b80d8
* Update unittests for MDNode uniquing disable.Daniel Dunbar2009-09-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81142 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify, now that gtest supports raw_ostream directly.Daniel Dunbar2009-09-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81102 91177308-0d34-0410-b5e6-96231b3b80d8
* Now that googletest can print ConstantRange, use EXPECT_EQ when testing forNick Lewycky2009-09-05
| | | | | | | | equality. Prefer EXPECT_EQ(foo, Full) over EXPECT_TRUE(foo.isFullSet()) because the former will print out the contents of the constant range that failed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81094 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach googletest to use raw_ostream instead of just std::ostream.Jeffrey Yasskin2009-09-05
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81093 91177308-0d34-0410-b5e6-96231b3b80d8
* Add test for PR4873, which works for me.Daniel Dunbar2009-09-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80965 91177308-0d34-0410-b5e6-96231b3b80d8
* Now Bitcode reader bug is fixed. Reapply 80839.Devang Patel2009-09-03
| | | | | | | | | | Use CallbackVH, instead of WeakVH, to hold MDNode elements. Use FoldingSetNode to unique MDNodes in a context. Use CallbackVH hooks to update context's MDNodeSet appropriately. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80868 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 80839 for now. It causes test failures.Devang Patel2009-09-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80841 91177308-0d34-0410-b5e6-96231b3b80d8
* Use CallbackVH, instead of WeakVH, to hold MDNode elements. Devang Patel2009-09-02
| | | | | | | | | Use FoldingSetNode to unique MDNodes in a context. Use CallbackVH hooks to update context's MDNodeSet appropriately. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80839 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable uniqueness test for now.Devang Patel2009-09-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80741 91177308-0d34-0410-b5e6-96231b3b80d8
* update unit test for previous change.Chris Lattner2009-08-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80528 91177308-0d34-0410-b5e6-96231b3b80d8
* Add regular expression matching support, based on OpenBSD regexec()/regcomp()Torok Edwin2009-08-30
| | | | | | | implementation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80493 91177308-0d34-0410-b5e6-96231b3b80d8
* split raw_os_ostream out to its own header and implementation file. ThisChris Lattner2009-08-24
| | | | | | | | means that raw_ostream no longer has to #include <iosfwd>. Nothing in llvm should use raw_os_ostream.h, but llvm-gcc and some unit tests do. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79886 91177308-0d34-0410-b5e6-96231b3b80d8
* Unbreak unit tests.Daniel Dunbar2009-08-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79879 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix off-by-one in llvm::Format::print.Daniel Dunbar2009-08-23
| | | | | | | | | | | | | - This also shortens the Format.h implementation, and uses the print buffer fully (it was wasting a character). - This manifested as llvm-test failures, because one side effect was that raw_ostream would write garbage '\x00' values into the output stream if it happened that the string was at the end of the buffer. This meant that grep would report 'Binary file matches', which meant the silly pattern matching llvm-test eventually does would fail. Cute. :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79862 91177308-0d34-0410-b5e6-96231b3b80d8
* convert all the constant range EXPECT_EQ tests to use EXPECT_TRUE since Chris Lattner2009-08-23
| | | | | | | ConstantRange doesn't have an std::ostream inserter anymore. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79831 91177308-0d34-0410-b5e6-96231b3b80d8
* upgrade for removed functions.Chris Lattner2009-08-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79822 91177308-0d34-0410-b5e6-96231b3b80d8
* Correct for recent assert change.Bill Wendling2009-08-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79601 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bug with APInt::getBitsNeeded with for base 10 numbers 0-9.Erick Tryzelaar2009-08-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79593 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow '+' to appear in APInt strings, and add more unit tests.Erick Tryzelaar2009-08-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79592 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for including '+' in APFloat strings, more asserts,Erick Tryzelaar2009-08-20
| | | | | | and many new unit tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79574 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix two APFloat bugs in converting hexadecimal constants.Daniel Dunbar2009-08-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79540 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed header comment.Misha Brukman2009-08-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79536 91177308-0d34-0410-b5e6-96231b3b80d8
* Add min and max tests.Daniel Dunbar2009-08-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79454 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove SmallString::append_*int* unit tests.Benjamin Kramer2009-08-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79451 91177308-0d34-0410-b5e6-96231b3b80d8
* Add SmallVector::{capacity,set_size}.Daniel Dunbar2009-08-19
| | | | | | | | - These allow clients to make use of the extra elements in the vector which have already been allocated, without requiring them to be value initialized. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79433 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve Triple to recognize the OS in i386-mingw32.Daniel Dunbar2009-08-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79359 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix pasto in StringRef::count(char)Daniel Dunbar2009-08-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79356 91177308-0d34-0410-b5e6-96231b3b80d8
* Add StringRef::count({char,StringRef})Daniel Dunbar2009-08-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79354 91177308-0d34-0410-b5e6-96231b3b80d8
* Wrap unit test death tests in GTEST_HAS_DEATH_TESTErick Tryzelaar2009-08-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79218 91177308-0d34-0410-b5e6-96231b3b80d8
* Change APFloatTest from using ASSERTs to EXPECTsErick Tryzelaar2009-08-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79216 91177308-0d34-0410-b5e6-96231b3b80d8
* Modify APFloat to take a StringRef instead of a c string.Erick Tryzelaar2009-08-16
| | | | | | | This also adds unit tests to APFloat that mainly tests the string handling of APFloat, but not much else of it's api. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79210 91177308-0d34-0410-b5e6-96231b3b80d8
* Add failure tests to APInt unit test.Erick Tryzelaar2009-08-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79209 91177308-0d34-0410-b5e6-96231b3b80d8
* Push LLVMContexts through the IntegerType APIs.Owen Anderson2009-08-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78948 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert APint::{fromString,APInt,getBitsNeeded} to use StringRef.Daniel Dunbar2009-08-13
| | | | | | | - Patch by Erick Tryzelaar, with some edits (and a bug fix) from me. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78885 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix unit test on FreeBSD. We need to make sure there is enough space to save ↵Benjamin Kramer2009-08-12
| | | | | | the pointer even if the memory returned from malloc was already aligned. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78805 91177308-0d34-0410-b5e6-96231b3b80d8
* StringRef: Add find(char) and find(StringRef).Daniel Dunbar2009-08-11
| | | | | | | Also, regroup functions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78712 91177308-0d34-0410-b5e6-96231b3b80d8