diff options
author | Christian Kamm <christian.d.kamm@nokia.com> | 2010-03-23 10:57:41 +0100 |
---|---|---|
committer | Christian Kamm <christian.d.kamm@nokia.com> | 2010-03-26 13:05:03 +0100 |
commit | 86153c191a6e0a6228d6d6c705a3e3271a4239be (patch) | |
tree | 42fe7b0eb37e07e15c1de2f5889a026be3b87ea0 /tests/auto/build/tst_build.cpp | |
parent | 38ba7e1705dca0894f79b9a0de1327ee3cd4c0bf (diff) |
Separate stack creation from construction.
This allows having either a convenient Coroutine-owned stack or
passing in stack memory manually.
Diffstat (limited to 'tests/auto/build/tst_build.cpp')
-rw-r--r-- | tests/auto/build/tst_build.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/auto/build/tst_build.cpp b/tests/auto/build/tst_build.cpp index 2574f61..3b94169 100644 --- a/tests/auto/build/tst_build.cpp +++ b/tests/auto/build/tst_build.cpp @@ -32,7 +32,8 @@ static void fnArg(int start) void tst_build::staticFn() { - Coroutine* c1 = Coroutine::build(32000, &fnNoArg); + Coroutine* c1 = Coroutine::build(&fnNoArg); + c1->createStack(); QCOMPARE(fnCounter, -99); QCOMPARE(c1->cont(), true); QCOMPARE(fnCounter, 0); @@ -42,7 +43,8 @@ void tst_build::staticFn() QCOMPARE(fnCounter, 2); delete c1; - Coroutine* c2 = Coroutine::build(32000, &fnArg, 40); + Coroutine* c2 = Coroutine::build(&fnArg, 40); + c2->createStack(); QCOMPARE(c2->cont(), true); QCOMPARE(fnCounter, 40); QCOMPARE(c2->cont(), true); |