diff options
author | Elliott Hughes <enh@google.com> | 2011-08-30 13:27:07 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2011-08-30 13:27:45 -0700 |
commit | 90a3369d3b6238f1a4c9b19ca68978dab1c39bc4 (patch) | |
tree | b66ec9b2cced5713bd5902c499d57b533d2e7a9a /src/space_test.cc | |
parent | 34023801bd544e613d6e85c9a5b2e743f3710e8f (diff) | |
download | art-90a3369d3b6238f1a4c9b19ca68978dab1c39bc4.zip art-90a3369d3b6238f1a4c9b19ca68978dab1c39bc4.tar.gz art-90a3369d3b6238f1a4c9b19ca68978dab1c39bc4.tar.bz2 |
Switch to UniquePtr.
Only one use of scoped_ptr was incorrect (but then again, I spent an afternoon
with valgrind finding and fixing them just last week).
Change-Id: If5ec1c8aa0794a4f652bfd1c0fffccf95facdc40
Diffstat (limited to 'src/space_test.cc')
-rw-r--r-- | src/space_test.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/space_test.cc b/src/space_test.cc index 7384021..2e6932d 100644 --- a/src/space_test.cc +++ b/src/space_test.cc @@ -5,31 +5,31 @@ #include "gtest/gtest.h" #include "globals.h" -#include "scoped_ptr.h" +#include "UniquePtr.h" namespace art { TEST(SpaceTest, Init) { { // Less than - scoped_ptr<Space> space(Space::Create(16 * MB, 32 * MB, NULL)); - EXPECT_TRUE(space != NULL); + UniquePtr<Space> space(Space::Create(16 * MB, 32 * MB, NULL)); + EXPECT_TRUE(space.get() != NULL); } { // Equal to - scoped_ptr<Space> space(Space::Create(16 * MB, 16 * MB, NULL)); - EXPECT_TRUE(space != NULL); + UniquePtr<Space> space(Space::Create(16 * MB, 16 * MB, NULL)); + EXPECT_TRUE(space.get() != NULL); } { // Greater than - scoped_ptr<Space> space(Space::Create(32 * MB, 16 * MB, NULL)); - EXPECT_TRUE(space == NULL); + UniquePtr<Space> space(Space::Create(32 * MB, 16 * MB, NULL)); + EXPECT_TRUE(space.get() == NULL); } } TEST(SpaceTest, AllocAndFree) { - scoped_ptr<Space> space(Space::Create(4 * MB, 16 * MB, NULL)); - ASSERT_TRUE(space != NULL); + UniquePtr<Space> space(Space::Create(4 * MB, 16 * MB, NULL)); + ASSERT_TRUE(space.get() != NULL); // Succeeds, fits without adjusting the max allowed footprint. void* ptr1 = space->AllocWithoutGrowth(1 * MB); |