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

Add unit tests for mathematical classes. #74

Merged
merged 7 commits into from
Jul 20, 2017
Merged

Add unit tests for mathematical classes. #74

merged 7 commits into from
Jul 20, 2017

Conversation

at-wat
Copy link
Owner

@at-wat at-wat commented Jul 19, 2017

No description provided.

@at-wat at-wat self-assigned this Jul 19, 2017
@at-wat
Copy link
Owner Author

at-wat commented Jul 19, 2017

Travis-CI status notifier bot [PASSED]

All tests passed

Skipping "src/mcl_3dl/package.xml": 'tests'
build/test_results/mcl_3dl/gtest-test_vec3.xml: 4 tests
build/test_results/mcl_3dl/roslint-mcl_3dl.xml: 1 tests
build/test_results/mcl_3dl/rostest-test_tests_localization_rostest.xml: 1 tests
build/test_results/mcl_3dl/rostest-test_tests_tf_rostest.xml: 1 tests
build/test_results/mcl_3dl/rosunit-compare_pose.xml: 1 tests
build/test_results/mcl_3dl/rosunit-compare_tf.xml: 1 tests
Summary: 9 tests, 0 errors, 0 failures, 0 skipped

@at-wat
Copy link
Owner Author

at-wat commented Jul 20, 2017

Travis-CI status notifier bot [PASSED]

All tests passed

Skipping "src/mcl_3dl/package.xml": 'tests'
build/test_results/mcl_3dl/gtest-test_quat.xml: 4 tests
build/test_results/mcl_3dl/gtest-test_vec3.xml: 5 tests
build/test_results/mcl_3dl/roslint-mcl_3dl.xml: 1 tests
build/test_results/mcl_3dl/rostest-test_tests_localization_rostest.xml: 1 tests
build/test_results/mcl_3dl/rostest-test_tests_tf_rostest.xml: 1 tests
build/test_results/mcl_3dl/rosunit-compare_pose.xml: 1 tests
build/test_results/mcl_3dl/rosunit-compare_tf.xml: 1 tests
Summary: 14 tests, 0 errors, 0 failures, 0 skipped

@at-wat
Copy link
Owner Author

at-wat commented Jul 20, 2017

Travis-CI status notifier bot [PASSED]

All tests passed

Skipping "src/mcl_3dl/package.xml": 'tests'
build/test_results/mcl_3dl/gtest-test_nd.xml: 1 tests
build/test_results/mcl_3dl/gtest-test_quat.xml: 4 tests
build/test_results/mcl_3dl/gtest-test_vec3.xml: 5 tests
build/test_results/mcl_3dl/roslint-mcl_3dl.xml: 1 tests
build/test_results/mcl_3dl/rostest-test_tests_localization_rostest.xml: 1 tests
build/test_results/mcl_3dl/rostest-test_tests_tf_rostest.xml: 1 tests
build/test_results/mcl_3dl/rosunit-compare_pose.xml: 1 tests
build/test_results/mcl_3dl/rosunit-compare_tf.xml: 1 tests
Summary: 15 tests, 0 errors, 0 failures, 0 skipped

@at-wat
Copy link
Owner Author

at-wat commented Jul 20, 2017

Travis-CI status notifier bot [PASSED]

All tests passed

Skipping "src/mcl_3dl/package.xml": 'tests'
build/test_results/mcl_3dl/gtest-test_filter.xml: 3 tests
build/test_results/mcl_3dl/gtest-test_nd.xml: 1 tests
build/test_results/mcl_3dl/gtest-test_quat.xml: 4 tests
build/test_results/mcl_3dl/gtest-test_vec3.xml: 5 tests
build/test_results/mcl_3dl/roslint-mcl_3dl.xml: 1 tests
build/test_results/mcl_3dl/rostest-test_tests_localization_rostest.xml: 1 tests
build/test_results/mcl_3dl/rostest-test_tests_tf_rostest.xml: 1 tests
build/test_results/mcl_3dl/rosunit-compare_pose.xml: 1 tests
build/test_results/mcl_3dl/rosunit-compare_tf.xml: 1 tests
Summary: 18 tests, 0 errors, 0 failures, 0 skipped

@at-wat at-wat changed the title [WIP] Add unit tests. Add unit tests for mathematical classes. Jul 20, 2017
include/nd.h Outdated
sq2_ = sigma * sigma * 2.0;
}
/**
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert from this pr

ASSERT_LT(fabs(nl(3.0 * sigma) - likelihood0 * 0.011108997), 1e-6);
ASSERT_LT(fabs(nl(-3.0 * sigma) - likelihood0 * 0.011108997), 1e-6);

// Check integral
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

integrated value


TEST(QuatTest, testConstractors)
{
// Test quaternion elements style constructor
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and copy constructor


const Quat q(fw, up);

const Vec3 f = q * Vec3(1.0, 0.0, 0.0);
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// Rotate forward and up vectors and compare.


TEST(Vec3Test, testConstructors)
{
const Vec3 a(1.0, 2.0, 3.0);
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// Test vector elements constructor and copy constructor

@at-wat
Copy link
Owner Author

at-wat commented Jul 20, 2017

Travis-CI status notifier bot [PASSED]

All tests passed

Skipping "src/mcl_3dl/package.xml": 'tests'
build/test_results/mcl_3dl/gtest-test_filter.xml: 3 tests
build/test_results/mcl_3dl/gtest-test_nd.xml: 1 tests
build/test_results/mcl_3dl/gtest-test_quat.xml: 4 tests
build/test_results/mcl_3dl/gtest-test_vec3.xml: 5 tests
build/test_results/mcl_3dl/roslint-mcl_3dl.xml: 1 tests
build/test_results/mcl_3dl/rostest-test_tests_localization_rostest.xml: 1 tests
build/test_results/mcl_3dl/rostest-test_tests_tf_rostest.xml: 1 tests
build/test_results/mcl_3dl/rosunit-compare_pose.xml: 1 tests
build/test_results/mcl_3dl/rosunit-compare_tf.xml: 1 tests
Summary: 18 tests, 0 errors, 0 failures, 0 skipped

@at-wat at-wat merged commit 955c4f7 into master Jul 20, 2017
@at-wat at-wat deleted the add-unit-tests branch July 20, 2017 09:27
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

Successfully merging this pull request may close these issues.

1 participant