Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(629)

Unified Diff: tests/DiscardableMemoryPool.cpp

Issue 185923002: Rename test files to end with Test.cpp. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gyp/tests.gypi ('k') | tests/DiscardableMemoryPoolTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/DiscardableMemoryPool.cpp
diff --git a/tests/DiscardableMemoryPool.cpp b/tests/DiscardableMemoryPool.cpp
deleted file mode 100644
index dc927bd4b782e4a8db3d1eb2321a20194638a4bf..0000000000000000000000000000000000000000
--- a/tests/DiscardableMemoryPool.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2013 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-#include "SkDiscardableMemoryPool.h"
-
-#include "Test.h"
-
-DEF_TEST(DiscardableMemoryPool, reporter) {
- SkAutoTUnref<SkDiscardableMemoryPool> pool(
- SkNEW_ARGS(SkDiscardableMemoryPool, (1, NULL)));
- pool->setRAMBudget(3);
- REPORTER_ASSERT(reporter, 0 == pool->getRAMUsed());
-
- SkAutoTDelete<SkDiscardableMemory> dm1(pool->create(100));
- REPORTER_ASSERT(reporter, dm1->data() != NULL);
- REPORTER_ASSERT(reporter, 100 == pool->getRAMUsed());
- dm1->unlock();
- REPORTER_ASSERT(reporter, 0 == pool->getRAMUsed());
- REPORTER_ASSERT(reporter, !dm1->lock());
-
-
- SkAutoTDelete<SkDiscardableMemory> dm2(pool->create(200));
- REPORTER_ASSERT(reporter, 200 == pool->getRAMUsed());
- pool->setRAMBudget(400);
- dm2->unlock();
- REPORTER_ASSERT(reporter, 200 == pool->getRAMUsed());
- REPORTER_ASSERT(reporter, dm2->lock());
- dm2->unlock();
- pool->dumpPool();
- REPORTER_ASSERT(reporter, !dm2->lock());
- REPORTER_ASSERT(reporter, 0 == pool->getRAMUsed());
-}
« no previous file with comments | « gyp/tests.gypi ('k') | tests/DiscardableMemoryPoolTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698