diff mbox series

[committed] coroutines: Update func-params-08.C test to suspend three times.

Message ID F5B9D5B2-613E-4CBE-B207-3D4905B23848@sandoe.co.uk
State New
Headers show
Series [committed] coroutines: Update func-params-08.C test to suspend three times. | expand

Commit Message

Iain Sandoe Feb. 28, 2020, 8:55 p.m. UTC
Hi,

The awaitable initially committed for this test was returning 
"always ready” which meant that the suspension code was not
used.  Update the test to suspend at each co_await, since this
exercises more of the infrastructure.

tested on x86_64-darwin16,
applied to master,
thanks
Iain
    
gcc/testsuite/ChangeLog:
    
2020-02-28  Iain Sandoe  <iain@sandoe.co.uk>
    
	* g++.dg/coroutines/torture/func-params-08.C: Update
	to suspend for each co_await operation.
diff mbox series

Patch

diff --git a/gcc/testsuite/g++.dg/coroutines/torture/func-params-08.C b/gcc/testsuite/g++.dg/coroutines/torture/func-params-08.C
index c34d143fa68..c166745e052 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/func-params-08.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/func-params-08.C
@@ -46,7 +46,7 @@  struct Foo {
 	{
 	  int v;
 	  awaitable (int _v) : v(_v) {}
-	  bool await_ready() { return true; }
+	  bool await_ready() { return false; }
 	  void await_suspend(coro::coroutine_handle<>) {}
 	  int await_resume() { return v;}
 	};