[cfe-commits] r164234 - /cfe/trunk/test/SemaCXX/for-range-examples.cpp

Fariborz Jahanian fjahanian at apple.com
Wed Sep 19 09:20:18 PDT 2012


Author: fjahanian
Date: Wed Sep 19 11:20:17 2012
New Revision: 164234

URL: http://llvm.org/viewvc/llvm-project?rev=164234&view=rev
Log:
Fix test better way.

Modified:
    cfe/trunk/test/SemaCXX/for-range-examples.cpp

Modified: cfe/trunk/test/SemaCXX/for-range-examples.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/for-range-examples.cpp?rev=164234&r1=164233&r2=164234&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/for-range-examples.cpp (original)
+++ cfe/trunk/test/SemaCXX/for-range-examples.cpp Wed Sep 19 11:20:17 2012
@@ -115,19 +115,19 @@
   }
 }
 
-#define assert(b) if (!b) { return 1; }
+#define assert(b) if (!(b)) { return 1; }
 int main() {
   int total = 0;
 
   for (auto n : range(1, 5)) {
     total += n;
   }
-  assert((total == 10));
+  assert(total == 10);
 
   for (auto n : range(10, 100, 10)) {
     total += n;
   }
-  assert((total == 460));
+  assert(total == 460);
 
   map_range::vector<char> chars;
   chars.push_back('a');
@@ -136,7 +136,7 @@
   for (char c : chars) {
     ++total;
   }
-  assert((total == 463));
+  assert(total == 463);
 
   typedef map_range::tuple<int, double> T;
   map_range::vector<T> pairs;
@@ -146,7 +146,7 @@
   for (auto a : map(map_range::mem_fun(&T::get<int>), pairs)) {
     total += a;
   }
-  assert((total == 500));
+  assert(total == 500);
 }
 
 // PR11793





More information about the cfe-commits mailing list