aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2015-09-14 11:11:17 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-09-14 11:11:17 -0700
commit5a744b780190adbe6f210ffa4da9693b66d87afd (patch)
treeab91a6d0146cd85d89387f1f34503dbced17ae78 /tests
parenta46ada5635351cf3ceefa1a3570212a21c2a8224 (diff)
Have SkVarAlloc::alloc() use sk_malloc_throw.
Very right, it's not prepared to handle return-NULL mallocs at all. BUG=530759 Review URL: https://codereview.chromium.org/1339093002
Diffstat (limited to 'tests')
-rw-r--r--tests/VarAllocTest.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/VarAllocTest.cpp b/tests/VarAllocTest.cpp
index b1a0cb352f..77eaa89d7b 100644
--- a/tests/VarAllocTest.cpp
+++ b/tests/VarAllocTest.cpp
@@ -1,9 +1,16 @@
+/*
+ * Copyright 2015 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
#include "Test.h"
#include "SkVarAlloc.h"
DEF_TEST(VarAlloc, r) {
SkVarAlloc va(4/*start allocating at 16B*/);
- char* p = va.alloc(128, SK_MALLOC_THROW);
+ char* p = va.alloc(128);
sk_bzero(p, 128); // Just checking this is safe.
#if !defined(SK_BUILD_FOR_ANDROID) && !defined(__UCLIBC__)