Sha256: 95c4b17cbc507a0e7527a209c0cca4cc2e1c1edc217c8da9070e2e33766a3b66

Contents?: true

Size: 918 Bytes

Versions: 396

Compression:

Stored size: 918 Bytes

Contents

#import <XCTest/XCTest.h>

#if __has_include("HelloWorldExample.h")
# import "HelloWorldExample.h"
# else
# import "HelloWorld.h"
#endif

NS_ASSUME_NONNULL_BEGIN

@interface HelloWorldTest : XCTestCase

@end

@implementation HelloWorldTest

- (HelloWorld *)helloWorld {
  return [[HelloWorld alloc] init];
}

- (void)testNoName {
  NSString *input = nil;
  NSString *expected = @"Hello, World!";
  NSString *result = [[self helloWorld] hello:input];
  XCTAssertEqualObjects(expected, result);
}

- (void)testSampleName {
  NSString *input = @"Alice";
  NSString *expected = @"Hello, Alice!";
  NSString *result = [[self helloWorld] hello:input];
  XCTAssertEqualObjects(expected, result);
}
  
- (void)testOtherSampleName {
  NSString *input = @"Bob";
  NSString *expected = @"Hello, Bob!";
  NSString *result = [[self helloWorld] hello:input];
  XCTAssertEqualObjects(expected, result);
}

@end
NS_ASSUME_NONNULL_END

Version data entries

396 entries across 396 versions & 1 rubygems

Version Path
trackler-2.2.1.98 tracks/objective-c/exercises/hello-world/HelloWorldTest.m
trackler-2.2.1.97 tracks/objective-c/exercises/hello-world/HelloWorldTest.m
trackler-2.2.1.96 tracks/objective-c/exercises/hello-world/HelloWorldTest.m
trackler-2.2.1.95 tracks/objective-c/exercises/hello-world/HelloWorldTest.m
trackler-2.2.1.94 tracks/objective-c/exercises/hello-world/HelloWorldTest.m
trackler-2.2.1.93 tracks/objective-c/exercises/hello-world/HelloWorldTest.m
trackler-2.2.1.92 tracks/objective-c/exercises/hello-world/HelloWorldTest.m
trackler-2.2.1.91 tracks/objective-c/exercises/hello-world/HelloWorldTest.m
trackler-2.2.1.90 tracks/objective-c/exercises/hello-world/HelloWorldTest.m
trackler-2.2.1.89 tracks/objective-c/exercises/hello-world/HelloWorldTest.m
trackler-2.2.1.88 tracks/objective-c/exercises/hello-world/HelloWorldTest.m
trackler-2.2.1.87 tracks/objective-c/exercises/hello-world/HelloWorldTest.m
trackler-2.2.1.86 tracks/objective-c/exercises/hello-world/HelloWorldTest.m
trackler-2.2.1.85 tracks/objective-c/exercises/hello-world/HelloWorldTest.m
trackler-2.2.1.84 tracks/objective-c/exercises/hello-world/HelloWorldTest.m
trackler-2.2.1.83 tracks/objective-c/exercises/hello-world/HelloWorldTest.m
trackler-2.2.1.82 tracks/objective-c/exercises/hello-world/HelloWorldTest.m
trackler-2.2.1.81 tracks/objective-c/exercises/hello-world/HelloWorldTest.m
trackler-2.2.1.80 tracks/objective-c/exercises/hello-world/HelloWorldTest.m
trackler-2.2.1.79 tracks/objective-c/exercises/hello-world/HelloWorldTest.m