Initial import of the CDE 2.1.30 sources from the Open Group.

This commit is contained in:
Peter Howkins
2012-03-10 18:21:40 +00:00
commit 83b6996daa
18978 changed files with 3945623 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
// $XConsortium: test1.C /main/4 1996/10/04 15:40:56 drk $
#include <stdio.h>
#include "Exceptions.hh"
int
main()
{
INIT_EXCEPTIONS();
#ifndef NATIVE_EXCEPTIONS
printf ("Unwind_Record size = %ld\n", (long)sizeof (Unwind_Record));
#endif
printf ("Exception size = %ld\n", (long)sizeof (Exception));
puts ("CODE Exception e");
Exception e;
// Test Destructable copy constructor.
puts ("CODE Exception b = e");
Exception b = e;
puts ("CODE Exception *z = new Exception()");
Exception *z = new Exception();
// Test Destructable assignment operator.
puts ("CODE Exception *z = b");
*z = b;
puts ("CODE delete z");
delete z;
try
{
puts ("Trying something");
throw (Exception());
}
catch (Exception &,e)
{
puts ("Caught an exception");
}
end_try;
}