Displaying 5 results from an estimated 5 matches for "uintmap".
Did you mean:
uintmax
2008 Dec 27
0
[LLVMdev] [Patch] Adding unit tests to LLVM
...quot; for inclusion rather than <llvm/foo.h>
* You should use the same format for gtest headers
* If reverse iteration isn't supported, you should either have an
ASSERT_DEATH() on the decrement, or not have the code there (that's
commented out) at all.
* Instead of this:
EXPECT_TRUE(uintMap[0] == 1);
you should use EXPECT_EQ()
* Instead of this:
EXPECT_TRUE(uintMap.find(0u) == uintMap.begin());
is it possible to use EXPECT_EQ() as well?
* In this test:
TEST_F(DenseMapTest, IterationTest) {
you use the array "int numbers[100];" as an array of booleans; why not
make it "...
2008 Dec 27
1
[LLVMdev] [Patch] Adding unit tests to LLVM
...e same format for gtest headers
>
> * If reverse iteration isn't supported, you should either have an
> ASSERT_DEATH() on the decrement, or not have the code there (that's
> commented out) at all.
>
I'll probably just remove it.
> * Instead of this:
> EXPECT_TRUE(uintMap[0] == 1);
> you should use EXPECT_EQ()
>
Sure.
> * Instead of this:
> EXPECT_TRUE(uintMap.find(0u) == uintMap.begin());
> is it possible to use EXPECT_EQ() as well?
>
In order to use EXPECT_EQ, both arguments have to be printable, although
you can make anything printable by...
2008 Dec 23
6
[LLVMdev] [Patch] Adding unit tests to LLVM
(Forwarding this to llvm-dev)
This patch adds a unit test framework to LLVM, along with a sample unit test
for DenseMap. I don't expect this patch to be accepted as-is, this is mainly
a trial balloon and proof of concept.
Some notes about the patch:
1) For the testing framework, I went with Google Test, since it's the one I
have the most experience with. I fully expect an extended
2008 Dec 27
3
[LLVMdev] [Patch] Adding unit tests to LLVM
...vm/foo.h>
> * You should use the same format for gtest headers
>
> * If reverse iteration isn't supported, you should either have an
> ASSERT_DEATH() on the decrement, or not have the code there (that's
> commented out) at all.
>
> * Instead of this:
> EXPECT_TRUE(uintMap[0] == 1);
> you should use EXPECT_EQ()
>
> * Instead of this:
> EXPECT_TRUE(uintMap.find(0u) == uintMap.begin());
> is it possible to use EXPECT_EQ() as well?
>
> * In this test:
> TEST_F(DenseMapTest, IterationTest) {
> you use the array "int numbers[100];" as...
2008 Dec 27
0
[LLVMdev] [Patch] Adding unit tests to LLVM
...vm/foo.h>
> * You should use the same format for gtest headers
>
> * If reverse iteration isn't supported, you should either have an
> ASSERT_DEATH() on the decrement, or not have the code there (that's
> commented out) at all.
>
> * Instead of this:
> EXPECT_TRUE(uintMap[0] == 1);
> you should use EXPECT_EQ()
>
> * Instead of this:
> EXPECT_TRUE(uintMap.find(0u) == uintMap.begin());
> is it possible to use EXPECT_EQ() as well?
>
> * In this test:
> TEST_F(DenseMapTest, IterationTest) {
> you use the array "int numbers[100];" as...