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

Unified Diff: ios/showcase/test/showcase_test_case.mm

Issue 2648263002: Code coverage with llvm-cov (Closed)
Patch Set: Some changes Created 3 years, 9 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 | « ios/showcase/test/BUILD.gn ('k') | testing/coverage_util_ios.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/showcase/test/showcase_test_case.mm
diff --git a/ios/showcase/test/showcase_test_case.mm b/ios/showcase/test/showcase_test_case.mm
index e4877f11f752c2f49acdf50c1365ed9b58d52c2a..33e93368ed1583419f09f945f963a85f7d978918 100644
--- a/ios/showcase/test/showcase_test_case.mm
+++ b/ios/showcase/test/showcase_test_case.mm
@@ -6,7 +6,9 @@
#import <EarlGrey/EarlGrey.h>
-#import "base/logging.h"
+#include "base/logging.h"
+#include "base/strings/sys_string_conversions.h"
+#include "testing/coverage_util_ios.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
@@ -14,6 +16,19 @@
@implementation ShowcaseTestCase
++ (void)setUp {
+ // Writes the profraw file to the Documents directory, where the app has
+ // write rights.
+// NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,
+// NSUserDomainMask, YES);
+// NSString *documentsDirectory = [paths firstObject];
+// NSString *fileName =
+// [documentsDirectory stringByAppendingPathComponent:@"default.profraw"];
+ coverage_util::SetupCodeCoverageIfNecessary(
+ base::SysNSStringToUTF8(@"/Users/lpromero/Developer/bling/src/out/"
+ @"Debug-iphonesimulator/coverage.profraw"));
+}
+
// Overrides testInvocations so the set of tests run can be modified, as
// necessary.
+ (NSArray*)testInvocations {
« no previous file with comments | « ios/showcase/test/BUILD.gn ('k') | testing/coverage_util_ios.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698