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.180 tracks/objective-c/exercises/hello-world/HelloWorldTest.m
trackler-2.2.1.179 tracks/objective-c/exercises/hello-world/HelloWorldTest.m
trackler-2.2.1.178 tracks/objective-c/exercises/hello-world/HelloWorldTest.m
trackler-2.2.1.177 tracks/objective-c/exercises/hello-world/HelloWorldTest.m
trackler-2.2.1.176 tracks/objective-c/exercises/hello-world/HelloWorldTest.m
trackler-2.2.1.175 tracks/objective-c/exercises/hello-world/HelloWorldTest.m
trackler-2.2.1.174 tracks/objective-c/exercises/hello-world/HelloWorldTest.m
trackler-2.2.1.173 tracks/objective-c/exercises/hello-world/HelloWorldTest.m
trackler-2.2.1.172 tracks/objective-c/exercises/hello-world/HelloWorldTest.m
trackler-2.2.1.171 tracks/objective-c/exercises/hello-world/HelloWorldTest.m
trackler-2.2.1.170 tracks/objective-c/exercises/hello-world/HelloWorldTest.m
trackler-2.2.1.169 tracks/objective-c/exercises/hello-world/HelloWorldTest.m
trackler-2.2.1.167 tracks/objective-c/exercises/hello-world/HelloWorldTest.m
trackler-2.2.1.166 tracks/objective-c/exercises/hello-world/HelloWorldTest.m
trackler-2.2.1.165 tracks/objective-c/exercises/hello-world/HelloWorldTest.m
trackler-2.2.1.164 tracks/objective-c/exercises/hello-world/HelloWorldTest.m
trackler-2.2.1.163 tracks/objective-c/exercises/hello-world/HelloWorldTest.m
trackler-2.2.1.162 tracks/objective-c/exercises/hello-world/HelloWorldTest.m
trackler-2.2.1.161 tracks/objective-c/exercises/hello-world/HelloWorldTest.m
trackler-2.2.1.160 tracks/objective-c/exercises/hello-world/HelloWorldTest.m