{"action":"created","comment":{"url":"https://api.github.com/repos/EvilBeaver/OneScript/pulls/comments/135760546","pull_request_review_id":59206952,"id":135760546,"diff_hunk":"@@ -281,3 +283,72 @@\n \tПример = Новый(ИмяКласса);\n \tВозврат Пример;\n КонецФункции\n+\n+Функция ФункцияСПараметрамиПоУмолчанию(Знач П1, Знач П2 = 2, Знач П3 = 3) Экспорт\n+\tВозврат П1 + П2 + П3;\n+КонецФункции\n+\n+Функция НовыеПараметры(Знач П1 = Неопределено, Знач П2 = Неопределено, Знач П3 = Неопределено, Знач П4 = Неопределено)\n+\n+\tМ = Новый Массив;\n+\n+\tЕсли Не П1 = Неопределено Тогда\n+\t\tМ.Добавить(П1);\n+\tКонецЕсли;\n+\n+\tЕсли Не П2 = Неопределено Тогда\n+\t\tМ.Добавить(П2);\n+\tКонецЕсли;\n+\n+\tЕсли Не П3 = Неопределено Тогда\n+\t\tМ.Добавить(П3);\n+\tКонецЕсли;\n+\n+\tЕсли Не П4 = Неопределено Тогда\n+\t\tМ.Добавить(П4);\n+\tКонецЕсли;\n+\n+\tВозврат М;\n+КонецФункции\n+\n+Функция ТестДолжен_ПроверитьВызовМетодаСПараметрамиПоУмолчанию() Экспорт\n+\n+\tРефлектор = Новый Рефлектор;\n+\tРезультат = Рефлектор.ВызватьМетод(ЭтотОбъект, \"ФункцияСПараметрамиПоУмолчанию\", НовыеПараметры(1));\n+\tюТест.ПроверитьРавенство(Результат, 6, \"Вызов рефлектором с параметрами по-умолчанию\");\n+\n+\tРезультат = Рефлектор.ВызватьМетод(ЭтотОбъект, \"ФункцияСПараметрамиПоУмолчанию\", НовыеПараметры(1, 1));\n+\tюТест.ПроверитьРавенство(Результат, 5, \"Вызов рефлектором с параметрами по-умолчанию\");\n+\n+\tОшибка = Ложь;\n+\tПопытка\n+\n+\t\tРезультат = Рефлектор.ВызватьМетод(ЭтотОбъект, \"ФункцияСПараметрамиПоУмолчанию\", НовыеПараметры(1, 1, 1, 1));\n+\t\tОшибка = Истина;\n+\t\tВызватьИсключение \"Сюда не должно было дойти\";\n+\n+\tИсключение\n+\n+\t\tЕсли Ошибка Тогда\n+\t\t\tюТест.ТестПровален(\"Вызов рефлектора с превышением параметров\");\n+\t\tКонецЕсли;\n+\n+\tКонецПопытки;\n+","path":"tests/reflector.os","position":66,"original_position":66,"commit_id":"7692de9c095a2871549ccd24c4114675d668402c","original_commit_id":"7692de9c095a2871549ccd24c4114675d668402c","user":{"login":"artbear","id":2920817,"avatar_url":"https://avatars0.githubusercontent.com/u/2920817?v=4","gravatar_id":"","url":"https://api.github.com/users/artbear","html_url":"https://github.com/artbear","followers_url":"https://api.github.com/users/artbear/followers","following_url":"https://api.github.com/users/artbear/following{/other_user}","gists_url":"https://api.github.com/users/artbear/gists{/gist_id}","starred_url":"https://api.github.com/users/artbear/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artbear/subscriptions","organizations_url":"https://api.github.com/users/artbear/orgs","repos_url":"https://api.github.com/users/artbear/repos","events_url":"https://api.github.com/users/artbear/events{/privacy}","received_events_url":"https://api.github.com/users/artbear/received_events","type":"User","site_admin":false},"body":"сложночитаемый и сложнопонимаемый кусок кода\r\n```bsl\r\n+\tОшибка = Ложь;\r\n +\tПопытка\r\n +\r\n +\t\tРезультат = Рефлектор.ВызватьМетод(ЭтотОбъект, \"ФункцияСПараметрамиПоУмолчанию\", НовыеПараметры(1, 1, 1, 1));\r\n +\t\tОшибка = Истина;\r\n +\t\tВызватьИсключение \"Сюда не должно было дойти\";\r\n +\r\n +\tИсключение\r\n +\r\n +\t\tЕсли Ошибка Тогда\r\n +\t\t\tюТест.ТестПровален(\"Вызов рефлектора с превышением параметров\");\r\n +\t\tКонецЕсли;\r\n +\r\n +\tКонецПопытки;\r\n```\r\n\r\nпочему бы не сделать просто, понятно и наглядно ?\r\n```bsl\r\n+\tОшибка = Ложь;\r\n +\tПопытка\r\n +\r\n +\t\tРезультат = Рефлектор.ВызватьМетод(ЭтотОбъект, \"ФункцияСПараметрамиПоУмолчанию\", НовыеПараметры(1, 1, 1, 1));\r\n +\t\tОшибка = Истина;\r\n +\r\n +\tИсключение\r\n +\tКонецПопытки;\r\n\r\n +\tЕсли Ошибка Тогда\r\n +\t\tюТест.ТестПровален(\"Вызов рефлектора с превышением параметров\");\r\n +\tКонецЕсли;\r\n\r\n```\r\n\r\nи так 2 раза :)\r\n\r\n@dmpas @EvilBeaver ","created_at":"2017-08-29T11:14:18Z","updated_at":"2017-08-29T11:14:18Z","html_url":"https://github.com/EvilBeaver/OneScript/pull/514#discussion_r135760546","pull_request_url":"https://api.github.com/repos/EvilBeaver/OneScript/pulls/514","_links":{"self":{"href":"https://api.github.com/repos/EvilBeaver/OneScript/pulls/comments/135760546"},"html":{"href":"https://github.com/EvilBeaver/OneScript/pull/514#discussion_r135760546"},"pull_request":{"href":"https://api.github.com/repos/EvilBeaver/OneScript/pulls/514"}}},"pull_request":{"url":"https://api.github.com/repos/EvilBeaver/OneScript/pulls/514","id":138025253,"html_url":"https://github.com/EvilBeaver/OneScript/pull/514","diff_url":"https://github.com/EvilBeaver/OneScript/pull/514.diff","patch_url":"https://github.com/EvilBeaver/OneScript/pull/514.patch","issue_url":"https://api.github.com/repos/EvilBeaver/OneScript/issues/514","number":514,"state":"closed","locked":false,"title":"Fix #508: Параметры по-умолчанию в рефлекторе.","user":{"login":"dmpas","id":5665433,"avatar_url":"https://avatars1.githubusercontent.com/u/5665433?v=4","gravatar_id":"","url":"https://api.github.com/users/dmpas","html_url":"https://github.com/dmpas","followers_url":"https://api.github.com/users/dmpas/followers","following_url":"https://api.github.com/users/dmpas/following{/other_user}","gists_url":"https://api.github.com/users/dmpas/gists{/gist_id}","starred_url":"https://api.github.com/users/dmpas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmpas/subscriptions","organizations_url":"https://api.github.com/users/dmpas/orgs","repos_url":"https://api.github.com/users/dmpas/repos","events_url":"https://api.github.com/users/dmpas/events{/privacy}","received_events_url":"https://api.github.com/users/dmpas/received_events","type":"User","site_admin":false},"body":"В рефлекторе исправлен вызов методов, в которых присутствуют параметры\r\nпо-умолчанию.","created_at":"2017-08-28T20:02:19Z","updated_at":"2017-08-29T11:14:18Z","closed_at":"2017-08-29T06:08:03Z","merged_at":"2017-08-29T06:08:03Z","merge_commit_sha":"96afc294bd9316d9dee4e9bf7173367d66366848","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/EvilBeaver/OneScript/pulls/514/commits","review_comments_url":"https://api.github.com/repos/EvilBeaver/OneScript/pulls/514/comments","review_comment_url":"https://api.github.com/repos/EvilBeaver/OneScript/pulls/comments{/number}","comments_url":"https://api.github.com/repos/EvilBeaver/OneScript/issues/514/comments","statuses_url":"https://api.github.com/repos/EvilBeaver/OneScript/statuses/7692de9c095a2871549ccd24c4114675d668402c","head":{"label":"dmpas:feature/issue-508-reflector","ref":"feature/issue-508-reflector","sha":"7692de9c095a2871549ccd24c4114675d668402c","user":{"login":"dmpas","id":5665433,"avatar_url":"https://avatars1.githubusercontent.com/u/5665433?v=4","gravatar_id":"","url":"https://api.github.com/users/dmpas","html_url":"https://github.com/dmpas","followers_url":"https://api.github.com/users/dmpas/followers","following_url":"https://api.github.com/users/dmpas/following{/other_user}","gists_url":"https://api.github.com/users/dmpas/gists{/gist_id}","starred_url":"https://api.github.com/users/dmpas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmpas/subscriptions","organizations_url":"https://api.github.com/users/dmpas/orgs","repos_url":"https://api.github.com/users/dmpas/repos","events_url":"https://api.github.com/users/dmpas/events{/privacy}","received_events_url":"https://api.github.com/users/dmpas/received_events","type":"User","site_admin":false},"repo":{"id":59401917,"name":"OneScript","full_name":"dmpas/OneScript","owner":{"login":"dmpas","id":5665433,"avatar_url":"https://avatars1.githubusercontent.com/u/5665433?v=4","gravatar_id":"","url":"https://api.github.com/users/dmpas","html_url":"https://github.com/dmpas","followers_url":"https://api.github.com/users/dmpas/followers","following_url":"https://api.github.com/users/dmpas/following{/other_user}","gists_url":"https://api.github.com/users/dmpas/gists{/gist_id}","starred_url":"https://api.github.com/users/dmpas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmpas/subscriptions","organizations_url":"https://api.github.com/users/dmpas/orgs","repos_url":"https://api.github.com/users/dmpas/repos","events_url":"https://api.github.com/users/dmpas/events{/privacy}","received_events_url":"https://api.github.com/users/dmpas/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dmpas/OneScript","description":"Исполняющая среда скриптов на языке 1С","fork":true,"url":"https://api.github.com/repos/dmpas/OneScript","forks_url":"https://api.github.com/repos/dmpas/OneScript/forks","keys_url":"https://api.github.com/repos/dmpas/OneScript/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dmpas/OneScript/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dmpas/OneScript/teams","hooks_url":"https://api.github.com/repos/dmpas/OneScript/hooks","issue_events_url":"https://api.github.com/repos/dmpas/OneScript/issues/events{/number}","events_url":"https://api.github.com/repos/dmpas/OneScript/events","assignees_url":"https://api.github.com/repos/dmpas/OneScript/assignees{/user}","branches_url":"https://api.github.com/repos/dmpas/OneScript/branches{/branch}","tags_url":"https://api.github.com/repos/dmpas/OneScript/tags","blobs_url":"https://api.github.com/repos/dmpas/OneScript/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dmpas/OneScript/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dmpas/OneScript/git/refs{/sha}","trees_url":"https://api.github.com/repos/dmpas/OneScript/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dmpas/OneScript/statuses/{sha}","languages_url":"https://api.github.com/repos/dmpas/OneScript/languages","stargazers_url":"https://api.github.com/repos/dmpas/OneScript/stargazers","contributors_url":"https://api.github.com/repos/dmpas/OneScript/contributors","subscribers_url":"https://api.github.com/repos/dmpas/OneScript/subscribers","subscription_url":"https://api.github.com/repos/dmpas/OneScript/subscription","commits_url":"https://api.github.com/repos/dmpas/OneScript/commits{/sha}","git_commits_url":"https://api.github.com/repos/dmpas/OneScript/git/commits{/sha}","comments_url":"https://api.github.com/repos/dmpas/OneScript/comments{/number}","issue_comment_url":"https://api.github.com/repos/dmpas/OneScript/issues/comments{/number}","contents_url":"https://api.github.com/repos/dmpas/OneScript/contents/{+path}","compare_url":"https://api.github.com/repos/dmpas/OneScript/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dmpas/OneScript/merges","archive_url":"https://api.github.com/repos/dmpas/OneScript/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dmpas/OneScript/downloads","issues_url":"https://api.github.com/repos/dmpas/OneScript/issues{/number}","pulls_url":"https://api.github.com/repos/dmpas/OneScript/pulls{/number}","milestones_url":"https://api.github.com/repos/dmpas/OneScript/milestones{/number}","notifications_url":"https://api.github.com/repos/dmpas/OneScript/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dmpas/OneScript/labels{/name}","releases_url":"https://api.github.com/repos/dmpas/OneScript/releases{/id}","deployments_url":"https://api.github.com/repos/dmpas/OneScript/deployments","created_at":"2016-05-22T08:18:13Z","updated_at":"2017-02-19T15:45:16Z","pushed_at":"2017-08-28T20:14:27Z","git_url":"git://github.com/dmpas/OneScript.git","ssh_url":"git@github.com:dmpas/OneScript.git","clone_url":"https://github.com/dmpas/OneScript.git","svn_url":"https://github.com/dmpas/OneScript","homepage":"http://oscript.io","size":10800,"stargazers_count":1,"watchers_count":1,"language":"C#","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"develop"}},"base":{"label":"EvilBeaver:develop","ref":"develop","sha":"ef6b884354b4847e9574703c8ee3ec8ea2b7d237","user":{"login":"EvilBeaver","id":2657561,"avatar_url":"https://avatars1.githubusercontent.com/u/2657561?v=4","gravatar_id":"","url":"https://api.github.com/users/EvilBeaver","html_url":"https://github.com/EvilBeaver","followers_url":"https://api.github.com/users/EvilBeaver/followers","following_url":"https://api.github.com/users/EvilBeaver/following{/other_user}","gists_url":"https://api.github.com/users/EvilBeaver/gists{/gist_id}","starred_url":"https://api.github.com/users/EvilBeaver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EvilBeaver/subscriptions","organizations_url":"https://api.github.com/users/EvilBeaver/orgs","repos_url":"https://api.github.com/users/EvilBeaver/repos","events_url":"https://api.github.com/users/EvilBeaver/events{/privacy}","received_events_url":"https://api.github.com/users/EvilBeaver/received_events","type":"User","site_admin":false},"repo":{"id":55775973,"name":"OneScript","full_name":"EvilBeaver/OneScript","owner":{"login":"EvilBeaver","id":2657561,"avatar_url":"https://avatars1.githubusercontent.com/u/2657561?v=4","gravatar_id":"","url":"https://api.github.com/users/EvilBeaver","html_url":"https://github.com/EvilBeaver","followers_url":"https://api.github.com/users/EvilBeaver/followers","following_url":"https://api.github.com/users/EvilBeaver/following{/other_user}","gists_url":"https://api.github.com/users/EvilBeaver/gists{/gist_id}","starred_url":"https://api.github.com/users/EvilBeaver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EvilBeaver/subscriptions","organizations_url":"https://api.github.com/users/EvilBeaver/orgs","repos_url":"https://api.github.com/users/EvilBeaver/repos","events_url":"https://api.github.com/users/EvilBeaver/events{/privacy}","received_events_url":"https://api.github.com/users/EvilBeaver/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/EvilBeaver/OneScript","description":"Исполняющая среда скриптов на языке 1С","fork":false,"url":"https://api.github.com/repos/EvilBeaver/OneScript","forks_url":"https://api.github.com/repos/EvilBeaver/OneScript/forks","keys_url":"https://api.github.com/repos/EvilBeaver/OneScript/keys{/key_id}","collaborators_url":"https://api.github.com/repos/EvilBeaver/OneScript/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/EvilBeaver/OneScript/teams","hooks_url":"https://api.github.com/repos/EvilBeaver/OneScript/hooks","issue_events_url":"https://api.github.com/repos/EvilBeaver/OneScript/issues/events{/number}","events_url":"https://api.github.com/repos/EvilBeaver/OneScript/events","assignees_url":"https://api.github.com/repos/EvilBeaver/OneScript/assignees{/user}","branches_url":"https://api.github.com/repos/EvilBeaver/OneScript/branches{/branch}","tags_url":"https://api.github.com/repos/EvilBeaver/OneScript/tags","blobs_url":"https://api.github.com/repos/EvilBeaver/OneScript/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/EvilBeaver/OneScript/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/EvilBeaver/OneScript/git/refs{/sha}","trees_url":"https://api.github.com/repos/EvilBeaver/OneScript/git/trees{/sha}","statuses_url":"https://api.github.com/repos/EvilBeaver/OneScript/statuses/{sha}","languages_url":"https://api.github.com/repos/EvilBeaver/OneScript/languages","stargazers_url":"https://api.github.com/repos/EvilBeaver/OneScript/stargazers","contributors_url":"https://api.github.com/repos/EvilBeaver/OneScript/contributors","subscribers_url":"https://api.github.com/repos/EvilBeaver/OneScript/subscribers","subscription_url":"https://api.github.com/repos/EvilBeaver/OneScript/subscription","commits_url":"https://api.github.com/repos/EvilBeaver/OneScript/commits{/sha}","git_commits_url":"https://api.github.com/repos/EvilBeaver/OneScript/git/commits{/sha}","comments_url":"https://api.github.com/repos/EvilBeaver/OneScript/comments{/number}","issue_comment_url":"https://api.github.com/repos/EvilBeaver/OneScript/issues/comments{/number}","contents_url":"https://api.github.com/repos/EvilBeaver/OneScript/contents/{+path}","compare_url":"https://api.github.com/repos/EvilBeaver/OneScript/compare/{base}...{head}","merges_url":"https://api.github.com/repos/EvilBeaver/OneScript/merges","archive_url":"https://api.github.com/repos/EvilBeaver/OneScript/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/EvilBeaver/OneScript/downloads","issues_url":"https://api.github.com/repos/EvilBeaver/OneScript/issues{/number}","pulls_url":"https://api.github.com/repos/EvilBeaver/OneScript/pulls{/number}","milestones_url":"https://api.github.com/repos/EvilBeaver/OneScript/milestones{/number}","notifications_url":"https://api.github.com/repos/EvilBeaver/OneScript/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/EvilBeaver/OneScript/labels{/name}","releases_url":"https://api.github.com/repos/EvilBeaver/OneScript/releases{/id}","deployments_url":"https://api.github.com/repos/EvilBeaver/OneScript/deployments","created_at":"2016-04-08T12:04:21Z","updated_at":"2017-08-12T03:45:00Z","pushed_at":"2017-08-29T10:36:39Z","git_url":"git://github.com/EvilBeaver/OneScript.git","ssh_url":"git@github.com:EvilBeaver/OneScript.git","clone_url":"https://github.com/EvilBeaver/OneScript.git","svn_url":"https://github.com/EvilBeaver/OneScript","homepage":"http://oscript.io","size":14147,"stargazers_count":87,"watchers_count":87,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":30,"mirror_url":null,"open_issues_count":45,"forks":30,"open_issues":45,"watchers":87,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/EvilBeaver/OneScript/pulls/514"},"html":{"href":"https://github.com/EvilBeaver/OneScript/pull/514"},"issue":{"href":"https://api.github.com/repos/EvilBeaver/OneScript/issues/514"},"comments":{"href":"https://api.github.com/repos/EvilBeaver/OneScript/issues/514/comments"},"review_comments":{"href":"https://api.github.com/repos/EvilBeaver/OneScript/pulls/514/comments"},"review_comment":{"href":"https://api.github.com/repos/EvilBeaver/OneScript/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/EvilBeaver/OneScript/pulls/514/commits"},"statuses":{"href":"https://api.github.com/repos/EvilBeaver/OneScript/statuses/7692de9c095a2871549ccd24c4114675d668402c"}}}}
{"actor":{"display_login":"artbear"}}