You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
libcxx/test/std/numerics/numeric.ops/numeric.ops.gcd
Billy Robert O'Neal III 3f9bc2d28c Resolve integer overflow warnings in GCD and LCM tests
lcm.pass.cpp:
19: Update headers to that actually used in the test.
41: test0 was triggering narrowing warnings for all callers, because the
inputs were always ints, but some of the explicit template arguments were
smaller than that. Instead, have this function accept ints and static_cast
explicitly to the types we want before calling std::lcm.
47: Replace unnecessary ternary.
55: Use foo_t instead of typename foo<>::type
111/116: intX_t were not std::qualified but only <cfoo> headers were included.
141: C1XX has a bug where it interprets 2147483648 as unsigned int. Then the
negation trips "negation of unsigned value, result still unsigned" warnings.
Perma-workaround this issue by saying INT_MIN, which better documents the
intended behavior and avoids triggering warnings on C1XX.

gcd.pass.cpp:
Same changes as lcm.pass.cpp but for GCD.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@302472 91177308-0d34-0410-b5e6-96231b3b80d8
8 years ago
..
gcd.bool1.fail.cpp [libcxx] [test] D27027: Strip trailing whitespace. 8 years ago
gcd.bool2.fail.cpp [libcxx] [test] D27027: Strip trailing whitespace. 8 years ago
gcd.bool3.fail.cpp [libcxx] [test] D27027: Strip trailing whitespace. 8 years ago
gcd.bool4.fail.cpp [libcxx] [test] D27027: Strip trailing whitespace. 8 years ago
gcd.not_integral1.fail.cpp [libcxx] [test] D27027: Strip trailing whitespace. 8 years ago
gcd.not_integral2.fail.cpp [libcxx] [test] D27027: Strip trailing whitespace. 8 years ago
gcd.pass.cpp Resolve integer overflow warnings in GCD and LCM tests 8 years ago