ack/tests/plat/core/newdispose_p.p
David Given 19cd42124f Rearrange the tests into sets; allow plats to skip sets; pc86 and linux68k now
skip the tests which use floating point instructions (as their emulators don't
support them).
2018-06-08 15:59:04 +09: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.