{"action":"created","comment":{"url":"https://api.github.com/repos/opensim-org/opensim-core/pulls/comments/26281386","id":26281386,"diff_hunk":"@@ -795,13 +796,38 @@ int main(int argc, char* argv[])\n         cout << \"**************************************************\" << endl;\n         cout << \"TEST: Exception Handling\" << endl;\n \n-        //constructor\n-        SimTK_TEST_MUST_THROW(MuscleFixedWidthPennationModel fibKinEX = \n-            MuscleFixedWidthPennationModel(0, optPenAng, SimTK::Pi/2.0));\n-        SimTK_TEST_MUST_THROW(MuscleFixedWidthPennationModel fibKinEX = \n-            MuscleFixedWidthPennationModel(optFibLen, -0.01, SimTK::Pi/2.0));\n-        SimTK_TEST_MUST_THROW(MuscleFixedWidthPennationModel fibKinEX = \n-            MuscleFixedWidthPennationModel(optFibLen, SimTK::Pi/2, SimTK::Pi/2.0));\n+        // Test property bounds.\n+        {\n+            MuscleFixedWidthPennationModel mfwpm;\n+            mfwpm.set_optimal_fiber_length(0.0);\n+            SimTK_TEST_MUST_THROW_EXC(mfwpm.finalizeFromProperties(),\n+                SimTK::Exception::ErrorCheck);\n+        }\n+        {\n+            MuscleFixedWidthPennationModel mfwpm;\n+            mfwpm.set_pennation_angle_at_optimal(-SimTK::SignificantReal);\n+            SimTK_TEST_MUST_THROW_EXC(mfwpm.finalizeFromProperties(),\n+                SimTK::Exception::ValueOutOfRange);\n+        }\n+        {\n+            MuscleFixedWidthPennationModel mfwpm;\n+            mfwpm.set_pennation_angle_at_optimal(SimTK::Pi/2.0);\n+            SimTK_TEST_MUST_THROW_EXC(mfwpm.finalizeFromProperties(),\n+                SimTK::Exception::ValueOutOfRange);\n+        }\n+        {\n+            MuscleFixedWidthPennationModel mfwpm;\n+            mfwpm.set_maximum_pennation_angle(-SimTK::SignificantReal);\n+            SimTK_TEST_MUST_THROW_EXC(mfwpm.finalizeFromProperties(),\n+                SimTK::Exception::ValueOutOfRange);\n+        }\n+        {\n+            MuscleFixedWidthPennationModel mfwpm;\n+            mfwpm.set_maximum_pennation_angle(SimTK::Pi/2.0\n+                                              + SimTK::SignificantReal);","path":"OpenSim/Actuators/Test/testMuscleFixedWidthPennationModel.cpp","position":49,"original_position":49,"commit_id":"84dbe162b5580c559f12c95c12084c3f790462ac","original_commit_id":"84dbe162b5580c559f12c95c12084c3f790462ac","user":{"login":"tkuchida","id":4203505,"avatar_url":"https://avatars.githubusercontent.com/u/4203505?v=3","gravatar_id":"","url":"https://api.github.com/users/tkuchida","html_url":"https://github.com/tkuchida","followers_url":"https://api.github.com/users/tkuchida/followers","following_url":"https://api.github.com/users/tkuchida/following{/other_user}","gists_url":"https://api.github.com/users/tkuchida/gists{/gist_id}","starred_url":"https://api.github.com/users/tkuchida/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tkuchida/subscriptions","organizations_url":"https://api.github.com/users/tkuchida/orgs","repos_url":"https://api.github.com/users/tkuchida/repos","events_url":"https://api.github.com/users/tkuchida/events{/privacy}","received_events_url":"https://api.github.com/users/tkuchida/received_events","type":"User","site_admin":false},"body":">Is Pi/2 a legal value?\r\n\r\nI didn't change the bounds. Here's the original code from the constructor:\r\n```\r\nSimTK_ERRCHK_ALWAYS(maximumPennationAngle >= 0\r\n&& maximumPennationAngle <= SimTK::Pi/2,\r\n\"MuscleFixedWidthPennationModel::MuscleFixedWidthPennationModel\",\r\n\"Maximum pennation angle must be in the range [0, Pi/2] radians.\");\r\n```","created_at":"2015-03-12T06:38:02Z","updated_at":"2015-03-12T06:38:02Z","html_url":"https://github.com/opensim-org/opensim-core/pull/378#discussion_r26281386","pull_request_url":"https://api.github.com/repos/opensim-org/opensim-core/pulls/378","_links":{"self":{"href":"https://api.github.com/repos/opensim-org/opensim-core/pulls/comments/26281386"},"html":{"href":"https://github.com/opensim-org/opensim-core/pull/378#discussion_r26281386"},"pull_request":{"href":"https://api.github.com/repos/opensim-org/opensim-core/pulls/378"}}},"pull_request":{"url":"https://api.github.com/repos/opensim-org/opensim-core/pulls/378","id":30428221,"html_url":"https://github.com/opensim-org/opensim-core/pull/378","diff_url":"https://github.com/opensim-org/opensim-core/pull/378.diff","patch_url":"https://github.com/opensim-org/opensim-core/pull/378.patch","issue_url":"https://api.github.com/repos/opensim-org/opensim-core/issues/378","number":378,"state":"open","locked":false,"title":"Cleaned up MuscleFixedWidthPennationModel","user":{"login":"tkuchida","id":4203505,"avatar_url":"https://avatars.githubusercontent.com/u/4203505?v=3","gravatar_id":"","url":"https://api.github.com/users/tkuchida","html_url":"https://github.com/tkuchida","followers_url":"https://api.github.com/users/tkuchida/followers","following_url":"https://api.github.com/users/tkuchida/following{/other_user}","gists_url":"https://api.github.com/users/tkuchida/gists{/gist_id}","starred_url":"https://api.github.com/users/tkuchida/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tkuchida/subscriptions","organizations_url":"https://api.github.com/users/tkuchida/orgs","repos_url":"https://api.github.com/users/tkuchida/repos","events_url":"https://api.github.com/users/tkuchida/events{/privacy}","received_events_url":"https://api.github.com/users/tkuchida/received_events","type":"User","site_admin":false},"body":"MuscleFixedWidthPennationModel is now a property and subcomponent of Thelen2003Muscle.\r\n\r\nRemoved duplicated checks of property values; all property value checks are now performed in `MuscleFixedWidthPennationModel::extendFinalizeFromProperties()`. Removed `buildModel()` and `ensureModelUpToDate()` methods from MuscleFixedWidthPennationModel, and removed `buildMuscle()` method from Thelen2003Muscle. Fixes #326.\r\n\r\nAnalogous changes should be made to Millard2012{Equilibrium|Acceleration}Muscle. Added to #366.\n\n<!-- Reviewable:start -->\n[<img src=\"https://reviewable.io/review_button.png\" height=40 alt=\"Review on Reviewable\"/>](https://reviewable.io/reviews/opensim-org/opensim-core/378)\n<!-- Reviewable:end -->\n","created_at":"2015-03-04T00:43:17Z","updated_at":"2015-03-12T06:38:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"85ef19316f098d5d3750ee1573ddd0ec6070343a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/opensim-org/opensim-core/pulls/378/commits","review_comments_url":"https://api.github.com/repos/opensim-org/opensim-core/pulls/378/comments","review_comment_url":"https://api.github.com/repos/opensim-org/opensim-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/opensim-org/opensim-core/issues/378/comments","statuses_url":"https://api.github.com/repos/opensim-org/opensim-core/statuses/84dbe162b5580c559f12c95c12084c3f790462ac","head":{"label":"opensim-org:tom-cleanUpMuscleFixedWidthPennationModel","ref":"tom-cleanUpMuscleFixedWidthPennationModel","sha":"84dbe162b5580c559f12c95c12084c3f790462ac","user":{"login":"opensim-org","id":4370782,"avatar_url":"https://avatars.githubusercontent.com/u/4370782?v=3","gravatar_id":"","url":"https://api.github.com/users/opensim-org","html_url":"https://github.com/opensim-org","followers_url":"https://api.github.com/users/opensim-org/followers","following_url":"https://api.github.com/users/opensim-org/following{/other_user}","gists_url":"https://api.github.com/users/opensim-org/gists{/gist_id}","starred_url":"https://api.github.com/users/opensim-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opensim-org/subscriptions","organizations_url":"https://api.github.com/users/opensim-org/orgs","repos_url":"https://api.github.com/users/opensim-org/repos","events_url":"https://api.github.com/users/opensim-org/events{/privacy}","received_events_url":"https://api.github.com/users/opensim-org/received_events","type":"Organization","site_admin":false},"repo":{"id":20775600,"name":"opensim-core","full_name":"opensim-org/opensim-core","owner":{"login":"opensim-org","id":4370782,"avatar_url":"https://avatars.githubusercontent.com/u/4370782?v=3","gravatar_id":"","url":"https://api.github.com/users/opensim-org","html_url":"https://github.com/opensim-org","followers_url":"https://api.github.com/users/opensim-org/followers","following_url":"https://api.github.com/users/opensim-org/following{/other_user}","gists_url":"https://api.github.com/users/opensim-org/gists{/gist_id}","starred_url":"https://api.github.com/users/opensim-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opensim-org/subscriptions","organizations_url":"https://api.github.com/users/opensim-org/orgs","repos_url":"https://api.github.com/users/opensim-org/repos","events_url":"https://api.github.com/users/opensim-org/events{/privacy}","received_events_url":"https://api.github.com/users/opensim-org/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/opensim-org/opensim-core","description":"SimTK OpenSim C++ libraries and comand-line applications and Java/Python wrapping.","fork":false,"url":"https://api.github.com/repos/opensim-org/opensim-core","forks_url":"https://api.github.com/repos/opensim-org/opensim-core/forks","keys_url":"https://api.github.com/repos/opensim-org/opensim-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/opensim-org/opensim-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/opensim-org/opensim-core/teams","hooks_url":"https://api.github.com/repos/opensim-org/opensim-core/hooks","issue_events_url":"https://api.github.com/repos/opensim-org/opensim-core/issues/events{/number}","events_url":"https://api.github.com/repos/opensim-org/opensim-core/events","assignees_url":"https://api.github.com/repos/opensim-org/opensim-core/assignees{/user}","branches_url":"https://api.github.com/repos/opensim-org/opensim-core/branches{/branch}","tags_url":"https://api.github.com/repos/opensim-org/opensim-core/tags","blobs_url":"https://api.github.com/repos/opensim-org/opensim-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/opensim-org/opensim-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/opensim-org/opensim-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/opensim-org/opensim-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/opensim-org/opensim-core/statuses/{sha}","languages_url":"https://api.github.com/repos/opensim-org/opensim-core/languages","stargazers_url":"https://api.github.com/repos/opensim-org/opensim-core/stargazers","contributors_url":"https://api.github.com/repos/opensim-org/opensim-core/contributors","subscribers_url":"https://api.github.com/repos/opensim-org/opensim-core/subscribers","subscription_url":"https://api.github.com/repos/opensim-org/opensim-core/subscription","commits_url":"https://api.github.com/repos/opensim-org/opensim-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/opensim-org/opensim-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/opensim-org/opensim-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/opensim-org/opensim-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/opensim-org/opensim-core/contents/{+path}","compare_url":"https://api.github.com/repos/opensim-org/opensim-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/opensim-org/opensim-core/merges","archive_url":"https://api.github.com/repos/opensim-org/opensim-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/opensim-org/opensim-core/downloads","issues_url":"https://api.github.com/repos/opensim-org/opensim-core/issues{/number}","pulls_url":"https://api.github.com/repos/opensim-org/opensim-core/pulls{/number}","milestones_url":"https://api.github.com/repos/opensim-org/opensim-core/milestones{/number}","notifications_url":"https://api.github.com/repos/opensim-org/opensim-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/opensim-org/opensim-core/labels{/name}","releases_url":"https://api.github.com/repos/opensim-org/opensim-core/releases{/id}","created_at":"2014-06-12T16:57:56Z","updated_at":"2015-03-03T21:43:27Z","pushed_at":"2015-03-12T03:33:45Z","git_url":"git://github.com/opensim-org/opensim-core.git","ssh_url":"git@github.com:opensim-org/opensim-core.git","clone_url":"https://github.com/opensim-org/opensim-core.git","svn_url":"https://github.com/opensim-org/opensim-core","homepage":"opensim.stanford.edu","size":111944,"stargazers_count":7,"watchers_count":7,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":155,"forks":6,"open_issues":155,"watchers":7,"default_branch":"master"}},"base":{"label":"opensim-org:master","ref":"master","sha":"6c604072581ca4d34cd2301e6bd508b27ca97720","user":{"login":"opensim-org","id":4370782,"avatar_url":"https://avatars.githubusercontent.com/u/4370782?v=3","gravatar_id":"","url":"https://api.github.com/users/opensim-org","html_url":"https://github.com/opensim-org","followers_url":"https://api.github.com/users/opensim-org/followers","following_url":"https://api.github.com/users/opensim-org/following{/other_user}","gists_url":"https://api.github.com/users/opensim-org/gists{/gist_id}","starred_url":"https://api.github.com/users/opensim-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opensim-org/subscriptions","organizations_url":"https://api.github.com/users/opensim-org/orgs","repos_url":"https://api.github.com/users/opensim-org/repos","events_url":"https://api.github.com/users/opensim-org/events{/privacy}","received_events_url":"https://api.github.com/users/opensim-org/received_events","type":"Organization","site_admin":false},"repo":{"id":20775600,"name":"opensim-core","full_name":"opensim-org/opensim-core","owner":{"login":"opensim-org","id":4370782,"avatar_url":"https://avatars.githubusercontent.com/u/4370782?v=3","gravatar_id":"","url":"https://api.github.com/users/opensim-org","html_url":"https://github.com/opensim-org","followers_url":"https://api.github.com/users/opensim-org/followers","following_url":"https://api.github.com/users/opensim-org/following{/other_user}","gists_url":"https://api.github.com/users/opensim-org/gists{/gist_id}","starred_url":"https://api.github.com/users/opensim-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opensim-org/subscriptions","organizations_url":"https://api.github.com/users/opensim-org/orgs","repos_url":"https://api.github.com/users/opensim-org/repos","events_url":"https://api.github.com/users/opensim-org/events{/privacy}","received_events_url":"https://api.github.com/users/opensim-org/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/opensim-org/opensim-core","description":"SimTK OpenSim C++ libraries and comand-line applications and Java/Python wrapping.","fork":false,"url":"https://api.github.com/repos/opensim-org/opensim-core","forks_url":"https://api.github.com/repos/opensim-org/opensim-core/forks","keys_url":"https://api.github.com/repos/opensim-org/opensim-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/opensim-org/opensim-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/opensim-org/opensim-core/teams","hooks_url":"https://api.github.com/repos/opensim-org/opensim-core/hooks","issue_events_url":"https://api.github.com/repos/opensim-org/opensim-core/issues/events{/number}","events_url":"https://api.github.com/repos/opensim-org/opensim-core/events","assignees_url":"https://api.github.com/repos/opensim-org/opensim-core/assignees{/user}","branches_url":"https://api.github.com/repos/opensim-org/opensim-core/branches{/branch}","tags_url":"https://api.github.com/repos/opensim-org/opensim-core/tags","blobs_url":"https://api.github.com/repos/opensim-org/opensim-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/opensim-org/opensim-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/opensim-org/opensim-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/opensim-org/opensim-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/opensim-org/opensim-core/statuses/{sha}","languages_url":"https://api.github.com/repos/opensim-org/opensim-core/languages","stargazers_url":"https://api.github.com/repos/opensim-org/opensim-core/stargazers","contributors_url":"https://api.github.com/repos/opensim-org/opensim-core/contributors","subscribers_url":"https://api.github.com/repos/opensim-org/opensim-core/subscribers","subscription_url":"https://api.github.com/repos/opensim-org/opensim-core/subscription","commits_url":"https://api.github.com/repos/opensim-org/opensim-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/opensim-org/opensim-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/opensim-org/opensim-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/opensim-org/opensim-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/opensim-org/opensim-core/contents/{+path}","compare_url":"https://api.github.com/repos/opensim-org/opensim-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/opensim-org/opensim-core/merges","archive_url":"https://api.github.com/repos/opensim-org/opensim-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/opensim-org/opensim-core/downloads","issues_url":"https://api.github.com/repos/opensim-org/opensim-core/issues{/number}","pulls_url":"https://api.github.com/repos/opensim-org/opensim-core/pulls{/number}","milestones_url":"https://api.github.com/repos/opensim-org/opensim-core/milestones{/number}","notifications_url":"https://api.github.com/repos/opensim-org/opensim-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/opensim-org/opensim-core/labels{/name}","releases_url":"https://api.github.com/repos/opensim-org/opensim-core/releases{/id}","created_at":"2014-06-12T16:57:56Z","updated_at":"2015-03-03T21:43:27Z","pushed_at":"2015-03-12T03:33:45Z","git_url":"git://github.com/opensim-org/opensim-core.git","ssh_url":"git@github.com:opensim-org/opensim-core.git","clone_url":"https://github.com/opensim-org/opensim-core.git","svn_url":"https://github.com/opensim-org/opensim-core","homepage":"opensim.stanford.edu","size":111944,"stargazers_count":7,"watchers_count":7,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":155,"forks":6,"open_issues":155,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/opensim-org/opensim-core/pulls/378"},"html":{"href":"https://github.com/opensim-org/opensim-core/pull/378"},"issue":{"href":"https://api.github.com/repos/opensim-org/opensim-core/issues/378"},"comments":{"href":"https://api.github.com/repos/opensim-org/opensim-core/issues/378/comments"},"review_comments":{"href":"https://api.github.com/repos/opensim-org/opensim-core/pulls/378/comments"},"review_comment":{"href":"https://api.github.com/repos/opensim-org/opensim-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/opensim-org/opensim-core/pulls/378/commits"},"statuses":{"href":"https://api.github.com/repos/opensim-org/opensim-core/statuses/84dbe162b5580c559f12c95c12084c3f790462ac"}}}}