From d3102a1ae137102f94f366d7167fc7695f322f8e Mon Sep 17 00:00:00 2001 From: Varun Agrawal Date: Fri, 28 Oct 2022 13:21:49 -0400 Subject: [PATCH] add matlab test for class property variables --- matlab/gtsam_tests/testProperties.m | 12 ++++++++++++ matlab/gtsam_tests/test_gtsam.m | 3 +++ 2 files changed, 15 insertions(+) create mode 100644 matlab/gtsam_tests/testProperties.m diff --git a/matlab/gtsam_tests/testProperties.m b/matlab/gtsam_tests/testProperties.m new file mode 100644 index 000000000..56f6ab8a6 --- /dev/null +++ b/matlab/gtsam_tests/testProperties.m @@ -0,0 +1,12 @@ +% test property reading and writing +import gtsam.*; + +isamParams = ISAM2Params; + +isamParams.relinearizeSkip = 123; +EXPECT('isamParams.relinearizeSkip',isamParams.relinearizeSkip==123); + +isamParams.enableRelinearization = false; +EXPECT('isamParams.enableRelinearization_false',isamParams.enableRelinearization==false); +isamParams.enableRelinearization = true; +EXPECT('isamParams.enableRelinearization_true',isamParams.enableRelinearization==true); diff --git a/matlab/gtsam_tests/test_gtsam.m b/matlab/gtsam_tests/test_gtsam.m index e43fbcf76..bf4e9a954 100644 --- a/matlab/gtsam_tests/test_gtsam.m +++ b/matlab/gtsam_tests/test_gtsam.m @@ -44,6 +44,9 @@ testStereoVOExample display 'Starting: testVisualISAMExample' testVisualISAMExample +display 'Starting: testProperties' +testProperties + %% MATLAB specific display 'Starting: testUtilities' testUtilities