Daniel Dunbar
e23388b25c
Support writing a StringRef to a raw_ostream directly.
...
llvm-svn: 76754
2009-07-22 17:13:20 +00:00
Daniel Dunbar
1f982105a6
Add StringRef::{substr, startswith}.
...
llvm-svn: 76559
2009-07-21 09:18:49 +00:00
Daniel Dunbar
25f9fc5851
Add StringRef class, with fixes.
...
llvm-svn: 76543
2009-07-21 07:28:51 +00:00
Torok Edwin
e32cd94b47
unbreak unit-tests on gcc-4.4.
...
llvm-svn: 76542
2009-07-21 07:09:05 +00:00
Daniel Dunbar
e5df197e70
Add SmallString unit test.
...
- Patch by Ryan Flynn!
llvm-svn: 76081
2009-07-16 17:00:06 +00:00
Daniel Dunbar
6d6023b5f7
Clarify a FIXME.
...
llvm-svn: 75422
2009-07-12 19:45:34 +00:00
Dan Gohman
10f1733d9a
Reapply 74494, this time removing the conflicting definition of operator<<
...
in APIntTest.cpp.
llvm-svn: 74550
2009-06-30 20:10:56 +00:00
Daniel Dunbar
ec6fdb6750
Revert my intentional breakage.
...
llvm-svn: 74531
2009-06-30 16:26:57 +00:00
Daniel Dunbar
c9de159696
Intentionally break a unittest to test my buildbot gtest command.
...
- Apologies in advance for the noise.
llvm-svn: 74530
2009-06-30 16:11:58 +00:00
Misha Brukman
67a1ffa59c
Reversed order of args in EXPECT_EQ() macros to be in the correct order:
...
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.
llvm-svn: 73150
2009-06-09 21:48:57 +00:00
Stuart Hastings
e54523d56e
Prevent looping when DenseSet is abused.
...
llvm-svn: 70572
2009-05-01 20:47:53 +00:00
Chris Lattner
b869a0ade1
Fix PR4040: APInt's string constructor is too strict
...
patch by Jeff Yasskin!
llvm-svn: 70058
2009-04-25 18:34:04 +00:00
Owen Anderson
d4f5537c5e
Use the testcase from PR2791.
...
llvm-svn: 69846
2009-04-23 00:15:26 +00:00
Misha Brukman
680336d12f
* Fixed calls to APInt ctor to work for negative values on Darwin/x86
...
* Converted C-style casts to C++-style casts
llvm-svn: 68613
2009-04-08 16:17:23 +00:00
Daniel Dunbar
4abd56677d
Add llvm::Triple class for abstracting access to target triples.
...
- 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.
llvm-svn: 68252
2009-04-01 21:53:23 +00:00
Misha Brukman
d1d2c50ea7
Converted a1.ll to unittests.
...
llvm-svn: 67652
2009-03-24 21:36:09 +00:00
Misha Brukman
5182b758a0
Renamed unittest files to have a consistent {Tt}est suffix.
...
llvm-svn: 67326
2009-03-19 19:09:48 +00:00
Bill Wendling
b9ad4921fd
Fix comment.
...
llvm-svn: 64137
2009-02-09 12:31:40 +00:00
Torok Edwin
ec39eb8519
APInt's countLeadingOnes() was broken for negative i128 values,
...
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.
llvm-svn: 63107
2009-01-27 18:06:03 +00:00
Nick Lewycky
ee22611e33
Port this test from dejagnu to unit testing.
...
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.
llvm-svn: 62514
2009-01-19 18:08:33 +00:00
Bill Wendling
8d069ef872
Fix naming of file.
...
llvm-svn: 62035
2009-01-11 01:25:51 +00:00
Bill Wendling
c56c37f039
Adding unittests for SmallVector. Test by Talin.
...
llvm-svn: 62025
2009-01-10 12:56:31 +00:00
Bill Wendling
2a6dad5f0f
Some generic clean-ups. Also make the StringMapEntryInitializer specialization apply only to the tests that are actually testing it.
...
llvm-svn: 61923
2009-01-08 09:31:36 +00:00
Bill Wendling
691c20d8fb
* Don't explicitly cast "0" to "void*". This doesn't work well with specialized
...
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.
llvm-svn: 61922
2009-01-08 08:26:46 +00:00
Bill Wendling
453b4d5204
80-column violation fix.
...
llvm-svn: 61919
2009-01-08 07:35:39 +00:00
Misha Brukman
017e49897e
* Added unittests for StringMap
...
* Fixed but in StringMap::clear()
* Removed trailing whitespace
Original patch by Talin.
llvm-svn: 61914
2009-01-08 04:48:20 +00:00
Misha Brukman
204b1d2268
Minor cleanup for unittest:
...
* Fixed {copy,assignment} constructor test names
* s/EXPECT_EQ(true, ...)/ASSERT_TRUE(...)/
Patch by Talin.
llvm-svn: 61883
2009-01-07 21:13:53 +00:00
Nuno Lopes
2216c9804d
improve test and address Misha's comments
...
llvm-svn: 61609
2009-01-03 14:55:26 +00:00
Bill Wendling
aeac31c8a1
Reassign the buffer to the pointer so that we don't overwrite memory.
...
llvm-svn: 61596
2009-01-02 23:13:30 +00:00
Nuno Lopes
533eac8204
fist short at a new unit test for ImmutableSets. no bugs found, though :P
...
llvm-svn: 61576
2009-01-02 13:49:50 +00:00
Misha Brukman
bcf15388ab
Original patch by Talin.
...
* Added the first LLVM unittest -- DenseMap.
* Updated mkpatch utility to include llvm/unittests dir
* Added top-level target "unittests" to run all unittests
llvm-svn: 61541
2009-01-01 02:24:48 +00:00