Test line pragmas in generated actor files

This commit is contained in:
Andrew Noyes 2019-09-11 17:12:55 -07:00
parent 6100d3274d
commit 8353dd4731
1 changed files with 18 additions and 0 deletions

View File

@ -31,6 +31,24 @@ void forceLinkFlowTests() {}
using std::vector;
TEST_CASE("/flow/actorcompiler/lineNumbers") {
loop {
try {
ASSERT(__LINE__ == 37);
wait(Future<Void>(Void()));
ASSERT(__LINE__ == 39);
throw success();
} catch (Error& e) {
ASSERT(__LINE__ == 42);
wait(Future<Void>(Void()));
ASSERT(__LINE__ == 44);
}
break;
}
ASSERT(LiteralStringRef(__FILE__).endsWith(LiteralStringRef("FlowTests.actor.cpp")));
return Void();
}
template <class T, class Func, class ErrFunc, class CallbackType>
class LambdaCallback : public CallbackType, public FastAllocated<LambdaCallback<T,Func,ErrFunc,CallbackType>> {
Func func;