@@ -435,7 +435,7 @@ class TestPreprocessor : public TestFixture {
435435 " #else\n "
436436 " #error abcd\n "
437437 " #endif\n " ;
438- ASSERT_EQUALS (" \n A\n " , getConfigsStr (filedata));
438+ ASSERT_EQUALS (" \n A=A \n " , getConfigsStr (filedata));
439439 }
440440
441441 void error2 () {
@@ -495,7 +495,7 @@ class TestPreprocessor : public TestFixture {
495495 " #else\n "
496496 " #error 2\n "
497497 " #endif\n " ;
498- ASSERT_EQUALS (" \n A\n A;B \n B\n " , getConfigsStr (filedata1));
498+ ASSERT_EQUALS (" \n A=A \n A=A;B=B \n B=B \n " , getConfigsStr (filedata1));
499499
500500 const char filedata2[] = " #ifndef A\n "
501501 " #error 1\n "
@@ -527,7 +527,7 @@ class TestPreprocessor : public TestFixture {
527527 " #else\n "
528528 " #error \" 2\"\n "
529529 " #endif\n " ;
530- ASSERT_EQUALS (" \n B\n " , getConfigsStr (filedata));
530+ ASSERT_EQUALS (" \n B=B \n " , getConfigsStr (filedata));
531531 }
532532
533533 void error8 () {
@@ -540,7 +540,7 @@ class TestPreprocessor : public TestFixture {
540540 " #ifndef C\n "
541541 " #error aa\n "
542542 " #endif" ;
543- ASSERT_EQUALS (" A;B ;C\n A;C\n C\n " , getConfigsStr (filedata));
543+ ASSERT_EQUALS (" A=A;B=B ;C\n A=A ;C\n C\n " , getConfigsStr (filedata));
544544 }
545545
546546 void setPlatformInfo () {
@@ -581,7 +581,7 @@ class TestPreprocessor : public TestFixture {
581581 " #endfile\n "
582582 " #ifdef ABC\n "
583583 " #endif" ;
584- ASSERT_EQUALS (" \n ABC\n " , getConfigsStr (filedata));
584+ ASSERT_EQUALS (" \n ABC=ABC \n " , getConfigsStr (filedata));
585585 }
586586
587587 void includeguard2 () {
@@ -592,7 +592,7 @@ class TestPreprocessor : public TestFixture {
592592 " \n "
593593 " #endif\n "
594594 " #endfile\n " ;
595- ASSERT_EQUALS (" \n ABC\n " , getConfigsStr (filedata));
595+ ASSERT_EQUALS (" \n ABC=ABC \n " , getConfigsStr (filedata));
596596 }
597597
598598
@@ -611,7 +611,7 @@ class TestPreprocessor : public TestFixture {
611611 // Expected configurations: "" and "ABC"
612612 ASSERT_EQUALS (2 , actual.size ());
613613 ASSERT_EQUALS (" \n\n\n int main ( ) { }" , actual.at (" " ));
614- ASSERT_EQUALS (" \n #line 1 \" abc.h\"\n class A { } ;\n #line 4 \" file.c\"\n int main ( ) { }" , actual.at (" ABC" ));
614+ ASSERT_EQUALS (" \n #line 1 \" abc.h\"\n class A { } ;\n #line 4 \" file.c\"\n int main ( ) { }" , actual.at (" ABC=ABC " ));
615615 }
616616
617617 void if0 () {
@@ -648,7 +648,7 @@ class TestPreprocessor : public TestFixture {
648648 " #else\n "
649649 " GHI\n "
650650 " #endif\n " ;
651- ASSERT_EQUALS (" \n DEF1\n DEF2\n " , getConfigsStr (filedata));
651+ ASSERT_EQUALS (" \n DEF1=DEF1 \n DEF2=DEF2 \n " , getConfigsStr (filedata));
652652 }
653653 }
654654
@@ -668,7 +668,7 @@ class TestPreprocessor : public TestFixture {
668668 " #if defined(A) && defined(B)\n "
669669 " ab\n "
670670 " #endif\n " ;
671- ASSERT_EQUALS (" \n A\n A; B\n " , getConfigsStr (filedata));
671+ ASSERT_EQUALS (" \n A=A \n A=A;B= B\n " , getConfigsStr (filedata));
672672
673673 if_cond2b ();
674674 if_cond2c ();
@@ -685,7 +685,7 @@ class TestPreprocessor : public TestFixture {
685685 " #else\n "
686686 " a\n "
687687 " #endif\n " ;
688- TODO_ASSERT_EQUALS (" \n A;B\n " , " \n A\n B\n " , getConfigsStr (filedata));
688+ TODO_ASSERT_EQUALS (" \n A;B=B \n " , " \n A\n B=B \n " , getConfigsStr (filedata));
689689 }
690690
691691 void if_cond2c () {
@@ -699,7 +699,7 @@ class TestPreprocessor : public TestFixture {
699699 " #else\n "
700700 " a\n "
701701 " #endif\n " ;
702- TODO_ASSERT_EQUALS (" \n A\n A;B\n " , " \n A\n B\n " , getConfigsStr (filedata));
702+ TODO_ASSERT_EQUALS (" \n A\n A;B=B \n " , " \n A\n B=B \n " , getConfigsStr (filedata));
703703 }
704704
705705 void if_cond2d () {
@@ -718,7 +718,7 @@ class TestPreprocessor : public TestFixture {
718718 " !b\n "
719719 " #endif\n "
720720 " #endif\n " ;
721- ASSERT_EQUALS (" \n A\n A;B\n B\n " , getConfigsStr (filedata));
721+ ASSERT_EQUALS (" \n A\n A;B=B \n B=B \n " , getConfigsStr (filedata));
722722 }
723723
724724 void if_cond2e () {
@@ -737,7 +737,7 @@ class TestPreprocessor : public TestFixture {
737737 " abc\n "
738738 " #endif\n "
739739 " #endif\n " ;
740- ASSERT_EQUALS (" \n A\n A;B; C\n " , getConfigsStr (filedata));
740+ ASSERT_EQUALS (" \n A=A \n A=A;B=B;C= C\n " , getConfigsStr (filedata));
741741 }
742742
743743 void if_cond4 () {
@@ -758,7 +758,7 @@ class TestPreprocessor : public TestFixture {
758758 " #endif\n "
759759 " }\n "
760760 " #endif\n " ;
761- ASSERT_EQUALS (" \n A\n A;B\n " , getConfigsStr (filedata));
761+ ASSERT_EQUALS (" \n A\n A;B=B \n " , getConfigsStr (filedata));
762762 }
763763
764764 {
@@ -793,20 +793,20 @@ class TestPreprocessor : public TestFixture {
793793 " #if defined(B) && defined(A)\n "
794794 " ef\n "
795795 " #endif\n " ;
796- ASSERT_EQUALS (" \n A; B\n " , getConfigsStr (filedata));
796+ ASSERT_EQUALS (" \n A=A;B= B\n " , getConfigsStr (filedata));
797797 }
798798
799799 void if_cond6 () {
800800 const char filedata[] = " \n "
801801 " #if defined(A) && defined(B))\n "
802802 " #endif\n " ;
803- ASSERT_EQUALS (" \n A; B\n " , getConfigsStr (filedata));
803+ ASSERT_EQUALS (" \n A=A;B= B\n " , getConfigsStr (filedata));
804804 }
805805
806806 void if_cond8 () {
807807 const char filedata[] = " #if defined(A) + defined(B) + defined(C) != 1\n "
808808 " #endif\n " ;
809- TODO_ASSERT_EQUALS (" \n A\n " , " \n A;B; C\n " , getConfigsStr (filedata));
809+ TODO_ASSERT_EQUALS (" \n A=A \n " , " \n A=A;B=B;C= C\n " , getConfigsStr (filedata));
810810 }
811811
812812
@@ -865,7 +865,7 @@ class TestPreprocessor : public TestFixture {
865865 const char filedata[] = " #if defined(DEF_10) || defined(DEF_11)\n "
866866 " a1;\n "
867867 " #endif\n " ;
868- ASSERT_EQUALS (" \n DEF_10; DEF_11\n " , getConfigsStr (filedata));
868+ ASSERT_EQUALS (" \n DEF_10=DEF_10;DEF_11= DEF_11\n " , getConfigsStr (filedata));
869869 }
870870
871871 void if_or_2 () {
@@ -1529,7 +1529,7 @@ class TestPreprocessor : public TestFixture {
15291529 ASSERT_EQUALS (2 , actual.size ());
15301530 const std::string expected (" void f ( ) {\n\n\n }" );
15311531 ASSERT_EQUALS (expected, actual.at (" " ));
1532- ASSERT_EQUALS (expected, actual.at (" A" ));
1532+ ASSERT_EQUALS (expected, actual.at (" A=A " ));
15331533 }
15341534
15351535 void handle_error () {
@@ -1649,7 +1649,7 @@ class TestPreprocessor : public TestFixture {
16491649 // Compare results..
16501650 ASSERT_EQUALS (2 , actual.size ());
16511651 ASSERT_EQUALS (" \n\n\n\n\n $20" , actual.at (" " ));
1652- ASSERT_EQUALS (" \n\n\n\n\n $10" , actual.at (" A" ));
1652+ ASSERT_EQUALS (" \n\n\n\n\n $10" , actual.at (" A=A " ));
16531653 ASSERT_EQUALS (" " , errout_str ());
16541654 }
16551655
@@ -1701,7 +1701,7 @@ class TestPreprocessor : public TestFixture {
17011701 // Compare results..
17021702 ASSERT_EQUALS (2 , actual.size ());
17031703 ASSERT_EQUALS (" " , actual.at (" " ));
1704- ASSERT_EQUALS (" \n A\n\n\n A" , actual.at (" ABC" ));
1704+ ASSERT_EQUALS (" \n A\n\n\n A" , actual.at (" ABC=ABC " ));
17051705 }
17061706
17071707 void define_if1 () {
@@ -1942,9 +1942,9 @@ class TestPreprocessor : public TestFixture {
19421942 // Compare results..
19431943 ASSERT_EQUALS (4 , actual.size ());
19441944 ASSERT (actual.find (" " ) != actual.end ());
1945- ASSERT (actual.find (" BAR" ) != actual.end ());
1946- ASSERT (actual.find (" FOO" ) != actual.end ());
1947- ASSERT (actual.find (" BAR; FOO" ) != actual.end ());
1945+ ASSERT (actual.find (" BAR=BAR " ) != actual.end ());
1946+ ASSERT (actual.find (" FOO=FOO " ) != actual.end ());
1947+ ASSERT (actual.find (" BAR=BAR;FOO= FOO" ) != actual.end ());
19481948 }
19491949
19501950
@@ -1978,9 +1978,9 @@ class TestPreprocessor : public TestFixture {
19781978 // cases should be fixed whenever this other bug is fixed
19791979 ASSERT_EQUALS (2U , actual.size ());
19801980
1981- ASSERT_EQUALS_MSG (true , (actual.find (" A" ) != actual.end ()), " A is expected to be checked but it was not checked" );
1981+ ASSERT_EQUALS_MSG (true , (actual.find (" A=A " ) != actual.end ()), " A is expected to be checked but it was not checked" );
19821982
1983- ASSERT_EQUALS_MSG (true , (actual.find (" A;A; B" ) == actual.end ()), " A;A;B is expected to NOT be checked but it was checked" );
1983+ ASSERT_EQUALS_MSG (true , (actual.find (" A=A;A=A;B= B" ) == actual.end ()), " A;A;B is expected to NOT be checked but it was checked" );
19841984 }
19851985
19861986 void invalid_define_1 () {
@@ -2146,7 +2146,7 @@ class TestPreprocessor : public TestFixture {
21462146 " qwerty\n "
21472147 " #endif \n " ;
21482148
2149- ASSERT_EQUALS (" \n WIN32\n " , getConfigsStr (filedata));
2149+ ASSERT_EQUALS (" \n WIN32=WIN32 \n " , getConfigsStr (filedata));
21502150 }
21512151
21522152 void getConfigs2 () {
@@ -2167,7 +2167,7 @@ class TestPreprocessor : public TestFixture {
21672167 " c\n "
21682168 " #endif\n " ;
21692169
2170- ASSERT_EQUALS (" \n ABC\n ABC; DEF\n " , getConfigsStr (filedata));
2170+ ASSERT_EQUALS (" \n ABC=ABC \n ABC=ABC;DEF= DEF\n " , getConfigsStr (filedata));
21712171 }
21722172
21732173 void getConfigs4 () {
@@ -2177,7 +2177,7 @@ class TestPreprocessor : public TestFixture {
21772177 " #ifdef ABC\n "
21782178 " A\n "
21792179 " #endif\n " ;
2180- ASSERT_EQUALS (" \n ABC\n " , getConfigsStr (filedata));
2180+ ASSERT_EQUALS (" \n ABC=ABC \n " , getConfigsStr (filedata));
21812181 }
21822182
21832183 void getConfigs5 () {
@@ -2189,7 +2189,7 @@ class TestPreprocessor : public TestFixture {
21892189 " C\n "
21902190 " #endif\n "
21912191 " #endif\n " ;
2192- ASSERT_EQUALS (" \n ABC\n DEF\n " , getConfigsStr (filedata));
2192+ ASSERT_EQUALS (" \n ABC=ABC \n DEF=DEF \n " , getConfigsStr (filedata));
21932193 }
21942194
21952195 void getConfigs7 () {
@@ -2199,7 +2199,7 @@ class TestPreprocessor : public TestFixture {
21992199 " B\n "
22002200 " #endif\n "
22012201 " #endif\n " ;
2202- ASSERT_EQUALS (" \n ABC\n " , getConfigsStr (filedata));
2202+ ASSERT_EQUALS (" \n ABC=ABC \n " , getConfigsStr (filedata));
22032203 }
22042204
22052205 void getConfigs7a () {
@@ -2219,7 +2219,7 @@ class TestPreprocessor : public TestFixture {
22192219 " B\n "
22202220 " #endif\n "
22212221 " #endif\n " ;
2222- ASSERT_EQUALS (" \n ABC\n " , getConfigsStr (filedata));
2222+ ASSERT_EQUALS (" \n ABC=ABC \n " , getConfigsStr (filedata));
22232223 }
22242224
22252225 void getConfigs7c () {
@@ -2229,7 +2229,7 @@ class TestPreprocessor : public TestFixture {
22292229 " B\n "
22302230 " #endif\n "
22312231 " #endif\n " ;
2232- ASSERT_EQUALS (" \n ABC\n " , getConfigsStr (filedata));
2232+ ASSERT_EQUALS (" \n ABC=ABC \n " , getConfigsStr (filedata));
22332233 }
22342234
22352235 void getConfigs7d () {
@@ -2239,7 +2239,7 @@ class TestPreprocessor : public TestFixture {
22392239 " B\n "
22402240 " #endif\n "
22412241 " #endif\n " ;
2242- ASSERT_EQUALS (" \n ABC\n " , getConfigsStr (filedata));
2242+ ASSERT_EQUALS (" \n ABC=ABC \n " , getConfigsStr (filedata));
22432243 }
22442244
22452245 void getConfigs7e () {
@@ -2252,7 +2252,7 @@ class TestPreprocessor : public TestFixture {
22522252 " #endif\n "
22532253 " #endfile\n "
22542254 " #endif\n " ;
2255- ASSERT_EQUALS (" \n ABC\n " , getConfigsStr (filedata));
2255+ ASSERT_EQUALS (" \n ABC=ABC \n " , getConfigsStr (filedata));
22562256 }
22572257
22582258 void getConfigs8 () {
@@ -2334,7 +2334,7 @@ class TestPreprocessor : public TestFixture {
23342334 " #error \" !Y\"\n "
23352335 " #endif\n "
23362336 " #endif\n " ;
2337- ASSERT_EQUALS (" \n X;Y\n Y\n " , getConfigsStr (filedata2));
2337+ ASSERT_EQUALS (" \n X=X ;Y\n Y\n " , getConfigsStr (filedata2));
23382338 }
23392339
23402340 void getConfigsD1 () {
@@ -2344,14 +2344,14 @@ class TestPreprocessor : public TestFixture {
23442344 " #endif\n "
23452345 " #endif\n " ;
23462346 ASSERT_EQUALS (" \n " , getConfigsStr (filedata, " -DX" ));
2347- ASSERT_EQUALS (" \n X\n Y\n " , getConfigsStr (filedata));
2347+ ASSERT_EQUALS (" \n X=X \n Y=Y \n " , getConfigsStr (filedata));
23482348 }
23492349
23502350 void getConfigsU1 () {
23512351 const char filedata[] = " #ifdef X\n "
23522352 " #endif\n " ;
23532353 ASSERT_EQUALS (" \n " , getConfigsStr (filedata, " -UX" ));
2354- ASSERT_EQUALS (" \n X\n " , getConfigsStr (filedata));
2354+ ASSERT_EQUALS (" \n X=X \n " , getConfigsStr (filedata));
23552355 }
23562356
23572357 void getConfigsU2 () {
@@ -2375,8 +2375,8 @@ class TestPreprocessor : public TestFixture {
23752375 const char filedata[] = " #if defined(X) || defined(Y) || defined(Z)\n "
23762376 " #else\n "
23772377 " #endif\n " ;
2378- ASSERT_EQUALS (" \n Y; Z\n " , getConfigsStr (filedata, " -UX" ));
2379- ASSERT_EQUALS (" \n X;Y; Z\n " , getConfigsStr (filedata));
2378+ ASSERT_EQUALS (" \n Y=Y;Z= Z\n " , getConfigsStr (filedata, " -UX" ));
2379+ ASSERT_EQUALS (" \n X=X;Y=Y;Z= Z\n " , getConfigsStr (filedata));
23802380 }
23812381
23822382 void getConfigsU5 () {
0 commit comments