type-stream-1.m: Replaced with a test that tests that functions from objc/typedstream.h are...
* objc.dg/type-stream-1.m: Replaced with a test that tests that functions from objc/typedstream.h are deprecated. From-SVN: r164016
This commit is contained in:
parent
4470254f1a
commit
bd72fc7cd4
|
@ -1,3 +1,8 @@
|
|||
2010-09-06 Nicola Pero <nicola.pero@meta-innovation.com>
|
||||
|
||||
* objc.dg/type-stream-1.m: Replaced with a test that tests that
|
||||
functions from objc/typedstream.h are deprecated.
|
||||
|
||||
2010-09-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
|
||||
|
||||
* lib/target-supports.exp
|
||||
|
|
|
@ -1,25 +1,17 @@
|
|||
/* { dg-do run } */
|
||||
/* { dg-do compile } */
|
||||
/* { dg-skip-if "" { *-*-* } { "-fnext-runtime" } { "" } } */
|
||||
|
||||
/* Test warning for deprecated typedstream functions. These functions
|
||||
will be removed in the release after 4.6.0, at which point this
|
||||
testcase can be removed too.
|
||||
*/
|
||||
|
||||
#include <objc/typedstream.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main (void)
|
||||
void dummy (void)
|
||||
{
|
||||
FILE *f; TypedStream *ts;
|
||||
struct T { int a, b; } x = { 1, 2 };
|
||||
f = fopen ("foo", "w"); ts = objc_open_typed_stream (f, OBJC_WRITEONLY);
|
||||
objc_write_type (ts, @encode(struct T), &x);
|
||||
objc_close_typed_stream (ts); fclose (f);
|
||||
f = fopen ("foo", "r"); ts = objc_open_typed_stream (f, OBJC_READONLY);
|
||||
struct T y;
|
||||
objc_read_type (ts, @encode(struct T), &y);
|
||||
if (y.a != 1)
|
||||
abort ();
|
||||
if (y.b != 2)
|
||||
abort ();
|
||||
objc_close_typed_stream (ts); fclose (f);
|
||||
remove ("foo");
|
||||
return 0;
|
||||
}
|
||||
TypedStream* t = objc_open_typed_stream_for_file ("dummy", 0); /* { dg-warning "deprecated" } */
|
||||
|
||||
objc_write_object (t, nil); /* { dg-warning "deprecated" } */
|
||||
objc_read_object (t, NULL); /* { dg-warning "deprecated" } */
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue