Sha256: cc115073dd85bc6619b8378ddcfcbeccd3a2bdc2bda770a5ac3542eafac4d0b0

Contents?: true

Size: 1.18 KB

Versions: 6

Compression:

Stored size: 1.18 KB

Contents

#import "XCTestRun+Specta.h"
#import "SPTXCTestCase.h"

@implementation XCTestRun (Specta)

#pragma mark - Pending Test Cases

- (NSUInteger)spt_pendingTestCaseCount {
  NSUInteger pendingTestCaseCount = 0;

  if ([self isKindOfClass:[XCTestSuiteRun class]]) {
    for (XCTestRun * testRun in [(XCTestSuiteRun *)self testRuns]) {
      pendingTestCaseCount += [testRun spt_pendingTestCaseCount];
    }
  } else if ([[self test] isKindOfClass:[SPTXCTestCase class]]) {
    SPTXCTestCase * testCase = (SPTXCTestCase *)[self test];
    if (testCase != nil && [testCase spt_isPending]) {
      pendingTestCaseCount++;
    }
  }

  return pendingTestCaseCount;
}

#pragma mark - Skipped Test Cases

- (NSUInteger)spt_skippedTestCaseCount {
  NSUInteger skippedTestCaseCount = 0;

  if ([self isKindOfClass:[XCTestSuiteRun class]]) {
    for (XCTestRun * testRun in [(XCTestSuiteRun *)self testRuns]) {
      skippedTestCaseCount += [testRun spt_skippedTestCaseCount];
    }
  } else if ([[self test] isKindOfClass:[SPTXCTestCase class]]) {
    SPTXCTestCase * testCase = (SPTXCTestCase *)[self test];
    if (testCase.spt_skipped) {
      skippedTestCaseCount++;
    }
  }

  return skippedTestCaseCount;
}

@end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
second_curtain-0.6.0 Demo/Pods/Specta/src/XCTestRun+Specta.m
second_curtain-0.5.0 Demo/Pods/Specta/src/XCTestRun+Specta.m
second_curtain-0.4.0 Demo/Pods/Specta/src/XCTestRun+Specta.m
second_curtain-0.3.0 Demo/Pods/Specta/src/XCTestRun+Specta.m
second_curtain-0.2.4 Demo/Pods/Specta/src/XCTestRun+Specta.m
second_curtain-0.2.3 Demo/Pods/Specta/src/XCTestRun+Specta.m