Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is this a misuse of the typed test? #39

Closed
furgalep opened this issue Jun 22, 2014 · 4 comments
Closed

Is this a misuse of the typed test? #39

furgalep opened this issue Jun 22, 2014 · 4 comments

Comments

@furgalep
Copy link
Contributor

I've never seen the typed test before, but this looks like a misuse:

https://github.com/ethz-asl/kindr/blob/master/test/poses/PoseEigenTest.cpp#L86-L100

TYPED_TEST(HomogeneousTransformationTest, testSetIdentity)
{
  pose::HomogeneousTransformationPosition3RotationQuaternionD test(pos::Position3D(1,2,3),rot::RotationQuaternionPD(rot::AngleAxisPD(0.5,1.0,0,0)));

  test.setIdentity();

  ASSERT_EQ(test.getPosition().vector().x(), 0);
  ASSERT_EQ(test.getPosition().vector().y(), 0);
  ASSERT_EQ(test.getPosition().vector().z(), 0);

  ASSERT_EQ(test.getRotation().w(), 1);
  ASSERT_EQ(test.getRotation().x(), 0);
  ASSERT_EQ(test.getRotation().y(), 0);
  ASSERT_EQ(test.getRotation().z(), 0);
}

This code doesn't look like it is using the types in the test fixture.

@HannesSommer
Copy link
Contributor

Agreed. That does look like an incomplete conversion to a TYPED_TEST. I've seen only completed so far. But I only read some to debug problems that came to me somehow :).

@furgalep
Copy link
Contributor Author

haha

@gehrinch
Copy link
Member

That was only an initial test for testing the implementation.
The unit tests for poses are not really done.

@furgalep
Copy link
Contributor Author

Ah, thanks for looking. Okay, let's clean up as we implement the interface.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants