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

Side by Side Diff: ios/testing/earl_grey/disabled_test_macros.h

Issue 2224313003: Add macro for consistent logging when disabling tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 | « ios/testing/earl_grey/BUILD.gn ('k') | ios/testing/earl_grey/earl_grey_support.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef IOS_TESTING_EARL_GREY_DISABLED_TEST_MACROS_H_
6 #define IOS_TESTING_EARL_GREY_DISABLED_TEST_MACROS_H_
7
8 // A macro that forces an Earl Grey test to pass. It should be used to disable
9 // tests that fail due to a bug. This macro should be used when the
10 // configuration for which the test should be disabled can only be determined
11 // at runtime. Disabling at complile-time is always preferred.
cmasso1 2016/08/09 21:00:22 nit: s/complile/compile
cmasso1 2016/08/09 21:00:22 Also, Isn't it helpful to highlight here what shou
baxley 2016/08/09 21:05:57 I thought about it, however we haven't set the pre
baxley 2016/08/09 21:05:57 Done.
cmasso1 2016/08/09 21:12:12 Fine by me. Thanks!
12 // Example:
13 // - (void)testFoo
14 // if (base::ios::IsRunningOnIOS10OrLater()) {
15 // EARL_GREY_TEST_DISABLED(@"Disabled on iOS 10.");
16 // }
17 #define EARL_GREY_TEST_DISABLED(message) \
Eugene But (OOO till 7-30) 2016/08/09 20:47:37 Optional since KIF also has this problem. This thi
baxley 2016/08/09 21:05:57 Nice catch! I don't think not having it in KIF is
18 NSLog(@"-- Earl Grey Test Disabled -- %@", message); \
19 return;
20
21 // A macro that forces an Earl Grey test to pass. This should be used when a
22 // test fails for a specific configuration because it is not supported, but
23 // there is no error. This macro should only be used when the configuration for
24 // which the test should be disabled can only be determined at runtime.
25 // Disabling at compile-time is always preferred.
26 // Example:
27 // - (void)testFoo
28 // if (base::ios::IsRunningOnIOS10OrLater()) {
29 // EARL_GREY_TEST_SKIPPED(@"Test not supported on iOS 10.");
30 // }
31 #define EARL_GREY_TEST_SKIPPED(message) \
32 NSLog(@"-- Earl Grey Test Skipped -- %@", message); \
33 return;
34
35 #endif // IOS_TESTING_EARL_GREY_DISABLED_TEST_MACROS_H_
OLDNEW
« no previous file with comments | « ios/testing/earl_grey/BUILD.gn ('k') | ios/testing/earl_grey/earl_grey_support.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698