Add testcase related to commit 0d26a79f2c.

cover up the case when there's at least a token before 'namespace %type% { }'.
This commit is contained in:
Edoardo Prezioso 2012-11-04 23:14:41 +01:00
parent 4e25ffa948
commit 71150e987d
1 changed files with 6 additions and 0 deletions

View File

@ -2409,6 +2409,12 @@ private:
ASSERT_EQUALS("", tok(code)); ASSERT_EQUALS("", tok(code));
} }
{
const char code[] = "; namespace std { }";
ASSERT_EQUALS(";", tok(code));
}
{ {
const char code[] = "using namespace std; namespace a{ namespace b{ void f(){} } }"; const char code[] = "using namespace std; namespace a{ namespace b{ void f(){} } }";