From 1c74978a92233ac6f8a58b2749a9e4615868f9ef Mon Sep 17 00:00:00 2001 From: Reijo Tomperi Date: Sun, 15 Mar 2009 23:39:58 +0200 Subject: [PATCH] test case stringify3 added --- test/testpreprocessor.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/testpreprocessor.cpp b/test/testpreprocessor.cpp index 4572d9cca..68ed554bf 100644 --- a/test/testpreprocessor.cpp +++ b/test/testpreprocessor.cpp @@ -108,6 +108,7 @@ private: TEST_CASE(stringify); TEST_CASE(stringify2); + // TODO TEST_CASE(stringify3); TEST_CASE(ifdefwithfile); TEST_CASE(pragma); } @@ -763,6 +764,17 @@ private: ASSERT_EQUALS("\ng(\"abc\");", actual); } + void stringify3() + { + const char filedata[] = "#define A(x) g(#x)\n" + "A( abc);"; + + // expand macros.. + std::string actual = OurPreprocessor::expandMacros(filedata); + + ASSERT_EQUALS("\ng(\"abc\");", actual); + } + void pragma() { const char filedata[] = "#pragma once\n"