to_string is not supported everywhere
authorMichael Lee <mzlee@fb.com>
Tue, 1 Mar 2016 15:51:30 +0000 (07:51 -0800)
committerFacebook Github Bot 5 <facebook-github-bot-5-bot@fb.com>
Tue, 1 Mar 2016 16:05:45 +0000 (08:05 -0800)
Summary: Also remove an extra `#include <strstream>` from JsonTest.cpp as it is no longer necessary.

Reviewed By: yfeldblum

Differential Revision: D2991381

fb-gh-sync-id: 386b8281726d034933ebdc26733dd35dc5ace949
shipit-source-id: 386b8281726d034933ebdc26733dd35dc5ace949

folly/test/IPAddressTest.cpp
folly/test/JsonTest.cpp

index 6d2b60c23195bfafae045bbd558d4fdc06ea5bb1..785a08c4eb12b588f10cedefcbd9383cc7a3558d 100644 (file)
@@ -444,8 +444,8 @@ TEST_P(IPAddressMaskTest, Masks) {
   IPAddress ip(param.address);
   IPAddress masked = ip.mask(param.mask);
   EXPECT_EQ(param.subnet, masked.str())
-      << param.address << "/" << to_string(param.mask)
-      << " -> " << param.subnet;
+      << param.address << "/" << folly::to<std::string>(param.mask) << " -> "
+      << param.subnet;
 }
 
 // Test inSubnet calculations
@@ -567,7 +567,7 @@ TEST(IPAddress, V6Types) {
         break;
       default:
         throw std::range_error("Invalid expected type: " +
-                               to_string(tc.second));
+                               folly::to<std::string>(tc.second));
     }
   }
 }
index 185401691a6775c1cbc7d2b49214998f28b20da2..0dd937caa3b7cdfe4e0ca0b899ef54386bfbb9d2 100644 (file)
@@ -14,7 +14,6 @@
  * limitations under the License.
  */
 #include <limits>
-#include <strstream>
 
 #include <boost/next_prior.hpp>
 #include <folly/json.h>