3 // Check correct operation of await transform.
7 // boiler-plate for tests of codegen
8 #define USE_AWAIT_TRANSFORM
9 #include "../coro1-ret-int-yield-int.h"
11 /* Valued with an await_transform. */
31 PRINT ("main: create coro1");
32 struct coro1 f_coro = f ();
33 PRINT ("main: got coro1 - checking gX");
36 PRINTF ("main: gX is wrong : %d, should be 1\n", gX);
39 PRINT ("main: gX OK -- looping");
41 PRINTF ("main: gX : %d \n", gX);
42 f_coro.handle.resume();
43 } while (!f_coro.handle.done());
44 int y = f_coro.handle.promise().get_value();
47 PRINTF ("main: y is wrong : %d, should be 42\n", y);