Skip to content

Commit 4326401

Browse files
committed
gcd: Add more tests that require few more divisions
@colincross identified gcd does not have a single case whose answer is not 0, 1, or the smaller of the two inputs.
1 parent b65e094 commit 4326401

File tree

1 file changed

+1
-1
lines changed
  • libcxx/test/std/numerics/numeric.ops/numeric.ops.gcd

1 file changed

+1
-1
lines changed

libcxx/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ constexpr struct {
2727
int x;
2828
int y;
2929
int expect;
30-
} Cases[] = {{0, 0, 0}, {1, 0, 1}, {0, 1, 1}, {1, 1, 1}, {2, 3, 1}, {2, 4, 2}, {11, 9, 1}, {36, 17, 1}, {36, 18, 18}};
30+
} Cases[] = {{0, 0, 0}, {1, 0, 1}, {0, 1, 1}, {1, 1, 1}, {2, 3, 1}, {2, 4, 2}, {11, 9, 1}, {36, 17, 1}, {36, 18, 18}, {25, 30, 5}, {24, 16, 8}, {256, 100, 4}};
3131

3232
template <typename Input1, typename Input2, typename Output>
3333
constexpr bool test0(int in1, int in2, int out)

0 commit comments

Comments
 (0)