{"action":"created","comment":{"url":"https://api.github.com/repos/kmc-jp/c89-compiler/pulls/comments/43300321","id":43300321,"diff_hunk":"@@ -1,5 +1,91 @@\n+CC ?= gcc\n+CXX ?= g++\n+CFLAGS ?= -Wall -Wextra -O2\n+CXXFLAGS ?= -Wall -Wextra -O2\n+\n+SRC_DIR = src\n+\n+TESTSUFFIX = .out\n+TEST_DIR = tests\n+STAGE1_DIR = $(TEST_DIR)/stage1\n+STAGE2_DIR = $(TEST_DIR)/stage2\n+TESTS_STAGE1 = $(wildcard $(STAGE1_DIR)/*.c)\n+TESTS_STAGE2 = $(wildcard $(STAGE2_DIR)/*.c)\n+TESTS = $(TESTS_STAGE1) $(TESTS_STAGE2)\n+STAGE1_OBJS = $(TESTS_STAGE1:.c=$(TESTSUFFIX))\n+STAGE2_OBJS = $(TESTS_STAGE2:.c=$(TESTSUFFIX))\n+TESTS_OBJS = $(STAGE1_OBJS) $(STAGE2_OBJS) $(TESTS_LIBS_STAGE1)\n+TESTS_CFLAGS ?= -ansi -pedantic $(CFLAGS)\n+TESTS_LIBS_STAGE1_DIR = $(STAGE1_DIR)/lib\n+TESTS_LIBS_STAGE1 = $(TESTS_LIBS_STAGE1_DIR)/print.o\n+TESTS_LIBS_STAGE1_CFLAGS ?= $(TESTS_CFLAGS)\n+\n+GTEST_DIR = $(TEST_DIR)/gtest\n+GTEST_SRCS = $(wildcard $(GTEST_DIR)/*.cc)\n+GTEST_OBJS = $(GTEST_SRCS:.cc=.o)\n+GTEST_LIB = libgtest.a\n+GTEST_FLAGS = -Wno-missing-field-initializers\n+GTEST_INCLUDE = -I$(TEST_DIR)\n+GTEST_LDFLAGS = -lpthread\n+\n+VECTOR_HEADER = $(SRC_DIR)/vector.h\n+VECTOR_OBJ = $(SRC_DIR)/vector.o\n+TEST_VECTOR_DIR = $(TEST_DIR)/vector_test\n+TEST_VECTOR_C_SRCS = $(wildcard $(TEST_VECTOR_DIR)/*.c)\n+TEST_VECTOR_CXX_SRCS = $(wildcard $(TEST_VECTOR_DIR)/*.cpp)\n+TEST_VECTOR_OBJS = $(TEST_VECTOR_C_SRCS:.c=.o) $(TEST_VECTOR_CXX_SRCS:.cpp=.o)\n+\n+.SUFFIXES: $(TESTSUFFIX)\n+\n+RM = rm -f\n+AR = ar rcs\n+\n+UNITTESTS = $(TEST_VECTOR_DIR)/vector_int_test.out\n+\n all:\n \n-test:\n+test: testsource_test unittests\n+\n+testsource_test: tests_stage1 tests_stage2\n+\n+tests_stage1: $(STAGE1_OBJS)\n+\n+tests_stage2: $(STAGE2_OBJS)\n+\n+$(STAGE1_DIR)/%$(TESTSUFFIX): $(STAGE1_DIR)/%.c $(TESTS_LIBS_STAGE1)\n+\t$(CC) $(TESTS_CFLAGS) $< $(TESTS_LIBS_STAGE1) -o $@\n+\n+$(TESTS_LIBS_STAGE1_DIR)/%.o: $(TESTS_LIBS_STAGE1_DIR)/%.c\n+\t$(CC) $(TESTS_LIBS_STAGE1_CFLAGS) $< -c -o $@\n+\n+$(STAGE2_DIR)/%$(TESTSUFFIX): $(STAGE2_DIR)/%.c\n+\t$(CC) $(TESTS_CFLAGS) $< -o $@\n+\n+","path":"Makefile","position":65,"original_position":65,"commit_id":"2bbfbf0b13136515d22b576bd6be3129606802a9","original_commit_id":"2bbfbf0b13136515d22b576bd6be3129606802a9","user":{"login":"nna774","id":691828,"avatar_url":"https://avatars.githubusercontent.com/u/691828?v=3","gravatar_id":"","url":"https://api.github.com/users/nna774","html_url":"https://github.com/nna774","followers_url":"https://api.github.com/users/nna774/followers","following_url":"https://api.github.com/users/nna774/following{/other_user}","gists_url":"https://api.github.com/users/nna774/gists{/gist_id}","starred_url":"https://api.github.com/users/nna774/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nna774/subscriptions","organizations_url":"https://api.github.com/users/nna774/orgs","repos_url":"https://api.github.com/users/nna774/repos","events_url":"https://api.github.com/users/nna774/events{/privacy}","received_events_url":"https://api.github.com/users/nna774/received_events","type":"User","site_admin":false},"body":"そういう意図なら良いと思います。","created_at":"2015-10-28T18:45:03Z","updated_at":"2015-10-28T18:45:03Z","html_url":"https://github.com/kmc-jp/c89-compiler/pull/15#discussion_r43300321","pull_request_url":"https://api.github.com/repos/kmc-jp/c89-compiler/pulls/15","_links":{"self":{"href":"https://api.github.com/repos/kmc-jp/c89-compiler/pulls/comments/43300321"},"html":{"href":"https://github.com/kmc-jp/c89-compiler/pull/15#discussion_r43300321"},"pull_request":{"href":"https://api.github.com/repos/kmc-jp/c89-compiler/pulls/15"}}},"pull_request":{"url":"https://api.github.com/repos/kmc-jp/c89-compiler/pulls/15","id":49009074,"html_url":"https://github.com/kmc-jp/c89-compiler/pull/15","diff_url":"https://github.com/kmc-jp/c89-compiler/pull/15.diff","patch_url":"https://github.com/kmc-jp/c89-compiler/pull/15.patch","issue_url":"https://api.github.com/repos/kmc-jp/c89-compiler/issues/15","number":15,"state":"open","locked":false,"title":"[WIP] vectorのテスト","user":{"login":"hatsusato","id":2765630,"avatar_url":"https://avatars.githubusercontent.com/u/2765630?v=3","gravatar_id":"","url":"https://api.github.com/users/hatsusato","html_url":"https://github.com/hatsusato","followers_url":"https://api.github.com/users/hatsusato/followers","following_url":"https://api.github.com/users/hatsusato/following{/other_user}","gists_url":"https://api.github.com/users/hatsusato/gists{/gist_id}","starred_url":"https://api.github.com/users/hatsusato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hatsusato/subscriptions","organizations_url":"https://api.github.com/users/hatsusato/orgs","repos_url":"https://api.github.com/users/hatsusato/repos","events_url":"https://api.github.com/users/hatsusato/events{/privacy}","received_events_url":"https://api.github.com/users/hatsusato/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-10-28T13:59:48Z","updated_at":"2015-10-28T18:45:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"59f684b59baf8df3b5e455cab7c6b5453743feda","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/kmc-jp/c89-compiler/pulls/15/commits","review_comments_url":"https://api.github.com/repos/kmc-jp/c89-compiler/pulls/15/comments","review_comment_url":"https://api.github.com/repos/kmc-jp/c89-compiler/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kmc-jp/c89-compiler/issues/15/comments","statuses_url":"https://api.github.com/repos/kmc-jp/c89-compiler/statuses/2bbfbf0b13136515d22b576bd6be3129606802a9","head":{"label":"kmc-jp:test/vector","ref":"test/vector","sha":"2bbfbf0b13136515d22b576bd6be3129606802a9","user":{"login":"kmc-jp","id":1835833,"avatar_url":"https://avatars.githubusercontent.com/u/1835833?v=3","gravatar_id":"","url":"https://api.github.com/users/kmc-jp","html_url":"https://github.com/kmc-jp","followers_url":"https://api.github.com/users/kmc-jp/followers","following_url":"https://api.github.com/users/kmc-jp/following{/other_user}","gists_url":"https://api.github.com/users/kmc-jp/gists{/gist_id}","starred_url":"https://api.github.com/users/kmc-jp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kmc-jp/subscriptions","organizations_url":"https://api.github.com/users/kmc-jp/orgs","repos_url":"https://api.github.com/users/kmc-jp/repos","events_url":"https://api.github.com/users/kmc-jp/events{/privacy}","received_events_url":"https://api.github.com/users/kmc-jp/received_events","type":"Organization","site_admin":false},"repo":{"id":41434560,"name":"c89-compiler","full_name":"kmc-jp/c89-compiler","owner":{"login":"kmc-jp","id":1835833,"avatar_url":"https://avatars.githubusercontent.com/u/1835833?v=3","gravatar_id":"","url":"https://api.github.com/users/kmc-jp","html_url":"https://github.com/kmc-jp","followers_url":"https://api.github.com/users/kmc-jp/followers","following_url":"https://api.github.com/users/kmc-jp/following{/other_user}","gists_url":"https://api.github.com/users/kmc-jp/gists{/gist_id}","starred_url":"https://api.github.com/users/kmc-jp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kmc-jp/subscriptions","organizations_url":"https://api.github.com/users/kmc-jp/orgs","repos_url":"https://api.github.com/users/kmc-jp/repos","events_url":"https://api.github.com/users/kmc-jp/events{/privacy}","received_events_url":"https://api.github.com/users/kmc-jp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kmc-jp/c89-compiler","description":"ANSI C89のコンパイラ","fork":false,"url":"https://api.github.com/repos/kmc-jp/c89-compiler","forks_url":"https://api.github.com/repos/kmc-jp/c89-compiler/forks","keys_url":"https://api.github.com/repos/kmc-jp/c89-compiler/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kmc-jp/c89-compiler/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kmc-jp/c89-compiler/teams","hooks_url":"https://api.github.com/repos/kmc-jp/c89-compiler/hooks","issue_events_url":"https://api.github.com/repos/kmc-jp/c89-compiler/issues/events{/number}","events_url":"https://api.github.com/repos/kmc-jp/c89-compiler/events","assignees_url":"https://api.github.com/repos/kmc-jp/c89-compiler/assignees{/user}","branches_url":"https://api.github.com/repos/kmc-jp/c89-compiler/branches{/branch}","tags_url":"https://api.github.com/repos/kmc-jp/c89-compiler/tags","blobs_url":"https://api.github.com/repos/kmc-jp/c89-compiler/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kmc-jp/c89-compiler/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kmc-jp/c89-compiler/git/refs{/sha}","trees_url":"https://api.github.com/repos/kmc-jp/c89-compiler/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kmc-jp/c89-compiler/statuses/{sha}","languages_url":"https://api.github.com/repos/kmc-jp/c89-compiler/languages","stargazers_url":"https://api.github.com/repos/kmc-jp/c89-compiler/stargazers","contributors_url":"https://api.github.com/repos/kmc-jp/c89-compiler/contributors","subscribers_url":"https://api.github.com/repos/kmc-jp/c89-compiler/subscribers","subscription_url":"https://api.github.com/repos/kmc-jp/c89-compiler/subscription","commits_url":"https://api.github.com/repos/kmc-jp/c89-compiler/commits{/sha}","git_commits_url":"https://api.github.com/repos/kmc-jp/c89-compiler/git/commits{/sha}","comments_url":"https://api.github.com/repos/kmc-jp/c89-compiler/comments{/number}","issue_comment_url":"https://api.github.com/repos/kmc-jp/c89-compiler/issues/comments{/number}","contents_url":"https://api.github.com/repos/kmc-jp/c89-compiler/contents/{+path}","compare_url":"https://api.github.com/repos/kmc-jp/c89-compiler/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kmc-jp/c89-compiler/merges","archive_url":"https://api.github.com/repos/kmc-jp/c89-compiler/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kmc-jp/c89-compiler/downloads","issues_url":"https://api.github.com/repos/kmc-jp/c89-compiler/issues{/number}","pulls_url":"https://api.github.com/repos/kmc-jp/c89-compiler/pulls{/number}","milestones_url":"https://api.github.com/repos/kmc-jp/c89-compiler/milestones{/number}","notifications_url":"https://api.github.com/repos/kmc-jp/c89-compiler/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kmc-jp/c89-compiler/labels{/name}","releases_url":"https://api.github.com/repos/kmc-jp/c89-compiler/releases{/id}","created_at":"2015-08-26T15:46:17Z","updated_at":"2015-10-23T16:18:49Z","pushed_at":"2015-10-28T18:33:32Z","git_url":"git://github.com/kmc-jp/c89-compiler.git","ssh_url":"git@github.com:kmc-jp/c89-compiler.git","clone_url":"https://github.com/kmc-jp/c89-compiler.git","svn_url":"https://github.com/kmc-jp/c89-compiler","homepage":null,"size":228,"stargazers_count":7,"watchers_count":7,"language":"Makefile","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":9,"forks":0,"open_issues":9,"watchers":7,"default_branch":"master"}},"base":{"label":"kmc-jp:lib/vector","ref":"lib/vector","sha":"4a7efd3618d4366048b7b558a7e0a48bbb9f003b","user":{"login":"kmc-jp","id":1835833,"avatar_url":"https://avatars.githubusercontent.com/u/1835833?v=3","gravatar_id":"","url":"https://api.github.com/users/kmc-jp","html_url":"https://github.com/kmc-jp","followers_url":"https://api.github.com/users/kmc-jp/followers","following_url":"https://api.github.com/users/kmc-jp/following{/other_user}","gists_url":"https://api.github.com/users/kmc-jp/gists{/gist_id}","starred_url":"https://api.github.com/users/kmc-jp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kmc-jp/subscriptions","organizations_url":"https://api.github.com/users/kmc-jp/orgs","repos_url":"https://api.github.com/users/kmc-jp/repos","events_url":"https://api.github.com/users/kmc-jp/events{/privacy}","received_events_url":"https://api.github.com/users/kmc-jp/received_events","type":"Organization","site_admin":false},"repo":{"id":41434560,"name":"c89-compiler","full_name":"kmc-jp/c89-compiler","owner":{"login":"kmc-jp","id":1835833,"avatar_url":"https://avatars.githubusercontent.com/u/1835833?v=3","gravatar_id":"","url":"https://api.github.com/users/kmc-jp","html_url":"https://github.com/kmc-jp","followers_url":"https://api.github.com/users/kmc-jp/followers","following_url":"https://api.github.com/users/kmc-jp/following{/other_user}","gists_url":"https://api.github.com/users/kmc-jp/gists{/gist_id}","starred_url":"https://api.github.com/users/kmc-jp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kmc-jp/subscriptions","organizations_url":"https://api.github.com/users/kmc-jp/orgs","repos_url":"https://api.github.com/users/kmc-jp/repos","events_url":"https://api.github.com/users/kmc-jp/events{/privacy}","received_events_url":"https://api.github.com/users/kmc-jp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kmc-jp/c89-compiler","description":"ANSI C89のコンパイラ","fork":false,"url":"https://api.github.com/repos/kmc-jp/c89-compiler","forks_url":"https://api.github.com/repos/kmc-jp/c89-compiler/forks","keys_url":"https://api.github.com/repos/kmc-jp/c89-compiler/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kmc-jp/c89-compiler/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kmc-jp/c89-compiler/teams","hooks_url":"https://api.github.com/repos/kmc-jp/c89-compiler/hooks","issue_events_url":"https://api.github.com/repos/kmc-jp/c89-compiler/issues/events{/number}","events_url":"https://api.github.com/repos/kmc-jp/c89-compiler/events","assignees_url":"https://api.github.com/repos/kmc-jp/c89-compiler/assignees{/user}","branches_url":"https://api.github.com/repos/kmc-jp/c89-compiler/branches{/branch}","tags_url":"https://api.github.com/repos/kmc-jp/c89-compiler/tags","blobs_url":"https://api.github.com/repos/kmc-jp/c89-compiler/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kmc-jp/c89-compiler/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kmc-jp/c89-compiler/git/refs{/sha}","trees_url":"https://api.github.com/repos/kmc-jp/c89-compiler/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kmc-jp/c89-compiler/statuses/{sha}","languages_url":"https://api.github.com/repos/kmc-jp/c89-compiler/languages","stargazers_url":"https://api.github.com/repos/kmc-jp/c89-compiler/stargazers","contributors_url":"https://api.github.com/repos/kmc-jp/c89-compiler/contributors","subscribers_url":"https://api.github.com/repos/kmc-jp/c89-compiler/subscribers","subscription_url":"https://api.github.com/repos/kmc-jp/c89-compiler/subscription","commits_url":"https://api.github.com/repos/kmc-jp/c89-compiler/commits{/sha}","git_commits_url":"https://api.github.com/repos/kmc-jp/c89-compiler/git/commits{/sha}","comments_url":"https://api.github.com/repos/kmc-jp/c89-compiler/comments{/number}","issue_comment_url":"https://api.github.com/repos/kmc-jp/c89-compiler/issues/comments{/number}","contents_url":"https://api.github.com/repos/kmc-jp/c89-compiler/contents/{+path}","compare_url":"https://api.github.com/repos/kmc-jp/c89-compiler/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kmc-jp/c89-compiler/merges","archive_url":"https://api.github.com/repos/kmc-jp/c89-compiler/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kmc-jp/c89-compiler/downloads","issues_url":"https://api.github.com/repos/kmc-jp/c89-compiler/issues{/number}","pulls_url":"https://api.github.com/repos/kmc-jp/c89-compiler/pulls{/number}","milestones_url":"https://api.github.com/repos/kmc-jp/c89-compiler/milestones{/number}","notifications_url":"https://api.github.com/repos/kmc-jp/c89-compiler/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kmc-jp/c89-compiler/labels{/name}","releases_url":"https://api.github.com/repos/kmc-jp/c89-compiler/releases{/id}","created_at":"2015-08-26T15:46:17Z","updated_at":"2015-10-23T16:18:49Z","pushed_at":"2015-10-28T18:33:32Z","git_url":"git://github.com/kmc-jp/c89-compiler.git","ssh_url":"git@github.com:kmc-jp/c89-compiler.git","clone_url":"https://github.com/kmc-jp/c89-compiler.git","svn_url":"https://github.com/kmc-jp/c89-compiler","homepage":null,"size":228,"stargazers_count":7,"watchers_count":7,"language":"Makefile","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":9,"forks":0,"open_issues":9,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kmc-jp/c89-compiler/pulls/15"},"html":{"href":"https://github.com/kmc-jp/c89-compiler/pull/15"},"issue":{"href":"https://api.github.com/repos/kmc-jp/c89-compiler/issues/15"},"comments":{"href":"https://api.github.com/repos/kmc-jp/c89-compiler/issues/15/comments"},"review_comments":{"href":"https://api.github.com/repos/kmc-jp/c89-compiler/pulls/15/comments"},"review_comment":{"href":"https://api.github.com/repos/kmc-jp/c89-compiler/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kmc-jp/c89-compiler/pulls/15/commits"},"statuses":{"href":"https://api.github.com/repos/kmc-jp/c89-compiler/statuses/2bbfbf0b13136515d22b576bd6be3129606802a9"}}}}