Skip to content

Commit

Permalink
Separate out the unit test for the degenerate case
Browse files Browse the repository at this point in the history
 * This is a trivial disturbance to the test to correct
   a spurious kcov error; see
   SimonKagstrom/kcov#339
 * Closes RobotLocomotion#14424
  • Loading branch information
ggould-tri committed Dec 8, 2020
1 parent cbd9b58 commit ef96847
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions math/test/gray_code_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@
namespace drake {
namespace math {
namespace {

GTEST_TEST(TestGrayCode, TestDegenerateCase) {
auto zero_code = CalculateReflectedGrayCodes(0);
EXPECT_EQ(zero_code.cols(), 0);
EXPECT_EQ(zero_code.rows(), 0);
}

GTEST_TEST(TestGrayCode, TestCalculateGrayCodes) {
for (int i = 0; i < 4; i++) {
auto test_code = CalculateReflectedGrayCodes(i);
Expand Down

0 comments on commit ef96847

Please sign in to comment.