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

Side by Side Diff: src/breakpad_googletest_includes.h

Issue 1638653002: test: allow use of system gmock/gtest libs (Closed) Base URL: https://chromium.googlesource.com/breakpad/breakpad.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « configure.ac ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009, Google Inc. 1 // Copyright (c) 2009, Google Inc.
2 // All rights reserved. 2 // All rights reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // * Redistributions of source code must retain the above copyright 8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer. 9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above 10 // * Redistributions in binary form must reproduce the above
(...skipping 12 matching lines...) Expand all
23 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 29
30 #ifndef BREAKPAD_GOOGLETEST_INCLUDES_H__ 30 #ifndef BREAKPAD_GOOGLETEST_INCLUDES_H__
31 #define BREAKPAD_GOOGLETEST_INCLUDES_H__ 31 #define BREAKPAD_GOOGLETEST_INCLUDES_H__
32 32
33 #include "testing/gtest/include/gtest/gtest.h" 33 #include "gtest/gtest.h"
34 #include "testing/include/gmock/gmock.h" 34 #include "gmock/gmock.h"
35 35
36 // If AddressSanitizer is used, NULL pointer dereferences generate SIGILL 36 // If AddressSanitizer is used, NULL pointer dereferences generate SIGILL
37 // (illegal instruction) instead of SIGSEGV (segmentation fault). Also, 37 // (illegal instruction) instead of SIGSEGV (segmentation fault). Also,
38 // the number of memory regions differs, so there is no point in running 38 // the number of memory regions differs, so there is no point in running
39 // this test if AddressSanitizer is used. 39 // this test if AddressSanitizer is used.
40 // 40 //
41 // Ideally we'd use this attribute to disable ASAN on a per-func basis, 41 // Ideally we'd use this attribute to disable ASAN on a per-func basis,
42 // but this doesn't seem to actually work, and it's changed names over 42 // but this doesn't seem to actually work, and it's changed names over
43 // time. So just stick with disabling the actual tests. 43 // time. So just stick with disabling the actual tests.
44 // http://crbug.com/304575 44 // http://crbug.com/304575
45 //#define NO_ASAN __attribute__((no_sanitize_address)) 45 //#define NO_ASAN __attribute__((no_sanitize_address))
46 #if defined(__clang__) && defined(__has_feature) 46 #if defined(__clang__) && defined(__has_feature)
47 // Have to keep this check sep from above as newer gcc will barf on it. 47 // Have to keep this check sep from above as newer gcc will barf on it.
48 # if __has_feature(address_sanitizer) 48 # if __has_feature(address_sanitizer)
49 # define ADDRESS_SANITIZER 49 # define ADDRESS_SANITIZER
50 # endif 50 # endif
51 #elif defined(__GNUC__) && defined(__SANITIZE_ADDRESS__) 51 #elif defined(__GNUC__) && defined(__SANITIZE_ADDRESS__)
52 # define ADDRESS_SANITIZER 52 # define ADDRESS_SANITIZER
53 #else 53 #else
54 # undef ADDRESS_SANITIZER 54 # undef ADDRESS_SANITIZER
55 #endif 55 #endif
56 56
57 #endif // BREAKPAD_GOOGLETEST_INCLUDES_H__ 57 #endif // BREAKPAD_GOOGLETEST_INCLUDES_H__
OLDNEW
« no previous file with comments | « configure.ac ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698