mobile/bind/objc: treat warnings as errors in SeqTest.m

Warnings used to be invisible when running SeqTest.m through
go test. Treat warnings as errors and fix a bug that surfaced.

Change-Id: I81e7291635824cdb4a898c91db740f7aa10f3611
Reviewed-on: https://go-review.googlesource.com/21133
Reviewed-by: David Crawshaw <crawshaw@golang.org>
This commit is contained in:
Elias Naur
2016-03-25 14:34:30 +00:00
parent 5496692b9e
commit e8a257577d
3 changed files with 7 additions and 1 deletions
+1 -1
View File
@@ -369,7 +369,7 @@ static int numI = 0;
- (void)testIDup {
Number *want = [[Number alloc] init];
Number *got = GoTestpkgIDup(want);
Number *got = (Number *)GoTestpkgI2Dup(want);
XCTAssertEqual(got, want, @"ObjC object passed through Go should not be wrapped");
}
@@ -189,6 +189,7 @@
"DEBUG=1",
"$(inherited)",
);
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
@@ -227,6 +228,7 @@
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
+4
View File
@@ -143,6 +143,10 @@ func NumSCollected() int {
return numSCollected
}
func I2Dup(i I2) I2 {
return i
}
func IDup(i I) I {
return i
}