[libcxx] r294798 - Fix a bug I introduced in the tests for experimental::lcm and experimental::gcd.
Marshall Clow via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 10 14:44:15 PST 2017
Author: marshall
Date: Fri Feb 10 16:44:14 2017
New Revision: 294798
URL: http://llvm.org/viewvc/llvm-project?rev=294798&view=rev
Log:
Fix a bug I introduced in the tests for experimental::lcm and experimental::gcd.
Modified:
libcxx/trunk/test/std/experimental/numeric/numeric.ops/numeric.ops.gcd/gcd.pass.cpp
libcxx/trunk/test/std/experimental/numeric/numeric.ops/numeric.ops.lcm/lcm.pass.cpp
Modified: libcxx/trunk/test/std/experimental/numeric/numeric.ops/numeric.ops.gcd/gcd.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/numeric/numeric.ops/numeric.ops.gcd/gcd.pass.cpp?rev=294798&r1=294797&r2=294798&view=diff
==============================================================================
--- libcxx/trunk/test/std/experimental/numeric/numeric.ops/numeric.ops.gcd/gcd.pass.cpp (original)
+++ libcxx/trunk/test/std/experimental/numeric/numeric.ops/numeric.ops.gcd/gcd.pass.cpp Fri Feb 10 16:44:14 2017
@@ -132,7 +132,7 @@ int main()
// LWG#2792
{
- auto res = std::gcd((int64_t)1234, (int32_t)-2147483648);
+ auto res = std::experimental::gcd((int64_t)1234, (int32_t)-2147483648);
static_assert( std::is_same<decltype(res), std::common_type<int64_t, int32_t>::type>::value, "");
assert(res == 2);
}
Modified: libcxx/trunk/test/std/experimental/numeric/numeric.ops/numeric.ops.lcm/lcm.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/numeric/numeric.ops/numeric.ops.lcm/lcm.pass.cpp?rev=294798&r1=294797&r2=294798&view=diff
==============================================================================
--- libcxx/trunk/test/std/experimental/numeric/numeric.ops/numeric.ops.lcm/lcm.pass.cpp (original)
+++ libcxx/trunk/test/std/experimental/numeric/numeric.ops/numeric.ops.lcm/lcm.pass.cpp Fri Feb 10 16:44:14 2017
@@ -131,8 +131,8 @@ int main()
// LWG#2792
{
- auto res1 = std::lcm((int64_t)1234, (int32_t)-2147483648);
- (void) std::lcm<int, unsigned long>(INT_MIN, 2); // this used to trigger UBSAN
+ auto res1 = std::experimental::lcm((int64_t)1234, (int32_t)-2147483648);
+ (void) std::experimental::lcm<int, unsigned long>(INT_MIN, 2); // this used to trigger UBSAN
static_assert( std::is_same<decltype(res1), std::common_type<int64_t, int32_t>::type>::value, "");
assert(res1 == 1324997410816LL);
}
More information about the cfe-commits
mailing list