Skip to content

Commit

Permalink
Add recursive ros::set-param tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Affonso-Gui committed May 1, 2022
1 parent dd8d2c5 commit 87af083
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions roseus/test/param-test.l
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,19 @@
)
)

(deftest test-set-param-recursive ()
(assert (ros::has-param "/test_dictionary") "[/test_dictionary] (ros::has-param) failed")
(assert (null (ros::has-param "/test_recursive")) "[/test_recursive] (ros::has-param) failed")
(let ((test-dict (ros::get-param "/test_dictionary"))
test-rec)
(ros::ros-info "/test_dictionary ~S" test-dict)
(ros::set-param "/test_recursive" test-dict)
(setq test-rec (ros::get-param "/test_recursive"))
(ros::ros-info "/test_recursive ~S" test-rec)
(assert (equal test-dict test-rec) "unable to perform ros::set-param recursively")
(assert (ros::delete-param "/test_recursive")
"(ros::delete-param \"test_recursive\") returns nil")))

(deftest test-param-default-value ()
;; Read parameter 1000 times with default value
(dotimes (i 1000)
Expand Down

0 comments on commit 87af083

Please sign in to comment.