From: Christopher Dykes Date: Tue, 21 Mar 2017 13:11:14 +0000 (-0700) Subject: Re-enable a couple of tests under MSVC X-Git-Tag: v2017.03.27.00~21 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d51aa234a25584be0c440ace0ccf831d4a7dc51b;p=folly.git Re-enable a couple of tests under MSVC Summary: VS 2017 is here and the bugs these were hitting have been fixed, so re-enable them. Reviewed By: yfeldblum Differential Revision: D4742829 fbshipit-source-id: 898e7cfea9de9ffa813c562c12e0e18e0577c8c3 --- diff --git a/folly/test/RangeTest.cpp b/folly/test/RangeTest.cpp index 791df2a0..8f333403 100644 --- a/folly/test/RangeTest.cpp +++ b/folly/test/RangeTest.cpp @@ -1112,14 +1112,10 @@ TEST(RangeFunc, Array) { testRangeFunc(x, 3); } -// MSVC doesn't like it when you try to std::move C arrays: -// https://developercommunity.visualstudio.com/content/problem/2441/ -#ifndef _MSC_VER TEST(RangeFunc, CArray) { int x[] {1, 2, 3, 4}; testRangeFunc(x, 4); } -#endif TEST(RangeFunc, ConstexprCArray) { static constexpr const int numArray[4] = {3, 17, 1, 9}; @@ -1133,15 +1129,8 @@ TEST(RangeFunc, ConstexprStdArray) { static constexpr const std::array numArray = {{3, 17, 1, 9}}; constexpr const auto numArrayRange = range(numArray); EXPECT_EQ(17, numArrayRange[1]); - // MSVC 2017 RC and earlier have an issue that causes the beginning and - // end of numArrayRange to point to different copies of numArray, causing - // this attempt to calculate the size to error at compile time because - // they don't point to parts of the same array :( - // https://developercommunity.visualstudio.com/content/problem/3216/ -#if !defined(_MSC_VER) || _MSC_VER > 191024629 constexpr const auto numArrayRangeSize = numArrayRange.size(); EXPECT_EQ(4, numArrayRangeSize); -#endif } TEST(RangeFunc, ConstexprStdArrayZero) {