diff --git a/test/testsimplifytokens.cpp b/test/testsimplifytokens.cpp index c4343350e..641c372c7 100644 --- a/test/testsimplifytokens.cpp +++ b/test/testsimplifytokens.cpp @@ -1444,6 +1444,13 @@ private: { ASSERT_EQUALS("; a = b ; while ( a ) { b = 0 ; a = b ; }", simplifyIfAssign(";while(a=b) { b = 0; }")); ASSERT_EQUALS("; a . b = c ; while ( a . b ) { c = 0 ; a . b = c ; }", simplifyIfAssign(";while(a.b=c) { c=0; }")); + ASSERT_EQUALS("struct hfs_bnode * node ; " + "struct hfs_btree * tree ; " + "node = tree . node_hash [ i ++ ] ; " + "while ( node ) { node = tree . node_hash [ i ++ ] ; }", + tok("struct hfs_bnode *node;" + "struct hfs_btree *tree;" + "while ((node = tree->node_hash[i++])) { }")); } diff --git a/test/testtokenize.cpp b/test/testtokenize.cpp index a4a54fb87..2154d534d 100644 --- a/test/testtokenize.cpp +++ b/test/testtokenize.cpp @@ -40,7 +40,7 @@ private: void run() { TEST_CASE(tokenize1); - + TEST_CASE(minus); TEST_CASE(longtok);