diff options
author | nicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-03-04 19:09:34 +0000 |
---|---|---|
committer | nicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-03-04 19:09:34 +0000 |
commit | 7fcec42570c5e46cbe214dc0ff35d4afbcc4aea4 (patch) | |
tree | 8fb0ad1ab0297d7ed5e1f723043edf97ec6923b1 | |
parent | 42f7211e7b5b74c35c91ca97f2cccc740e80eb76 (diff) | |
download | gcc-7fcec42570c5e46cbe214dc0ff35d4afbcc4aea4.tar.gz |
In gcc/testsuite/:
2011-03-04 Nicola Pero <nicola.pero@meta-innovation.com>
* objc.dg/property/property-encoding-1.m: Tidied up testcase.
* obj-c++.dg/property/property-encoding-1.mm: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@170684 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/obj-c++.dg/property/property-encoding-1.mm | 7 | ||||
-rw-r--r-- | gcc/testsuite/objc.dg/property/property-encoding-1.m | 7 |
3 files changed, 11 insertions, 8 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9e88c468a82..06b9e1d61a8 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2011-03-04 Nicola Pero <nicola.pero@meta-innovation.com> + * objc.dg/property/property-encoding-1.m: Tidied up testcase. + * obj-c++.dg/property/property-encoding-1.mm: Likewise. + +2011-03-04 Nicola Pero <nicola.pero@meta-innovation.com> + * objc.dg/gnu-api-2-property.m: Added tests for property_getName() and property_getAttributes() if __OBJC2__. * obj-c++.dg/gnu-api-2-property.mm: Likewise. diff --git a/gcc/testsuite/obj-c++.dg/property/property-encoding-1.mm b/gcc/testsuite/obj-c++.dg/property/property-encoding-1.mm index 03f273c13b6..dc12c3137b9 100644 --- a/gcc/testsuite/obj-c++.dg/property/property-encoding-1.mm +++ b/gcc/testsuite/obj-c++.dg/property/property-encoding-1.mm @@ -89,22 +89,21 @@ void error (objc_property_t p) } /* Concatenate 3 strings and return the result. */ -char *concat (char *a, char *b, char *c) +char *concat (const char *a, const char *b, const char *c) { /* We happily leak memory here. This is a test. */ - char *x = malloc (sizeof (char) * 128); + char *x = (char *)malloc (sizeof (char) * 128); snprintf (x, 128, "%s%s%s", a, b, c); return x; } #endif -int main(int argc, char **args) +int main (void) { #ifdef __OBJC2__ Class c = objc_getClass ("MySubClass"); objc_property_t p; - const char *expected_result; p = class_getProperty (c, "char_property"); /* Usually we expect "Tc,Vchar_property", but if a char is of diff --git a/gcc/testsuite/objc.dg/property/property-encoding-1.m b/gcc/testsuite/objc.dg/property/property-encoding-1.m index 64b35e7690e..dc12c3137b9 100644 --- a/gcc/testsuite/objc.dg/property/property-encoding-1.m +++ b/gcc/testsuite/objc.dg/property/property-encoding-1.m @@ -89,22 +89,21 @@ void error (objc_property_t p) } /* Concatenate 3 strings and return the result. */ -char *concat (char *a, char *b, char *c) +char *concat (const char *a, const char *b, const char *c) { /* We happily leak memory here. This is a test. */ - char *x = malloc (sizeof (char) * 128); + char *x = (char *)malloc (sizeof (char) * 128); snprintf (x, 128, "%s%s%s", a, b, c); return x; } #endif -int main(int argc, void **args) +int main (void) { #ifdef __OBJC2__ Class c = objc_getClass ("MySubClass"); objc_property_t p; - const char *expected_result; p = class_getProperty (c, "char_property"); /* Usually we expect "Tc,Vchar_property", but if a char is of |