Use the GTest portability headers
[folly.git] / folly / test / ProducerConsumerQueueTest.cpp
index 6ade4a1abe5670d1c55163759938c05a985dcff3..4fe0a6653bf5fc4dee61713f7093748ca5951393 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2015 Facebook, Inc.
+ * Copyright 2016 Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 #include <folly/ProducerConsumerQueue.h>
 
-#include <gtest/gtest.h>
-#include <vector>
 #include <atomic>
 #include <chrono>
 #include <memory>
 #include <thread>
+#include <vector>
+
 #include <glog/logging.h>
 
+#include <folly/portability/GTest.h>
+
 //////////////////////////////////////////////////////////////////////
 
 namespace {
@@ -160,11 +162,11 @@ struct CorrectnessTest {
         } else {
           goto again;
         }
+        EXPECT_EQ(*data, expect);
       } else {
+        EXPECT_EQ(*data, expect);
         queue_.popFront();
       }
-
-      EXPECT_EQ(*data, expect);
     }
   }
 
@@ -205,7 +207,7 @@ void correctnessTestType(const std::string& type) {
 struct DtorChecker {
   static unsigned int numInstances;
   DtorChecker() { ++numInstances; }
-  DtorChecker(const DtorChecker& o) { ++numInstances; }
+  DtorChecker(const DtorChecker& /* o */) { ++numInstances; }
   ~DtorChecker() { --numInstances; }
 };