Skip to content
Snippets Groups Projects
Commit cc61e3cf authored by Haris Andrianakis's avatar Haris Andrianakis Committed by Thai Duong
Browse files

tink-objc: Disable -Wnonnull for tests that test for NULL arguments on purpose.

PiperOrigin-RevId: 191916150
GitOrigin-RevId: 2383d6305d0d4ca73c312c284bb9ea6d1c153e6f
parent 33cea864
No related branches found
No related tags found
No related merge requests found
......@@ -61,6 +61,8 @@ static NSData *gGoodSerializedEncryptedKeyset;
gGoodSerializedEncryptedKeyset = TINKStringToNSData(encrypted_keyset.SerializeAsString());
}
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wnonnull"
- (void)testReaderCreation {
// Serialized keyset is nil.
NSError *error = nil;
......@@ -83,6 +85,7 @@ static NSData *gGoodSerializedEncryptedKeyset;
XCTAssertNotNil(reader);
XCTAssertNil(error);
}
#pragma clang diagnostic pop
- (void)testReadFromString {
// Good std::string.
......
......@@ -145,12 +145,15 @@ static TINKPBKeyset *gKeyset;
XCTAssertEqual(error.code, crypto::tink::util::error::INVALID_ARGUMENT);
}
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wnonnull"
- (void)testInvalidKeyTemplate {
NSError *error = nil;
TINKKeysetHandle *handle = [[TINKKeysetHandle alloc] initWithKeyTemplate:nil error:&error];
XCTAssertNil(handle);
XCTAssertEqual(error.code, crypto::tink::util::error::INVALID_ARGUMENT);
}
#pragma clang diagnostic pop
- (void)testValidKeyTeamplte {
// TODO(candrian): Implement this once the C++ method is working.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment