source: branches/libc-0.6/testcase/throw2.cpp@ 3811

Last change on this file since 3811 was 837, checked in by bird, 22 years ago

Extended testcase.

  • Property cvs2svn:cvs-rev set to 1.3
  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 433 bytes
Line 
1#include <stdio.h>
2#include "throw.h"
3
4bar::bar(int i) : i(i)
5{
6 dfprintf((stderr, "bar::constructor 1\n"));
7}
8
9bar::bar() throw(int) : i(1)
10{
11 dfprintf((stderr, "bar::constructor 2\n"));
12 throw(1);
13}
14
15int bar::get() const
16{
17 return i;
18}
19
20int bar::getThrow() const throw(expt)
21{
22 throw(expt(1, ""));
23 return 1;
24}
25
26
27
28expt::expt(int i, const char *psz) : i(i), psz(psz)
29{
30}
31
32int expt::get() const
33{
34 return i;
35}
36
37
Note: See TracBrowser for help on using the repository browser.