Remove folly::Future conversion constructor
[folly.git] / folly / test / LazyTest.cpp
index 6d3eed06b48fd3a3376cedec7172ffdf7d82ed47..5fe9c80860b7e8482168509620dff9d4a849850c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2014 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -19,7 +19,7 @@
 #include <functional>
 #include <iostream>
 
-#include <gtest/gtest.h>
+#include <folly/portability/GTest.h>
 
 namespace folly {
 
@@ -27,7 +27,8 @@ TEST(Lazy, Simple) {
   int computeCount = 0;
 
   auto const val = folly::lazy([&]() -> int {
-    EXPECT_EQ(++computeCount, 1);
+    ++computeCount;
+    EXPECT_EQ(computeCount, 1);
     return 12;
   });
   EXPECT_EQ(computeCount, 0);
@@ -46,7 +47,8 @@ TEST(Lazy, Simple) {
 
 auto globalCount = folly::lazy([]{ return 0; });
 auto const foo = folly::lazy([]() -> std::string {
-  EXPECT_EQ(++globalCount(), 1);
+  ++globalCount();
+  EXPECT_EQ(globalCount(), 1);
   return std::string("YEP");
 });
 
@@ -105,4 +107,3 @@ TEST(Lazy, Consty) {
 }
 
 }
-