Change std::conditional test to compile-only

* testsuite/20_util/conditional/requirements/typedefs.cc: Change to
	compile-only test.

From-SVN: r238930
This commit is contained in:
Jonathan Wakely 2016-07-31 20:37:14 +01:00 committed by Jonathan Wakely
parent 9d5b70b036
commit c4da1da21e
2 changed files with 10 additions and 17 deletions

View File

@ -1,5 +1,8 @@
2016-07-31 Jonathan Wakely <jwakely@redhat.com>
* testsuite/20_util/conditional/requirements/typedefs.cc: Change to
compile-only test.
* testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc:
Ensure test is compiled with optimization.

View File

@ -1,4 +1,4 @@
// { dg-options "-std=gnu++11" }
// { dg-do compile { target c++11 } }
// 2007-05-02 Benjamin Kosnik <bkoz@redhat.com>
//
@ -20,22 +20,12 @@
// <http://www.gnu.org/licenses/>.
#include <type_traits>
#include <testsuite_hooks.h>
void test01()
{
bool test __attribute__((unused)) = true;
using std::conditional;
using std::conditional;
using std::is_same;
typedef conditional<true, char, int>::type test1_type;
VERIFY( (std::is_same<test1_type, char>::value) );
typedef conditional<true, char, int>::type test1_type;
static_assert( is_same<test1_type, char>::value, "conditional<true, ...>" );
typedef conditional<false, char, int>::type test2_type;
VERIFY( (std::is_same<test2_type, int>::value) );
}
int main()
{
test01();
return 0;
}
typedef conditional<false, char, int>::type test2_type;
static_assert( is_same<test2_type, int>::value, "conditional<false, ...>" );