| 1609 | self.assertNotContained('Destructing Foo', out) |
| 1610 | |
| 1611 | def test_iostream_ctors(self): |
| 1612 | # iostream stuff must be globally constructed before user global |
| 1613 | # constructors, so iostream works in global constructors |
| 1614 | self.do_run(r''' |
| 1615 | #include <iostream> |
| 1616 | |
| 1617 | struct A { |
| 1618 | A() { std::cout << "bug"; } |
| 1619 | }; |
| 1620 | A a; |
| 1621 | |
| 1622 | int main() { |
| 1623 | std::cout << "free code" << std::endl; |
| 1624 | return 0; |
| 1625 | } |
| 1626 | ''', 'bugfree code') |
| 1627 | |
| 1628 | @with_all_eh_sjlj |
| 1629 | def test_exceptions_longjmp1(self): |