2 // { dg-options "-pthread" }
3 // { dg-require-effective-target c++11 }
4 // { dg-require-effective-target pthread }
5 // { dg-require-cstdint "" }
6 // { dg-require-gthreads "" }
8 // Copyright (C) 2011-2018 Free Software Foundation, Inc.
10 // This file is part of the GNU ISO C++ Library. This library is free
11 // software; you can redistribute it and/or modify it under the
12 // terms of the GNU General Public License as published by the
13 // Free Software Foundation; either version 3, or (at your option)
16 // This library is distributed in the hope that it will be useful,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 // GNU General Public License for more details.
21 // You should have received a copy of the GNU General Public License along
22 // with this library; see the file COPYING3. If not see
23 // <http://www.gnu.org/licenses/>.
27 #include <testsuite_hooks.h>
34 const launch both
= launch::async
|launch::deferred
;
35 const launch all
= ~none
;
37 VERIFY( (none
& both
) == none
);
38 VERIFY( (none
| both
) == both
);
39 VERIFY( (none
^ both
) == both
);
41 VERIFY( (none
& all
) == none
);
42 VERIFY( (none
| all
) == all
);
43 VERIFY( (none
^ all
) == all
);
45 VERIFY( (both
& all
) == both
);
46 VERIFY( (both
| all
) == all
);
47 VERIFY( (both
^ all
) == ~both
);
49 VERIFY( (none
& launch::async
) == none
);
50 VERIFY( (none
& launch::deferred
) == none
);
52 VERIFY( (none
| launch::async
) == launch::async
);
53 VERIFY( (none
| launch::deferred
) == launch::deferred
);
55 VERIFY( (none
^ launch::async
) == launch::async
);
56 VERIFY( (none
^ launch::deferred
) == launch::deferred
);
58 VERIFY( (none
& none
) == none
);
59 VERIFY( (none
| none
) == none
);
60 VERIFY( (none
^ none
) == none
);
62 VERIFY( (both
& both
) == both
);
63 VERIFY( (both
| both
) == both
);
64 VERIFY( (both
^ both
) == none
);
66 VERIFY( (all
& all
) == all
);
67 VERIFY( (all
| all
) == all
);
68 VERIFY( (all
^ all
) == none
);