summaryrefslogtreecommitdiff
path: root/unittests
Commit message (Collapse)AuthorAge
* Reapply 74494, this time removing the conflicting definition of operator<<Dan Gohman2009-06-30
| | | | | | | in APIntTest.cpp. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74550 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert my intentional breakage.Daniel Dunbar2009-06-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74531 91177308-0d34-0410-b5e6-96231b3b80d8
* Intentionally break a unittest to test my buildbot gtest command.Daniel Dunbar2009-06-30
| | | | | | | - Apologies in advance for the noise. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74530 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix order of arguments to EXPECT_EQDaniel Dunbar2009-06-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74441 91177308-0d34-0410-b5e6-96231b3b80d8
* Call doInitialization(), releaseMemory(), and doFinalization() for ↵Torok Edwin2009-06-29
| | | | | | | | | | | on-the-fly passes as well. Also don't call finalizers for LoopPass if initialization was not called. Add a unittest that tests that these methods are called, in the proper order, and the correct number of times. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74438 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a JITEventListener interface that gets called back when a new function isJeffrey Yasskin2009-06-25
| | | | | | | | | | emitted or the machine code for a function is freed. Chris mentioned that we may also want a notification when a stub is emitted, but that'll be a future change. I intend to use this to tell oprofile where functions are emitted and what lines correspond to what addresses. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74157 91177308-0d34-0410-b5e6-96231b3b80d8
* Sketch streamer support for .align, .org functionality.Daniel Dunbar2009-06-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74109 91177308-0d34-0410-b5e6-96231b3b80d8
* We decided to not worry about Atoms for now, it should be straightforward toDaniel Dunbar2009-06-24
| | | | | | | | | reintroduce them later. Also, don't require MCSection* when creating a symbol. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74081 91177308-0d34-0410-b5e6-96231b3b80d8
* MCStreamer: Test printing values.Daniel Dunbar2009-06-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74076 91177308-0d34-0410-b5e6-96231b3b80d8
* Start MCAsmStreamer implementation.Daniel Dunbar2009-06-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74044 91177308-0d34-0410-b5e6-96231b3b80d8
* Reversed order of args in EXPECT_EQ() macros to be in the correct order:Misha Brukman2009-06-09
| | | | | | | | EXPECT_EQ(expected, actual) . This will make error messages understandable as it uses terms such as "expected" and "actual" based on the order of arguments. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73150 91177308-0d34-0410-b5e6-96231b3b80d8
* Give embedded metadata its own type instead of relying on EmptyStructTy.Nick Lewycky2009-05-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72610 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a compile warning.Daniel Dunbar2009-05-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71993 91177308-0d34-0410-b5e6-96231b3b80d8
* Make MDNode use CallbackVH. Also change MDNode to store Value* instead ofNick Lewycky2009-05-10
| | | | | | | | Constant* in preperation of a future change to support holding non-Constants in an MDNode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71407 91177308-0d34-0410-b5e6-96231b3b80d8
* Apply Jeffrey Yasskin's CallbackVH patch, with minor tweaks from meDan Gohman2009-05-02
| | | | | | | | to make the copy constructor and destructor protected, and corresponding adjustments to the unittests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70644 91177308-0d34-0410-b5e6-96231b3b80d8
* Prevent looping when DenseSet is abused.Stuart Hastings2009-05-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70572 91177308-0d34-0410-b5e6-96231b3b80d8
* Add tests for WeakVH and AssertingVH. These pointed out that the overloads forJeffrey Yasskin2009-04-27
| | | | | | | | the comparison operators were not only unnecessary in the presence of the implicit conversion; they caused ambiguous overload errors. So I deleted them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70243 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new TypeBuilder helper class, which eases making LLVM IR types.Chris Lattner2009-04-25
| | | | | | | Patch by Jeffrey Yasskin! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70084 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR4040: APInt's string constructor is too strictChris Lattner2009-04-25
| | | | | | | patch by Jeff Yasskin! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70058 91177308-0d34-0410-b5e6-96231b3b80d8
* "I got annoyed at the compiler warnings from ConstantInt::get(Ty, -1,Chris Lattner2009-04-24
| | | | | | | | | | | | true), and casts make me nervous and are verbose anyway, so here's a ConstantInt::getSigned(Ty, int64_t) method. Just overloading ConstantInt::get() to take an int64_t too would cause ambiguous overload errors." Patch by Jeffrey Yasskin! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69958 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the testcase from PR2791.Owen Anderson2009-04-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69846 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix pointer casting problem.Nick Lewycky2009-04-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68668 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed compiler warning.Misha Brukman2009-04-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68664 91177308-0d34-0410-b5e6-96231b3b80d8
* * Fixed calls to APInt ctor to work for negative values on Darwin/x86Misha Brukman2009-04-08
| | | | | | | | * Converted C-style casts to C++-style casts git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68613 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for embedded metadata to LLVM. This introduces two new types ofNick Lewycky2009-04-04
| | | | | | | | | Constant, MDString and MDNode which can only be used by globals with a name that starts with "llvm." or as arguments to a function with the same naming restriction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68420 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the constants fit.Bill Wendling2009-04-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68258 91177308-0d34-0410-b5e6-96231b3b80d8
* Add llvm::Triple class for abstracting access to target triples.Daniel Dunbar2009-04-01
| | | | | | | | | | | - The code is silly, I'm just amusing myself. Rewrite to be efficient if you like. :) Also, if you wish to debate the proper names of the triple components I'm all ears. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68252 91177308-0d34-0410-b5e6-96231b3b80d8
* Added tests for math utility functions; fixed another test's header comment.Misha Brukman2009-04-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68249 91177308-0d34-0410-b5e6-96231b3b80d8
* include Makefile.common before using $(BuildMode) to get its definitionMisha Brukman2009-04-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68167 91177308-0d34-0410-b5e6-96231b3b80d8
* Converted a1.ll to unittests.Misha Brukman2009-03-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67652 91177308-0d34-0410-b5e6-96231b3b80d8
* Renamed unittest files to have a consistent {Tt}est suffix.Misha Brukman2009-03-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67326 91177308-0d34-0410-b5e6-96231b3b80d8
* Minimal raw_ostream unit testsDaniel Dunbar2009-03-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67083 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove libtool.Nick Lewycky2009-02-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65517 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix comment.Bill Wendling2009-02-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64137 91177308-0d34-0410-b5e6-96231b3b80d8
* APInt's countLeadingOnes() was broken for negative i128 values,Torok Edwin2009-01-27
| | | | | | | | | | causing assertion failures in getSExtValue(). Fix it by making highWordBits actually contain what its name says, and add some more unit-tests for APInt. This fixes PR3419. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63107 91177308-0d34-0410-b5e6-96231b3b80d8
* Port this test from dejagnu to unit testing.Nick Lewycky2009-01-19
| | | | | | | | | | The way this worked before was to test APInt by running "lli -force-interpreter=true" knowing the lli uses APInt under the hood to store its values. Now, we test APInt directly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62514 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix naming of file.Bill Wendling2009-01-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62035 91177308-0d34-0410-b5e6-96231b3b80d8
* Adding unittests for SmallVector. Test by Talin.Bill Wendling2009-01-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62025 91177308-0d34-0410-b5e6-96231b3b80d8
* Some generic clean-ups. Also make the StringMapEntryInitializer ↵Bill Wendling2009-01-08
| | | | | | specialization apply only to the tests that are actually testing it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61923 91177308-0d34-0410-b5e6-96231b3b80d8
* * Don't explicitly cast "0" to "void*". This doesn't work well with specializedBill Wendling2009-01-08
| | | | | | | | | | StringMapEntryInitializer classes. Leave it for the compiler to figure out what the type is and what "0" should be transformed into. * Un-disable the unit tests which test the StringMapEntryInitializer class. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61922 91177308-0d34-0410-b5e6-96231b3b80d8
* 80-column violation fix.Bill Wendling2009-01-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61919 91177308-0d34-0410-b5e6-96231b3b80d8
* * Added unittests for StringMapMisha Brukman2009-01-08
| | | | | | | | | | * Fixed but in StringMap::clear() * Removed trailing whitespace Original patch by Talin. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61914 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor cleanup for unittest:Misha Brukman2009-01-07
| | | | | | | | | | * Fixed {copy,assignment} constructor test names * s/EXPECT_EQ(true, ...)/ASSERT_TRUE(...)/ Patch by Talin. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61883 91177308-0d34-0410-b5e6-96231b3b80d8
* Modify the unittests Makefiles so that they don't rebuild parts of LLVM just toBill Wendling2009-01-04
| | | | | | | run the tests. Most of this was stolen from the llvm/test Makefiles. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61648 91177308-0d34-0410-b5e6-96231b3b80d8
* improve test and address Misha's commentsNuno Lopes2009-01-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61609 91177308-0d34-0410-b5e6-96231b3b80d8
* Reassign the buffer to the pointer so that we don't overwrite memory.Bill Wendling2009-01-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61596 91177308-0d34-0410-b5e6-96231b3b80d8
* fist short at a new unit test for ImmutableSets. no bugs found, though :PNuno Lopes2009-01-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61576 91177308-0d34-0410-b5e6-96231b3b80d8
* make 'make clean' remove test binaries as wellNuno Lopes2009-01-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61572 91177308-0d34-0410-b5e6-96231b3b80d8
* Original patch by Talin.Misha Brukman2009-01-01
* Added the first LLVM unittest -- DenseMap. * Updated mkpatch utility to include llvm/unittests dir * Added top-level target "unittests" to run all unittests git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61541 91177308-0d34-0410-b5e6-96231b3b80d8