diff options
author | Mike Klein <mtklein@google.com> | 2017-08-16 13:20:20 +0000 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-08-16 13:20:29 +0000 |
commit | 228276dabf8461ba8be7a0dc744cb3374e3c4f1e (patch) | |
tree | fd226d1b5bbf3e5e5e3780b91c418a22be6d4902 | |
parent | 042357b6ed8b5287bb462aded190396a53930bc6 (diff) |
Revert "Turn on exceptions in test tools."
This reverts commit c667dff58dc4b16faf30c34e98a118c6a1c1f987.
Reason for revert: temporary while I fix Android, Google3.
Original change's description:
> Turn on exceptions in test tools.
>
> This allows us to test things that, e.g., throw std::bad_alloc.
>
> Change-Id: I6409159b89f1d93d403b1a1f40539cf2531a8b68
> Reviewed-on: https://skia-review.googlesource.com/34982
> Reviewed-by: Herb Derby <herb@google.com>
> Commit-Queue: Mike Klein <mtklein@chromium.org>
TBR=mtklein@chromium.org,herb@google.com
Change-Id: Iafdc34c5f70f99f7df3cd0bbad65eed0828453a1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/35081
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
-rw-r--r-- | BUILD.gn | 7 | ||||
-rw-r--r-- | gn/BUILD.gn | 7 | ||||
-rw-r--r-- | gn/tests.gni | 1 | ||||
-rw-r--r-- | tests/ExceptionTest.cpp | 19 |
4 files changed, 1 insertions, 33 deletions
@@ -883,9 +883,6 @@ if (skia_enable_tools) { ":skia_private", ] - configs -= [ "//gn:no_exceptions" ] - configs += [ "//gn:yes_exceptions" ] - if (!defined(deps)) { deps = [] } @@ -899,8 +896,6 @@ if (skia_enable_tools) { shared_library("lib" + target_name) { forward_variables_from(invoker, "*", [ "is_shared_library" ]) configs += [ ":skia_private" ] - configs -= [ "//gn:no_exceptions" ] - configs += [ "//gn:yes_exceptions" ] testonly = true } } else { @@ -908,8 +903,6 @@ if (skia_enable_tools) { executable(_executable) { forward_variables_from(invoker, "*", [ "is_shared_library" ]) configs += [ ":skia_private" ] - configs -= [ "//gn:no_exceptions" ] - configs += [ "//gn:yes_exceptions" ] testonly = true } } diff --git a/gn/BUILD.gn b/gn/BUILD.gn index 06cff4e4a7..7be1617d23 100644 --- a/gn/BUILD.gn +++ b/gn/BUILD.gn @@ -258,16 +258,11 @@ config("default") { } config("no_exceptions") { - # Exceptions are disabled by default on Windows. (Use :yes_exceptions to enable them.) + # Exceptions are disabled by default on Windows. (Use /EHsc to enable them.) if (!is_win) { cflags_cc = [ "-fno-exceptions" ] } } -config("yes_exceptions") { - if (is_win) { - cflags_cc = [ "/EHsc" ] - } -} config("warnings") { cflags = [] diff --git a/gn/tests.gni b/gn/tests.gni index 51d1d08ce7..c2f3759cd2 100644 --- a/gn/tests.gni +++ b/gn/tests.gni @@ -62,7 +62,6 @@ tests_sources = [ "$_tests/EGLImageTest.cpp", "$_tests/EmptyPathTest.cpp", "$_tests/EncodeTest.cpp", - "$_tests/ExceptionTest.cpp", "$_tests/ExifTest.cpp", "$_tests/F16StagesTest.cpp", "$_tests/FillPathTest.cpp", diff --git a/tests/ExceptionTest.cpp b/tests/ExceptionTest.cpp deleted file mode 100644 index 85e6dcae65..0000000000 --- a/tests/ExceptionTest.cpp +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright 2017 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" - -// Just a little meta-test that our test tools can compile and link with exceptions enabled. -DEF_TEST(Exceptions, r) { - bool exception_caught = false; - try { - throw 42; - } catch (...) { - exception_caught = true; - } - REPORTER_ASSERT(r, exception_caught); -} |