OSDN Git Service

Fixed the output generated by CloneCG and VisitCG.
authorRoberto Raggi <roberto.raggi@nokia.com>
Wed, 21 Oct 2009 13:00:10 +0000 (15:00 +0200)
committerRoberto Raggi <roberto.raggi@nokia.com>
Wed, 21 Oct 2009 13:00:10 +0000 (15:00 +0200)
Removed CPLUSPLUS_BEGIN/END_NAMESPACE and replace CPLUSPLUS_USE_NAMESPACE with `using namespace CPlusPlus;'

tests/manual/cplusplus/main.cpp

index 1fcf76c..63efc8b 100644 (file)
@@ -95,11 +95,9 @@ public:
             "#include \"AST.h\"\n"
             "#include \"ASTVisitor.h\"\n"
             "\n"
-            "CPLUSPLUS_BEGIN_NAMESPACE\n" << std::endl;
+            "using namespace CPlusPlus;\n" << std::endl;
 
         accept(ast);
-
-        std::cout << "CPLUSPLUS_END_NAMESPACE" << std::endl;
     }
 
 protected:
@@ -250,14 +248,12 @@ public:
             "\n"
             "#include \"AST.h\"\n"
             "\n"
-            "CPLUSPLUS_BEGIN_NAMESPACE\n" << std::endl;
+            "using namespace CPlusPlus;\n" << std::endl;
 
         SearchListNodes listNodes(control());
         _listNodes = listNodes(ast);
 
         accept(ast);
-
-        std::cout << "CPLUSPLUS_END_NAMESPACE" << std::endl;
     }
 
 protected:
@@ -354,9 +350,7 @@ int main(int argc, char *argv[])
             const QByteArray appFileName = QFile::encodeName(appInfo.fileName());
 
             printf("Usage: %s [options]\n"
-                   "  --help                    Display this information\n"
-                   "  --test-rewriter           Test the tree rewriter\n"
-                   "  --test-pretty-printer     Test the pretty printer\n",
+                   "  --help                    Display this information\n",
                    appFileName.constData());
 
             return EXIT_SUCCESS;