ack/tests/plat/newdispose_p.p
David Given e7e29d34ff Add a test (currently failing) to check that Pascal char sets can store all 256
possible values. Add the PowerPC ncg and mcg backend support to let the test
actually run, including modifying a bunch of PowrePC libem functions so that
they can be called from both ncg and mcg.
2017-01-15 22:28:14 +01:00

35 lines
547 B
OpenEdge ABL

#
(*$U+ -- enables underscores in identifiers *)
program markrelease;
type
iptr = ^integer;
var
ptr1 : iptr;
ptr2 : iptr;
procedure finished;
extern;
procedure fail(line: integer);
extern;
#define ASSERT(cond) \
if (not (cond)) then fail(__LINE__)
begin
New(ptr1);
New(ptr2);
ASSERT(ptr1 <> ptr2);
Dispose(ptr1);
Dispose(ptr2);
(* Not required by the Pascal standard, but our implementation sets the
* pointers to NULL after freeing them. *)
ASSERT(ptr1 = ptr2);
finished
end.