{"action":"created","comment":{"url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/pulls/comments/85187706","pull_request_review_id":5917518,"id":85187706,"diff_hunk":"@@ -1,153 +1,259 @@\n-#include \"utmatrix.h\"\n+#include \"utmatrix.h\" \n \n-#include <gtest.h>\n+#include <gtest.h> \n \n TEST(TVector, can_create_vector_with_positive_length)\n {\n-  ASSERT_NO_THROW(TVector<int> v(5));\n+\tASSERT_NO_THROW(TVector<int> v(5));\n }\n \n TEST(TVector, cant_create_too_large_vector)\n {\n-  ASSERT_ANY_THROW(TVector<int> v(MAX_VECTOR_SIZE + 1));\n+\tASSERT_ANY_THROW(TVector<int> v(MAX_VECTOR_SIZE + 1));\n }\n \n TEST(TVector, throws_when_create_vector_with_negative_length)\n {\n-  ASSERT_ANY_THROW(TVector<int> v(-5));\n+\tASSERT_ANY_THROW(TVector<int> v(-5));\n }\n \n TEST(TVector, throws_when_create_vector_with_negative_startindex)\n {\n-  ASSERT_ANY_THROW(TVector<int> v(5, -2));\n+\tASSERT_ANY_THROW(TVector<int> v(5, -2));\n }\n \n TEST(TVector, can_create_copied_vector)\n {\n-  TVector<int> v(10);\n+\tTVector<int> v(10);\n \n-  ASSERT_NO_THROW(TVector<int> v1(v));\n+\tASSERT_NO_THROW(TVector<int> v1(v));\n }\n \n TEST(TVector, copied_vector_is_equal_to_source_one)\n {\n-  ADD_FAILURE();\n+\tTVector<int> v(5), v1(v);\n+\tEXPECT_EQ(v, v1);\n }\n \n TEST(TVector, copied_vector_has_its_own_memory)\n {\n-  ADD_FAILURE();\n+\tTVector<int> v(5);\n+\tv[1] = 4;\n+\tTVector<int> v1(v);\n+\tv1[1] = 5;\n+\tEXPECT_EQ(5, v1[1]);\n+\n }\n \n TEST(TVector, can_get_size)\n {\n-  TVector<int> v(4);\n+\tTVector<int> v(4);\n \n-  EXPECT_EQ(4, v.GetSize());\n+\tEXPECT_EQ(4, v.GetSize());\n }\n \n TEST(TVector, can_get_start_index)\n {\n-  TVector<int> v(4, 2);\n+\tTVector<int> v(4, 2);\n \n-  EXPECT_EQ(2, v.GetStartIndex());\n+\tEXPECT_EQ(2, v.GetStartIndex());\n }\n \n TEST(TVector, can_set_and_get_element)\n {\n-  TVector<int> v(4);\n-  v[0] = 4;\n+\tTVector<int> v(4);\n+\tv[0] = 4;\n \n-  EXPECT_EQ(4, v[0]);\n+\tEXPECT_EQ(4, v[0]);\n }\n \n TEST(TVector, throws_when_set_element_with_negative_index)\n {\n-  ADD_FAILURE();\n+\tTVector<int> v(5);\n+\tASSERT_ANY_THROW(v[-1]);\n }\n \n TEST(TVector, throws_when_set_element_with_too_large_index)\n {\n-  ADD_FAILURE();\n+\tTVector<int> v(5);\n+\tASSERT_ANY_THROW(v[MAX_VECTOR_SIZE + 1]);\n }\n \n TEST(TVector, can_assign_vector_to_itself)\n {\n-  ADD_FAILURE();\n+\tTVector<int> v(3), v1(3);\n+\tv[0] = 0;\n+\tv[1] = 2;\n+\tv[2] = 4;\n+\tASSERT_NO_THROW(v = v);\n }\n \n TEST(TVector, can_assign_vectors_of_equal_size)\n {\n-  ADD_FAILURE();\n+\tint size = 3;\n+\tTVector<int> v(size), v1(size), v2(size);\n+\tv[1] = 1;\n+\tv[2] = 2; //v=012 \n+\tASSERT_NO_THROW(v1 = v);\n }\n \n TEST(TVector, assign_operator_change_vector_size)\n {\n-  ADD_FAILURE();\n+\tTVector<int> v(3), v1(5);\n+\tv[1] = 2;\n+\tv1[2] = 1;\n+\tv1 = v;\n+\tEXPECT_EQ(v1.GetSize(), v.GetSize());\n }\n \n TEST(TVector, can_assign_vectors_of_different_size)\n {\n-  ADD_FAILURE();\n+\tTVector<int> v(3), v1(4), v2(3);\n+\tv[1] = 1;\n+\tv[2] = 2;\n+\tASSERT_NO_THROW(v1 = v);\n }\n \n TEST(TVector, compare_equal_vectors_return_true)\n {\n-  ADD_FAILURE();\n+\tTVector<int> v(3), v1(3);\n+\tv[1] = 1;\n+\tv[2] = 2;\n+\tv1[1] = 1;\n+\tv1[2] = 2;\n+\tASSERT_TRUE(v1 == v);\n }\n \n TEST(TVector, compare_vector_with_itself_return_true)\n {\n-  ADD_FAILURE();\n+\tTVector<int> v(3);\n+\tv[1] = 1;\n+\tv[2] = 2;\n+\tASSERT_TRUE(v == v);\n }\n \n TEST(TVector, vectors_with_different_size_are_not_equal)\n {\n-  ADD_FAILURE();\n+\tTVector<int> v(3), v1(5);\n+\tv[1] = 1;\n+\tv[2] = 2;\n+\tv1[1] = 1;\n+\tv1[2] = 2;\n+\tASSERT_FALSE(v1 == v);\n }\n \n TEST(TVector, can_add_scalar_to_vector)\n {\n-  ADD_FAILURE();\n+\tTVector<int> v(3), v1(3);\n+\tv[1] = 1;\n+\tv[2] = 2; // v = (012) \n+\tv = v + 1;\n+\tv1[0] = 1;\n+\tv1[1] = 2;\n+\tv1[2] = 3; // v1 = (123) \n+\tEXPECT_EQ(v1, v);\n }\n \n TEST(TVector, can_subtract_scalar_from_vector)\n {\n-  ADD_FAILURE();\n+\tTVector<int> v(3), v1(3);\n+\tv1[0] = 1;\n+\tv1[1] = 2;\n+\tv1[2] = 3;// v = (123) \n+\tv[1] = 1;","path":"test/test_tvector.cpp","position":191,"original_position":191,"commit_id":"388b948d82b602a39389597a3bc24d47569630cb","original_commit_id":"388b948d82b602a39389597a3bc24d47569630cb","user":{"login":"alvls","id":5449780,"avatar_url":"https://avatars.githubusercontent.com/u/5449780?v=3","gravatar_id":"","url":"https://api.github.com/users/alvls","html_url":"https://github.com/alvls","followers_url":"https://api.github.com/users/alvls/followers","following_url":"https://api.github.com/users/alvls/following{/other_user}","gists_url":"https://api.github.com/users/alvls/gists{/gist_id}","starred_url":"https://api.github.com/users/alvls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alvls/subscriptions","organizations_url":"https://api.github.com/users/alvls/orgs","repos_url":"https://api.github.com/users/alvls/repos","events_url":"https://api.github.com/users/alvls/events{/privacy}","received_events_url":"https://api.github.com/users/alvls/received_events","type":"User","site_admin":false},"body":"Где v1[0] = 0 ?","created_at":"2016-10-26T18:22:10Z","updated_at":"2016-10-26T18:22:10Z","html_url":"https://github.com/letochan/mp2-lab2-matrix/pull/1#discussion_r85187706","pull_request_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/letochan/mp2-lab2-matrix/pulls/comments/85187706"},"html":{"href":"https://github.com/letochan/mp2-lab2-matrix/pull/1#discussion_r85187706"},"pull_request":{"href":"https://api.github.com/repos/letochan/mp2-lab2-matrix/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/pulls/1","id":90855932,"html_url":"https://github.com/letochan/mp2-lab2-matrix/pull/1","diff_url":"https://github.com/letochan/mp2-lab2-matrix/pull/1.diff","patch_url":"https://github.com/letochan/mp2-lab2-matrix/pull/1.patch","issue_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/issues/1","number":1,"state":"open","locked":false,"title":"Vetka1","user":{"login":"letochan","id":22346758,"avatar_url":"https://avatars.githubusercontent.com/u/22346758?v=3","gravatar_id":"","url":"https://api.github.com/users/letochan","html_url":"https://github.com/letochan","followers_url":"https://api.github.com/users/letochan/followers","following_url":"https://api.github.com/users/letochan/following{/other_user}","gists_url":"https://api.github.com/users/letochan/gists{/gist_id}","starred_url":"https://api.github.com/users/letochan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/letochan/subscriptions","organizations_url":"https://api.github.com/users/letochan/orgs","repos_url":"https://api.github.com/users/letochan/repos","events_url":"https://api.github.com/users/letochan/events{/privacy}","received_events_url":"https://api.github.com/users/letochan/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-10-25T17:39:51Z","updated_at":"2016-10-26T18:22:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f6e049d41ad6b85dd16bb18a0567c06a9569160e","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/pulls/1/commits","review_comments_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/pulls/1/comments","review_comment_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/pulls/comments{/number}","comments_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/issues/1/comments","statuses_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/statuses/388b948d82b602a39389597a3bc24d47569630cb","head":{"label":"letochan:Vetka1","ref":"Vetka1","sha":"388b948d82b602a39389597a3bc24d47569630cb","user":{"login":"letochan","id":22346758,"avatar_url":"https://avatars.githubusercontent.com/u/22346758?v=3","gravatar_id":"","url":"https://api.github.com/users/letochan","html_url":"https://github.com/letochan","followers_url":"https://api.github.com/users/letochan/followers","following_url":"https://api.github.com/users/letochan/following{/other_user}","gists_url":"https://api.github.com/users/letochan/gists{/gist_id}","starred_url":"https://api.github.com/users/letochan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/letochan/subscriptions","organizations_url":"https://api.github.com/users/letochan/orgs","repos_url":"https://api.github.com/users/letochan/repos","events_url":"https://api.github.com/users/letochan/events{/privacy}","received_events_url":"https://api.github.com/users/letochan/received_events","type":"User","site_admin":false},"repo":{"id":70696537,"name":"mp2-lab2-matrix","full_name":"letochan/mp2-lab2-matrix","owner":{"login":"letochan","id":22346758,"avatar_url":"https://avatars.githubusercontent.com/u/22346758?v=3","gravatar_id":"","url":"https://api.github.com/users/letochan","html_url":"https://github.com/letochan","followers_url":"https://api.github.com/users/letochan/followers","following_url":"https://api.github.com/users/letochan/following{/other_user}","gists_url":"https://api.github.com/users/letochan/gists{/gist_id}","starred_url":"https://api.github.com/users/letochan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/letochan/subscriptions","organizations_url":"https://api.github.com/users/letochan/orgs","repos_url":"https://api.github.com/users/letochan/repos","events_url":"https://api.github.com/users/letochan/events{/privacy}","received_events_url":"https://api.github.com/users/letochan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/letochan/mp2-lab2-matrix","description":null,"fork":true,"url":"https://api.github.com/repos/letochan/mp2-lab2-matrix","forks_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/forks","keys_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/keys{/key_id}","collaborators_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/teams","hooks_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/hooks","issue_events_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/issues/events{/number}","events_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/events","assignees_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/assignees{/user}","branches_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/branches{/branch}","tags_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/tags","blobs_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/git/refs{/sha}","trees_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/git/trees{/sha}","statuses_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/statuses/{sha}","languages_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/languages","stargazers_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/stargazers","contributors_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/contributors","subscribers_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/subscribers","subscription_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/subscription","commits_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/commits{/sha}","git_commits_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/git/commits{/sha}","comments_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/comments{/number}","issue_comment_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/issues/comments{/number}","contents_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/contents/{+path}","compare_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/compare/{base}...{head}","merges_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/merges","archive_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/downloads","issues_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/issues{/number}","pulls_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/pulls{/number}","milestones_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/milestones{/number}","notifications_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/labels{/name}","releases_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/releases{/id}","deployments_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/deployments","created_at":"2016-10-12T12:13:58Z","updated_at":"2016-10-12T12:13:59Z","pushed_at":"2016-10-26T13:08:31Z","git_url":"git://github.com/letochan/mp2-lab2-matrix.git","ssh_url":"git@github.com:letochan/mp2-lab2-matrix.git","clone_url":"https://github.com/letochan/mp2-lab2-matrix.git","svn_url":"https://github.com/letochan/mp2-lab2-matrix","homepage":null,"size":227,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"letochan:master","ref":"master","sha":"3940e9846e81c98dc8188f6954ea411103d9f847","user":{"login":"letochan","id":22346758,"avatar_url":"https://avatars.githubusercontent.com/u/22346758?v=3","gravatar_id":"","url":"https://api.github.com/users/letochan","html_url":"https://github.com/letochan","followers_url":"https://api.github.com/users/letochan/followers","following_url":"https://api.github.com/users/letochan/following{/other_user}","gists_url":"https://api.github.com/users/letochan/gists{/gist_id}","starred_url":"https://api.github.com/users/letochan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/letochan/subscriptions","organizations_url":"https://api.github.com/users/letochan/orgs","repos_url":"https://api.github.com/users/letochan/repos","events_url":"https://api.github.com/users/letochan/events{/privacy}","received_events_url":"https://api.github.com/users/letochan/received_events","type":"User","site_admin":false},"repo":{"id":70696537,"name":"mp2-lab2-matrix","full_name":"letochan/mp2-lab2-matrix","owner":{"login":"letochan","id":22346758,"avatar_url":"https://avatars.githubusercontent.com/u/22346758?v=3","gravatar_id":"","url":"https://api.github.com/users/letochan","html_url":"https://github.com/letochan","followers_url":"https://api.github.com/users/letochan/followers","following_url":"https://api.github.com/users/letochan/following{/other_user}","gists_url":"https://api.github.com/users/letochan/gists{/gist_id}","starred_url":"https://api.github.com/users/letochan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/letochan/subscriptions","organizations_url":"https://api.github.com/users/letochan/orgs","repos_url":"https://api.github.com/users/letochan/repos","events_url":"https://api.github.com/users/letochan/events{/privacy}","received_events_url":"https://api.github.com/users/letochan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/letochan/mp2-lab2-matrix","description":null,"fork":true,"url":"https://api.github.com/repos/letochan/mp2-lab2-matrix","forks_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/forks","keys_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/keys{/key_id}","collaborators_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/teams","hooks_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/hooks","issue_events_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/issues/events{/number}","events_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/events","assignees_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/assignees{/user}","branches_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/branches{/branch}","tags_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/tags","blobs_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/git/refs{/sha}","trees_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/git/trees{/sha}","statuses_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/statuses/{sha}","languages_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/languages","stargazers_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/stargazers","contributors_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/contributors","subscribers_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/subscribers","subscription_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/subscription","commits_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/commits{/sha}","git_commits_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/git/commits{/sha}","comments_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/comments{/number}","issue_comment_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/issues/comments{/number}","contents_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/contents/{+path}","compare_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/compare/{base}...{head}","merges_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/merges","archive_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/downloads","issues_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/issues{/number}","pulls_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/pulls{/number}","milestones_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/milestones{/number}","notifications_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/labels{/name}","releases_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/releases{/id}","deployments_url":"https://api.github.com/repos/letochan/mp2-lab2-matrix/deployments","created_at":"2016-10-12T12:13:58Z","updated_at":"2016-10-12T12:13:59Z","pushed_at":"2016-10-26T13:08:31Z","git_url":"git://github.com/letochan/mp2-lab2-matrix.git","ssh_url":"git@github.com:letochan/mp2-lab2-matrix.git","clone_url":"https://github.com/letochan/mp2-lab2-matrix.git","svn_url":"https://github.com/letochan/mp2-lab2-matrix","homepage":null,"size":227,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/letochan/mp2-lab2-matrix/pulls/1"},"html":{"href":"https://github.com/letochan/mp2-lab2-matrix/pull/1"},"issue":{"href":"https://api.github.com/repos/letochan/mp2-lab2-matrix/issues/1"},"comments":{"href":"https://api.github.com/repos/letochan/mp2-lab2-matrix/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/letochan/mp2-lab2-matrix/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/letochan/mp2-lab2-matrix/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/letochan/mp2-lab2-matrix/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/letochan/mp2-lab2-matrix/statuses/388b948d82b602a39389597a3bc24d47569630cb"}}}}
{"actor":{"display_login":"alvls"}}