File tree Expand file tree Collapse file tree
exercises/practice/hello-world
xcodeProject/ObjectiveC.xcodeproj Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Test Exercises
2+
3+ on : [push, pull_request]
4+
5+ jobs :
6+ test :
7+ runs-on : macos-15
8+
9+ steps :
10+ - name : Checkout code
11+ uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
12+
13+ - name : Test Exercises
14+ run : |
15+ set -o pipefail
16+ xcodebuild test \
17+ -project xcodeProject/ObjectiveC.xcodeproj \
18+ -scheme xobjectivecTest \
19+ -destination 'platform=macOS' \
20+ | xcpretty
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -14,29 +14,10 @@ @interface HelloWorldTest : XCTestCase
1414
1515@implementation HelloWorldTest
1616
17- - (HelloWorld *)helloWorld {
18- return [[HelloWorld alloc ] init ];
19- }
20-
21- - (void )testNoName {
22- NSString *input = nil ;
23- NSString *expected = @" Hello, World!" ;
24- NSString *result = [[self helloWorld ] hello: input];
25- XCTAssertEqualObjects (expected, result);
26- }
27-
28- - (void )testSampleName {
29- NSString *input = @" Alice" ;
30- NSString *expected = @" Hello, Alice!" ;
31- NSString *result = [[self helloWorld ] hello: input];
32- XCTAssertEqualObjects (expected, result);
33- }
34-
35- - (void )testOtherSampleName {
36- NSString *input = @" Bob" ;
37- NSString *expected = @" Hello, Bob!" ;
38- NSString *result = [[self helloWorld ] hello: input];
39- XCTAssertEqualObjects (expected, result);
17+ - (void )testHello {
18+ NSString *expected = @" Hello, World!" ;
19+ NSString *result = [[[HelloWorld alloc ] init ] hello ];
20+ XCTAssertEqualObjects (expected, result);
4021}
4122
4223@end
You can’t perform that action at this time.
0 commit comments