Skip to content
Snippets Groups Projects
Commit 8ef85c64 authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Removed obsoleted test.

parent 3fd1e5b2
No related branches found
No related tags found
No related merge requests found
...@@ -8,24 +8,9 @@ class tst_Preprocessor: public QObject ...@@ -8,24 +8,9 @@ class tst_Preprocessor: public QObject
Q_OBJECT Q_OBJECT
private Q_SLOTS: private Q_SLOTS:
void pp_with_no_client();
void unfinished_function_like_macro_call(); void unfinished_function_like_macro_call();
}; };
void tst_Preprocessor::pp_with_no_client()
{
Client *client = 0; // no client.
Environment env;
Preprocessor preprocess(client, &env);
QByteArray preprocessed = preprocess(QLatin1String("<stdin>"),
QByteArray("\n#define foo(a,b) a + b"
"\nfoo(1, 2)\n"));
QByteArray expected = "1 + 2";
QCOMPARE(preprocessed.trimmed(), expected);
}
void tst_Preprocessor::unfinished_function_like_macro_call() void tst_Preprocessor::unfinished_function_like_macro_call()
{ {
Client *client = 0; // no client. Client *client = 0; // no client.
...@@ -35,8 +20,8 @@ void tst_Preprocessor::unfinished_function_like_macro_call() ...@@ -35,8 +20,8 @@ void tst_Preprocessor::unfinished_function_like_macro_call()
QByteArray preprocessed = preprocess(QLatin1String("<stdin>"), QByteArray preprocessed = preprocess(QLatin1String("<stdin>"),
QByteArray("\n#define foo(a,b) a + b" QByteArray("\n#define foo(a,b) a + b"
"\nfoo(1, 2\n")); "\nfoo(1, 2\n"));
QByteArray expected = "foo";
QCOMPARE(preprocessed.trimmed(), expected); QCOMPARE(preprocessed.trimmed(), QByteArray("foo"));
} }
QTEST_APPLESS_MAIN(tst_Preprocessor) QTEST_APPLESS_MAIN(tst_Preprocessor)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment