fix some of the warning/errors clang 3.1 reports - 2
[folly.git] / folly / test / DynamicConverterTest.cpp
index 47e87dc078ed6de254306f17836cdd3482523676..83c95b18e2889b79305ba5fe544a56d5bfa3abad 100644 (file)
@@ -1,5 +1,5 @@
 /*
 /*
- * Copyright 2012 Facebook, Inc.
+ * Copyright 2013 Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -17,6 +17,8 @@
 // @author Nicholas Ormrod <njormrod@fb.com>
 
 #include "folly/DynamicConverter.h"
 // @author Nicholas Ormrod <njormrod@fb.com>
 
 #include "folly/DynamicConverter.h"
+
+#include <algorithm>
 #include <gtest/gtest.h>
 #include <gflags/gflags.h>
 #include "folly/Benchmark.h"
 #include <gtest/gtest.h>
 #include <gflags/gflags.h>
 #include "folly/Benchmark.h"
@@ -143,6 +145,7 @@ TEST(DynamicConverter, map_keyed_by_string) {
 TEST(DynamicConverter, map_to_vector_of_pairs) {
   dynamic d1 = dynamic::object("1", "one")("2", "two");
   auto i1 = convertTo<std::vector<std::pair<std::string, std::string>>>(d1);
 TEST(DynamicConverter, map_to_vector_of_pairs) {
   dynamic d1 = dynamic::object("1", "one")("2", "two");
   auto i1 = convertTo<std::vector<std::pair<std::string, std::string>>>(d1);
+  std::sort(i1.begin(), i1.end());
   decltype(i1) i1b = { { "1", "one" }, { "2", "two" } };
   EXPECT_EQ(i1, i1b);
 }
   decltype(i1) i1b = { { "1", "one" }, { "2", "two" } };
   EXPECT_EQ(i1, i1b);
 }