aboutsummaryrefslogtreecommitdiffstats
path: root/tests/testaddfunction.cpp
diff options
context:
space:
mode:
authorHugo Lima <hugo.lima@openbossa.org>2009-10-29 20:02:53 -0200
committerHugo Lima <hugo.lima@openbossa.org>2009-10-29 20:02:53 -0200
commit5ccbce7a917a2a602ad1fa32d8682afe32dd68bc (patch)
tree942b5597debf365a140c072816cb2726782937b6 /tests/testaddfunction.cpp
parent64f7ae3334171168ff803f339d55a179a6e06001 (diff)
Fix a crash when the function signature provided by add-function tag does not
have parenteses. Reviewed by Marcelo Lira <marcelo.lira@openbossa.org>
Diffstat (limited to 'tests/testaddfunction.cpp')
-rw-r--r--tests/testaddfunction.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/testaddfunction.cpp b/tests/testaddfunction.cpp
index 0637eb5c9..d02fc67e1 100644
--- a/tests/testaddfunction.cpp
+++ b/tests/testaddfunction.cpp
@@ -144,6 +144,14 @@ void TestAddFunction::testAddFunctionCodeSnippets()
QVERIFY(addedFunc->hasInjectedCode());
}
+void TestAddFunction::testFunctionWithoutParenteses()
+{
+ const char sig1[] = "func";
+ AddedFunction f1(sig1, "void");
+ QCOMPARE(f1.name(), QString("func"));
+ QCOMPARE(f1.arguments().count(), 0);
+ QCOMPARE(f1.isConstant(), false);
+}
QTEST_APPLESS_MAIN(TestAddFunction)