
Security News
CISA’s 2025 SBOM Guidance Adds Hashes, Licenses, Tool Metadata, and Context
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
This gem is a test suite runner for Objective-C files to allow for the easy execution of a test suite without the hassle of managing an Xcode Project File
Install the gem
$ gem install objc
Install xctool
$ brew install xctool
$ objc Bob
The objc
binary will find and run the tests for the following files: Bob.h
,
Bob.m
and BobTest.m
.
The test suite used is XCTest. This is an example of the header, source and test file.
#import <Foundation/Foundation.h>
@interface Bob : NSObject
- (NSString *)hey:(NSString *)statement;
@end
#import "Bob.h"
@implementation Bob
-(NSString *)hey:(NSString *)statement {
if ([statement isEqualToString:@""]) {
return @"Fine, be that way.";
} else if ([statement hasSuffix:@"?"]) {
return @"Sure.";
} else if ([statement isEqualToString:[statement uppercaseString]]) {
return @"Woah, chill out!";
} else {
return @"Whatever.";
}
}
@end
#import <XCTest/XCTest.h>
#import "Bob.h"
@interface test_suite : XCTestCase
@end
@implementation test_suite
- (Bob *)bob {
return [[Bob alloc] init];
}
- (void)testStatingSomething {
NSString *input = @"Tom-ay-to, tom-aaaah-to.";
NSString *expected = @"Whatever.";
NSString *result = [[self bob] hey:input];
XCTAssertEqual(expected,result);
}
- (void)testShouting {
NSString *input = @"WATCH OUT!";
NSString *expected = @"Woah, chill out!";
NSString *result = [[self bob] hey:input];
XCTAssertEqual(expected,result);
}
- (void)testAskingAQuestion {
NSString *input = @"Does this cryogenic chamber make me look fat?";
NSString *expected = @"Sure.";
NSString *result = [[self bob] hey:input];
XCTAssertEqual(expected,result);
}
- (void)testTalkingForcefully {
NSString *input = @"Let's go make out behind the gym!";
NSString *expected = @"Whatever.";
NSString *result = [[self bob] hey:input];
XCTAssertEqual(expected,result);
}
- (void)testShoutingNumbers {
NSString *input = @"1, 2, 3 GO!";
NSString *expected = @"Woah, chill out!";
NSString *result = [[self bob] hey:input];
XCTAssertEqual(expected,result);
}
- (void)testShoutingWithSpecialCharacters {
NSString *input = @"ZOMG THE %^*@#$(*^ ZOMBIES ARE COMING!!11!!1!";
NSString *expected = @"Woah, chill out!";
NSString *result = [[self bob] hey:input];
XCTAssertEqual(expected,result);
}
- (void)testSilence {
NSString *input = @"";
NSString *expected = @"Fine, be that way.";
NSString *result = [[self bob] hey:input];
XCTAssertEqual(expected,result);
}
@end
When you run objc Bob
, more specifically the following occurs:
Bob.h
,
Bob.m
and BobTest.m
)git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that objc demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.