add folly::as_const, like C++17's std::as_const
[folly.git] / folly / test / FileLockTest.cpp
index 8001e594b920c2da644555ae4b35b4d81f799294..a72995ccf9ecf66e4081dddd98cbc958f4e187da 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2016 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,6 @@
 #include <mutex>
 
 #include <glog/logging.h>
-#include <gtest/gtest.h>
 #include <boost/thread/locks.hpp>
 
 #include <folly/String.h>
@@ -27,6 +26,7 @@
 #include <folly/experimental/TestUtil.h>
 #include <folly/experimental/io/FsUtil.h>
 #include <folly/portability/GFlags.h>
+#include <folly/portability/GTest.h>
 
 using namespace folly;
 using namespace folly::test;
@@ -60,9 +60,9 @@ TEST(File, Locks) {
 
   enum LockMode { EXCLUSIVE, SHARED };
   auto testLock = [&](LockMode mode, bool expectedSuccess) {
-    auto ret = Subprocess({helper.native(),
+    auto ret = Subprocess({helper.string(),
                            mode == SHARED ? "-s" : "-x",
-                           tempFile.path().native()}).wait();
+                           tempFile.path().string()}).wait();
     EXPECT_TRUE(ret.exited());
     if (ret.exited()) {
       EXPECT_EQ(expectedSuccess ? 0 : 42, ret.exitStatus());